Commit Graph

60 Commits

Author SHA1 Message Date
Koichi ITO
e8be4f0891 Deprecate safe_level of ERB.new in Ruby 2.6
### Summary

In a Rails application using Ruby 2.6.0-dev, when running `bin/rails g migration`
with `RUBYOPT=-w`, an ERB deprecation warnings will be displayed.

```console
% ruby -v
ruby 2.6.0dev (2018-03-03 trunk 62644) [x86_64-darwin17]
% bin/rails -v
Rails 6.0.0.alpha
% RUBYOPT=-w bin/rails g migration create_foos

(snip)

/Users/koic/src/github.com/rails/rails/railties/lib/rails/generators/migration.rb:66:
warning: Passing safe_level with the 2nd argument of ERB.new is
deprecated. Do not use it, and specify other arguments as keyword
arguments.
/Users/koic/src/github.com/rails/rails/railties/lib/rails/generators/migration.rb:66:
warning: Passing trim_mode with the 3rd argument of ERB.new is
deprecated. Use keyword argument like ERB.new(str, trim_mode: ...)
instead.
/Users/koic/src/github.com/rails/rails/railties/lib/rails/generators/migration.rb:66:
warning: Passing eoutvar with the 4th argument of ERB.new is
deprecated. Use keyword argument like ERB.new(str, eoutvar: ...)
instead.
      create    db/migrate/20180304002144_create_foos.rb
```

This PR suppresses the above deprecation warnings in Ruby 2.6.0-dev.

This warning is due to the interface of `ERB.new` will change from Ruby 2.6.

