-
Notifications
You must be signed in to change notification settings - Fork 62
Conversation
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! |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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! | ||
|
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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? 😉
Noticed you didn't wrap things like "bin/rails secrets:setup" and "--webpack" etc. in backticks. Intentional or just missed them? |
Missed. Please do tweak!
…On Tue, Feb 21, 2017 at 9:57 PM, Kasper Timm Hansen < ***@***.***> wrote:
Noticed you didn't wrap things like "bin/rails secrets:setup" and
"--webpack" etc. in backticks. Intentional or just missed them?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#97 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAKtdVqLQlT7A77LeEh1_u8_D7IfMY5ks5re0-dgaJpZM4MHh19>
.
|
Add him on!
… On Feb 22, 2017, at 04:47, Guillermo Iguaran ***@***.***> wrote:
@guilleiguaran commented on this pull request.
In _posts/2017-02-21-Rails-5-1-beta1.markdown:
> +## Loving JavaScript
+
+We've had a stormy, perhaps even contentious, relationship with JavaScript over the years. But that time is past. JavaScript has improved immensely over the past few years, particularly with the advent of ES6, and with package and compilation tools like Yarn and Webpack. Rails is embracing both of these solutions with open arms and letting whatever past water flow under the bridge.
+
+JavaScript and Ruby share a deep philosophical bond over language design, if not ecosystem management. Let's focus on the aspects we have in common and help Rails programmers extract the best from JavaScript with the help of some key guiding conventions.
+
+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.
+
+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. 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!
Sure, we should mention to Dangyi Liu (https://github.com/liudangyi) here also!!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
||
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! |
There was a problem hiding this comment.
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".
That's right. Everything in 4.x is unsupported, except for severe security
issues.
…On Wed, Feb 22, 2017 at 4:18 PM, Claudio B. ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In _posts/2017-02-21-Rails-5-1-beta1.markdown
<#97 (comment)>:
> +
+In addition to the highlight reel, we have hundreds of other fixes and improvements across all the frameworks. Please peruse the CHANGELOGs to acquaint yourself with all the goodies:
+
+* [Action Cable CHANGELOG](https://github.com/rails/rails/blob/v5.1.0.beta1/actioncable/CHANGELOG.md)
+* [Action Mailer CHANGELOG](https://github.com/rails/rails/blob/v5.1.0.beta1/actionmailer/CHANGELOG.md)
+* [Action Pack CHANGELOG](https://github.com/rails/rails/blob/v5.1.0.beta1/actionpack/CHANGELOG.md)
+* [Action View CHANGELOG](https://github.com/rails/rails/blob/v5.1.0.beta1/actionview/CHANGELOG.md)
+* [Active Model CHANGELOG](https://github.com/rails/rails/blob/v5.1.0.beta1/activemodel/CHANGELOG.md)
+* [Active Record CHANGELOG](https://github.com/rails/rails/blob/v5.1.0.beta1/activerecord/CHANGELOG.md)
+* [Active Support CHANGELOG](https://github.com/rails/rails/blob/v5.1.0.beta1/activesupport/CHANGELOG.md)
+* [Active Job CHANGELOG](https://github.com/rails/rails/blob/v5.1.0.beta1/activejob/CHANGELOG.md)
+* [Railties CHANGELOG](https://github.com/rails/rails/blob/v5.1.0.beta1/railties/CHANGELOG.md)
+
+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!
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".
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#97 (review)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAKtZKWdVuKiVwwIRTpn5IvHP93S8UVks5rfFHYgaJpZM4MHh19>
.
|
|
||
## 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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. | ||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I returned it back.
There was a problem hiding this comment.
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.
No description provided.