envato-archive / guide

Document your application with a living component library and styleguide
https://rubygems.org/gems/guide
MIT License
8 stars 3 forks source link

Use `render plain:` instead of the deprecated `render text:` #85

Closed petervandoros closed 6 years ago

petervandoros commented 6 years ago

Rails 5 deprecated render text: 'plain text'. Instead, render plain: 'plain text' should be used.

Considerations

shevaun commented 6 years ago

Yeah I think we should specify a dependency on Rails 5 for this version (https://github.com/envato/guide/blob/master/guide.gemspec#L17), since we are removing the handling for versions less than 5, otherwise +1

zubin commented 6 years ago

If we're dropping support for rails 4 then the Appraisals file should be updated, although I don't think we need to drop support just yet since render plain works in rails 4.

petervandoros commented 6 years ago

@shevaun We don't need to remove Rails 4 yet as it still works with it (like @zubin already stated). You can see the build which runs the tests against Rails 4 and 5.

If you want me to remove support for Rails 4, just let me know and I can do that too.

shevaun commented 6 years ago

Oh ok, so the tests pass in Rails 4? I just assumed expect(response).not_to render_template(:show) didn't work since it was wrapped in a if Rails 5. If it does, I'm fine to leave it as is :)

update: I just looked at the build and saw it does in fact pass. Great!

petervandoros commented 6 years ago

Gem published to rubygems.org (https://rubygems.org/gems/guide)

$ gem push guide-0.4.1.gem
Enter your RubyGems.org credentials.
Don't have an account yet? Create one at https://rubygems.org/sign_up
   Email:   rubygems@envato.com
Password:

Signed in.
Pushing gem to https://rubygems.org...
Successfully registered gem: guide (0.4.1)