> Add :trim_mode and :eoutvar keyword arguments to ERB.new.
> Now non-keyword arguments other than first one are softly deprecated
> and will be removed when Ruby 2.5 becomes EOL. [Feature #14256]

2311087b68/NEWS (stdlib-updates-outstanding-ones-only)

The following addresses are related Ruby's commit.
https://github.com/ruby/ruby/commit/cc777d0

Also this PR will change `ERB.new` used in `tasks/release.rb`.

### Other Information

This PR uses `ERB.version` to switch `ERB.new` interface. Because Rails 6
supports multiple Ruby versions (Ruby 2.4.1 or higher), it need to
use the appropriate interface.

Using `ERB.version` instead of `RUBY_VERSON` is based on the following patch.
https://github.com/ruby/ruby/pull/1826

This patch is built into Ruby.
40db89c093
2018-03-05 18:49:45 +09:00
bogdanvlviv
9045875167
Remove unused variable gem_version from tasks/release.rb 2017-09-24 22:53:10 +03:00
Koichi ITO
ef2016f888 Use frozen string literal in tasks/ 2017-08-13 22:04:42 +09:00
David Heinemeier Hansson
5528406603 Merge pull request #30020 from rails/active-storage-import
Add Active Storage to Rails
2017-08-04 18:05:13 -05:00
Claudio B
12d944f765 Add Active Storage to README and release (#30065)
Before we forget...
2017-08-04 17:55:24 -05:00
Rafael Mendonça França
f7d0bd657f Fix all rubocop violations 2017-08-03 17:45:40 -04:00
Kasper Timm Hansen
3636d1f479
Fix github user output.
[ Orhan Toy & Kasper Timm Hansen ]
2017-07-30 16:09:36 +02:00
Kasper Timm Hansen
6f9b01c056
Use exact Rails version when verifying. 2017-07-25 22:00:07 +02:00
Kasper Timm Hansen
973c3211c6
Support multiple versions in release announcement.
So releasing 5.1 and 5.0 together won't require manual copy
and paste.
2017-07-22 21:17:25 +02:00
Kasper Timm Hansen
1e7acf844b
Add task to verify a release.
Basically revises the release flow to:

* Update the version in RAILS_VERSION + rake changelog:header
* Run rake all:verify (click around in the booted app)
* If that checks out, run rake release.
2017-07-22 21:17:25 +02:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
bogdanvlviv
40bdbce191
Define path with __dir__
".. with __dir__ we can restore order in the Universe." - by @fxn

Related to 5b8738c2df003a96f0e490c43559747618d10f5f
2017-05-23 00:53:51 +03:00
Rafael Mendonça França
fee4257f8d
Fix the blog post template header 2017-03-20 14:08:09 -04:00
Rafael Mendonça França
14ab460f8e
Use shasum 256 on the release 2017-02-24 20:02:37 -05:00
Matthew Draper
71df60e921
Rearrange npm release process again
Make prep_release idempotent, including the npm bump.
2017-02-23 15:14:20 -05:00
Matthew Draper
d7c8d34cc4
Add a task to build a draft of the release announcement 2017-02-23 15:06:34 -05:00
Rafael Mendonça França
d9d28d2437
Do not override the global variable
This will make the version of the next gems to change
2017-02-23 15:03:34 -05:00
Xavier Noria
60b67d76dc modernizes hash syntax in the rest of the project 2016-08-06 19:40:54 +02:00
Xavier Noria
78d3f84955 applies new string literal convention in tasks
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:22:32 +02:00
eileencodes
297e262035 Fix release task now that NPM is part of the build
Note: this commit looks super weird becuase git. I'm moving the entire
NPM section to the part where we actually push the gems/npm package for
the reasons below. That's not how the git diff looks though.

When we release Rails we run `rake prep_release` which calls
`update_versions`. This was updating the NPM version as well. But when we
would later run `rake install` to test the installed gem
`update_versions` gets called again which causes the install to fail
because NPM sees the version is the same as the last run and refuses to
continue. If you forget to stash this will then cause the push to
RubyGems to fail because `update_versions` is called again and then NPM
will not continue because it thinks the version hasn't been changed even
though it has.

The correct solution would be to not update the NPM verion if it matches
the version already in the file but after an hour I could not find a
simple way to use NPM to read the current version. Honestly that's not
the best way to do it either because say you forget to update something
else and then the script thinks it's already been updated.

With that in mind I think the best solution is to not update the NPM
version until right before we are going to push to NPM because then that
won't cause the push to RubyGems to fail.
2016-07-01 10:58:06 -04:00
Javan Makhmali
d12209cad2 Remove package:clean task
Introduced in d6f2000a67cc63aa67414c75ce77de671824ec52 and was only used by Action Cable. Now handled by Action Cable’s assets:compile task.
2016-05-24 13:11:28 -04:00
Jon Moss
548c1d6e8b
Publish Action Cable to NPM when we release.
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-05-11 19:36:27 -07:00
Rafael Mendonça França
db93aa16c4 Sign the tags when releasing 2016-05-06 16:24:41 -05:00
eileencodes
ba907d6caa Fix release script to allow pre release gems
This addition of `--pre` fixes the issue we were seeing when installing
a local copy of a pre-release rails version.
2016-04-27 15:48:47 -05:00
Matthew Draper
d6f2000a67 Wrangle the asset build into something that sounds more general 2016-02-01 05:03:03 +10:30
Jon Moss
cb040aa0e5 Add Action Cable asset building as release step 2016-01-30 20:51:18 -05:00
Aaron Patterson
23c36725a0 fix version update task to deal with .beta1.1 2016-01-25 10:22:03 -08:00
Rafael Mendonça França
7c4080aac4 Add task to test the release preparation 2015-12-18 14:56:26 -02:00
Arun Agrawal
aeceb5d188 Add actioncable to list of release frameworks [ci skip] 2015-12-17 16:08:02 +01:00
Rafael Mendonça França
1576f47c23 Ignore Gemfile.lock in the release task 2015-11-12 15:12:34 -02:00
Rafael Mendonça França
89b7396191 Add bundle check to release task 2015-11-05 01:04:07 -02:00
Rafael Mendonça França
d52baa8514 Add tasks to automatize CHANGELOG headers 2015-10-30 18:03:18 -02:00
Rafael Mendonça França
b58808ed6a Allow release when CHANGELOG is changed 2015-08-24 15:07:27 -03:00
Godfrey Chan
d507f332a9 activejob needs to be built before actionmailer 2014-12-19 16:12:32 -08:00
Rafael Mendonça França
70c2bf9d21 Fix shell quote on the release task 2014-11-19 18:30:06 -02:00
Abdelkader Boudih
0c232779ec Remove activejob integration tests 2014-08-12 10:07:21 +00:00
Arthur Neves
21a674a028
Fix release task
Add a parentheses.
related: b4c96490eeb1fbb944e116c7703dd528b37fc08a
2014-03-31 14:45:34 -04:00
Rafael Mendonça França
ce0df82057 Fix the update_versions release task 2014-03-25 15:35:06 -03:00
Rafael Mendonça França
b4c96490ee Take in consideration guides CHANGELOG 2014-03-14 14:52:17 -03:00
Rafael Mendonça França
d153355d35 Match the whole string 2014-03-14 14:49:46 -03:00
Jeremy Kemper
092e113df5 Use annotated git tags for release task 2013-12-18 01:00:13 -07:00
Yves Senn
3de199988f we should use annotated tags for releases.
Annotated tags will provide us with Tagger and Time information.
2013-12-18 08:57:46 +01:00
David Heinemeier Hansson
dc90709eaf Fix dependency order 2013-12-17 16:10:52 -08:00
Arun Agrawal
3cfe552a06 Added missing actionview in list for release 2013-07-13 18:56:56 +02:00
Santiago Pastorino
78defbb78e Fix release task after ceb3b8717beb9818fbfbab429a8aa697591e184a 2013-04-01 18:26:34 -03:00
robertomiranda
7142e924b4 Fix update_version_rb task 2013-03-24 08:43:10 -05:00
Prem Sichanugrist
f1637bf2bb Remove Active Resource source files from the repository
Dear Active Resource,

It's not that I hate you or anything, but you didn't get much attention lately. There're so many alternatives out there, and I think people have made their choice to use them than you. I think it's time for you to have a big rest, peacefully in this Git repository.

I will miss you,

@sikachu.
2012-03-13 14:55:44 -04:00
Jon Leighton
156784fef1 rake release should push the tag 2011-11-14 16:55:31 +00:00
Arun Agrawal
b3175f6cb9 Warnings removed. 2011-11-08 14:28:28 +05:30