Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

5.1.0.beta1 release post #97

Merged
merged 9 commits into from
Feb 23, 2017
Merged

5.1.0.beta1 release post #97

merged 9 commits into from
Feb 23, 2017

Conversation

dhh
Copy link
Member

@dhh dhh commented Feb 21, 2017

No description provided.

3. **Drop jQuery as a default dependency.** We used to require jQuery in order to provide features like data-remote, data-confirm, and the other parts of Rails UJS. This dependency is no longer necessary as we've rewritten rails-ujs to use vanilla JavaScript. You're of course still free to use jQuery, but you no longer have to.


Thanks to [Liceth Ovalles](https://github.com/Liceth) for her work on Yarn integration and [Guillermo Iguaran](https://github.com/guilleiguaran) for his work on rails-ujs, Yarn, and Webpack!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably mention https://github.com/liudangyi here as well since he did the rewrite of rails-ujs.

cc @guilleiguaran

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we should mention to Dangyi Liu (https://github.com/liudangyi) here also!!


But integration tests do not help you test the entire system, if that system relies on JavaScript. And most major web systems today rely at least to some extent on JavaScript. That's where system tests driven by a real browser come in.

There's long been an answer for system tests like this in Ruby called [Capybara](http://teamcapybara.github.io/capybara/). It's just been kind of a journey to configure properly for Rails. So now we've [baked them straight into the framework](https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/system_test_case.rb#L11)! You get a lovely wrapping of Capybara that's preconfigured for Chrome and enhanced to provide failure screenshots as part of Action Dispatch.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be a good point to mention that the "journey" also used to involve DatabaseCleaner and how that's fixed too.

Ref: rails/rails#28083


## Encrypted secrets

If you're checking production passwords, api keys, and other secrets undisgused into your revision control system, you're doing it wrong. That's not safe and you should stop it! Now that's an easy prescription, but without a coherent answer to what you should do instead, it's also not that helpful.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undisgused 😄

As per our [maintenance policy][maintenance-policy], the release of Rails 5.1 will mean that bug fixes will only apply to 5.1.x, regular security issues to 5.1.x and 5.0.x, and severe security issues to 5.1.x, 5.0.x, and 4.2.x. This means 4.x and below will essentially be unsupported!

Please help us test this beta version of Rails. It's always frustrating when we put a lot of work into a new release, betas, release candidates, and then get people report all sorts of issues on week one of the final release. [Basecamp 3](https://basecamp.com) is already running this beta in production. This is an incremental upgrade to Rails 5.0. Please do your community duty and help us land a solid 5.1 without needing an immediate 5.1.1. Thank you! Gracias! Merci! TAK!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🇺🇸🇪🇸🇫🇷🇩🇰😄


The improvements in Rails 5.1 focus on three major parts:

1. **Manage JavaScript dependencies from NPM via Yarn.** Think of [Yarn](https://yarnpkg.com/en/) like Bundler for JavaScript (it even has Yehuda Katz involved!). This makes it easy to depend on libraries like React or anything else from NPM. Everything you depend on via Yarn is then made available to be required in the asset pipeline, just like vendored dependencies would have been. Just use the binstub bin/yarn to add dependencies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everyone else has a link, why don't we give Yehuda one too? 😉

@kaspth
Copy link
Contributor

kaspth commented Feb 21, 2017

Noticed you didn't wrap things like "bin/rails secrets:setup" and "--webpack" etc. in backticks. Intentional or just missed them?

@dhh
Copy link
Member Author

dhh commented Feb 21, 2017 via email

@dhh
Copy link
Member Author

dhh commented Feb 22, 2017 via email


Your release manager for Rails 5.1 is [Rafael França][rafaelfranca]. He'll be chaperoning us through the betas, release candidates, and onto the final release in advance of [RailsConf 2017](http://railsconf.com/).

As per our [maintenance policy][maintenance-policy], the release of Rails 5.1 will mean that bug fixes will only apply to 5.1.x, regular security issues to 5.1.x and 5.0.x, and severe security issues to 5.1.x, 5.0.x, and 4.2.x. This means 4.x and below will essentially be unsupported!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means 4.x and below will essentially be unsupported!

Small note: is 4.x here correct?
The previous sentence says that severe security issues will still be released for 4.2.x.
I'm not sure if that makes 4.2 still count as "essentially unsupported".

@dhh
Copy link
Member Author

dhh commented Feb 22, 2017 via email


## Parameterized mailers

Action Mailer is modeled on Action Controller. It shares underpinnings through Action Dispatch, but it's long been disadvantaged from its controller cousin in the way it can share logic between actions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing they share is actually Abstract Controller, not Action Dispatch


In Action Controller, it's common to use before_action and similar callbacks to extract logic that applies to multiple actions. This is doable because the params hash is available before the action is invoked. But in Action Mailer, we've been using regular method signatures with explicit arguments, so those arguments haven't been available to filters that run before the actions.

With [Parameterized Mailers](https://github.com/rails/rails/blob/master/actionmailer/lib/action_mailer/parameterized.rb#L2), we now give you the option of calling mailers with parameters that, like in controllers, are available before the action is invoked. This combines with the default to/from/reply_to headers to dramatically DRY-up some mailer actions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is good to point to a specific commit because they files can move in the future.

2. **Optionally compile JavaScript with Webpack.** While there are a million different module bundlers/compilers for JavaScript, [Webpack](https://webpack.github.io/) is quickly emerging as the preeminent choice. We've made it easy to use Webpack with Rails through the new [Webpacker](https://github.com/rails/webpacker) gem that you can configure automatically on new projects with `--webpack`. This is fully compatible with the asset pipeline, which you can continue to use for images, fonts, sounds, whatever. You can even have some JavaScript on the asset pipeline and some done via Webpack. It's all managed via Yarn that's on by default.

3. **Drop jQuery as a default dependency.** We used to require jQuery in order to provide features like data-remote, data-confirm, and the other parts of Rails UJS. This dependency is no longer necessary as we've [rewritten rails-ujs to use vanilla JavaScript](https://github.com/rails/rails-ujs). You're of course still free to use jQuery, but you no longer have to.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rafaelfranca what's the new link for rails-ujs? The repo is dead, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I returned it back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks 👍 — we'll keep this paragraph as is then.

@rafaelfranca rafaelfranca merged commit cd9c9ac into gh-pages Feb 23, 2017
@rafaelfranca rafaelfranca deleted the rails-5-1-beta1 branch February 23, 2017 20:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants