aboutsummaryrefslogtreecommitdiffstats
path: root/railties/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix boolean interaction in scaffold system testsGannon McGibbon2018-12-121-0/+4
|
* Remove redundant suffixes on generated system tests.Gannon McGibbon2018-12-111-0/+4
|
* Abort early if generator command fails (#34420)David Rodríguez2018-12-071-0/+6
| | | | | | | | | | | | | | | | * No need to go through ruby * Abort early if a generator command fails * Reuse `rails_command` method * Bump thor minimum dependency to 0.20.3 * Add some minimal docs * Add a changelog entry * Restore original logging
* Remove asset paths from eager_load_paths and autoload_pathsGannon McGibbon2018-11-091-0/+4
| | | | | Remove `app/assets` and `app/javascript` from `eager_load_paths` and `autoload_paths`.
* Add JSON support to rails properties route (`/rails/info/properties`).Yoshiyuki Hirano2018-11-071-0/+6
| | | | | | | | | | | | | | | | | Added json format, like this: { "Rails version": "6.0.0.alpha", "Ruby version": "2.5.1-p57 (x86_64-darwin17)", "RubyGems version": "2.7.6", "Rack version": "2.0.6", "JavaScript Runtime": "Node.js (V8)", "Middleware": ["Rack::Sendfile", "ActionDispatch::Static", "ActionDispatch::Executor", "ActiveSupport::Cache::Strategy::LocalCache::Middleware", "Rack::Runtime", "Rack::MethodOverride", "ActionDispatch::RequestId", "ActionDispatch::RemoteIp", "Sprockets::Rails::QuietAssets", "Rails::Rack::Logger", "ActionDispatch::ShowExceptions", "WebConsole::Middleware", "ActionDispatch::DebugExceptions", "ActionDispatch::Reloader", "ActionDispatch::Callbacks", "ActiveRecord::Migration::CheckPending", "ActionDispatch::Cookies", "ActionDispatch::Session::CookieStore", "ActionDispatch::Flash", "ActionDispatch::ContentSecurityPolicy::Middleware", "Rack::Head", "Rack::ConditionalGet", "Rack::ETag", "Rack::TempfileReaper"], "Application root": "/path/to/app", "Environment": "development", "Database adapter": "sqlite3", "Database schema version": 0 }
* Merge pull request #34222 from bogdanvlviv/unify-changelog-entriesRafael França2018-10-221-24/+8
|\ | | | | Unify changelog entries related to `database` option of Rails generators [ci skip]
| * Unify changelog entries related to `database` option of Rails generators [ci ↵bogdanvlviv2018-10-161-24/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | skip] `migrations_paths` option was added to migration generator, with changelog entry, in #33760. Also `migrations_paths` option was added to model generator, with changelog entry, in #33994. Then `migrations_paths` was renamed to `database` and aliased as `db` in #34021, and was added new changelog entry. I think we should edit existed changelog entries instead adding new about changing the name of the option from `migrations_paths` to `database` since Rails 6.0 hasn't been released yet, and since It might confuse readers of the changelog file in case if they've read changelog enty about adding `migrations_paths` option but haven't read the entry about change the name of that option to `database`. @eileencodes, @gmcgibbon, @rafaelfranca Does it make sense?
* | Merge pull request #29204 from ↵Ryuta Kamizono2018-10-161-0/+6
|\ \ | |/ |/| | | | | | | RasPat1/issue-29200-scaffold-reference-display-memory-address Issue #29200 scaffold an object with a reference displays an object memory address to user
| * Show object ids in scaffold pages when displaying referenced objectsRasesh Patel2018-10-141-0/+5
|/ | | | | | | | | | | | Resolve Issue#29200 When scaffolding a model that references another model the generated show and index html pages display the object directly on the page. Basically, it just shows a memory address. That is not very helpful. In this commit we show the object's id rather than the memory address. This updates the scaffold templates and the json builder files.
* Add multi-db support to rails db:migrate:statusGannon McGibbon2018-10-091-0/+5
|
* Make Webpacker the default JavaScript compiler for Rails 6 (#33079)David Heinemeier Hansson2018-09-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use Webpacker by default on new apps * Stop including coffee-rails by default * Drop using a js_compressor by default * Drop extra test for coffeescript inclusion by default * Stick with skip_javascript to signify skipping webpack * Don't install a JS runtime by default any more * app/javascript will be the new default directory for JS * Make it clear that this is just for configuring the default Webpack framework setup now * Start using the Webpack tag in the default layout * Irrelevant test * jQuery is long gone * Stop having asset pipeline compile default application.js * Add rails-ujs by default to the Webpack setup * Add Active Storage JavaScript to application.js pack by default * Consistent quoting * Add Turbolinks to default pack * Add Action Cable to default pack Need some work on how to set the global consumer that channels will work with. @javan? * Require all channels by default and use a separate consumer stub * Channel generator now targets Webpack style * Update task docs to match new generator style * Use uniform import style * Drop the JS assets generator It was barely helpful as it was. It’s no longer helpful in a Webpacked world. Sayonara! * Add app/javascript to the stats directories * Simpler import style Which match the other imports. * Address test failures from dropping JS compilation (and compression) * webpacker-default: Modify `AssetsGeneratorTest` Before: ``` $ bin/test test/generators/assets_generator_test.rb Run options: --seed 46201 F Failure: AssetsGeneratorTest#test_assets [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/assets_generator_test.rb:12]: Expected file "app/assets/javascripts/posts.js" to exist, but does not bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/assets_generator_test.rb:10 . Finished in 0.031343s, 63.8101 runs/s, 95.7152 assertions/s. 2 runs, 3 assertions, 1 failures, 0 errors, 0 skips ``` After: ``` $ bin/test test/generators/assets_generator_test.rb Run options: --seed 43571 .. Finished in 0.030370s, 65.8545 runs/s, 65.8545 assertions/s. 2 runs, 2 assertions, 0 failures, 0 errors, 0 skips ``` * webpacker-default: Modify `ChannelGeneratorTest` Before: ``` $ bin/test test/generators/channel_generator_test.rb Run options: --seed 8986 .F Failure: ChannelGeneratorTest#test_channel_with_multiple_actions_is_created [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:43]: Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:34 .F Failure: ChannelGeneratorTest#test_channel_is_created [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:29]: Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:22 E Error: ChannelGeneratorTest#test_cable_js_is_created_if_not_present_already: Errno::ENOENT: No such file or directory @ apply2files - /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/fixtures/tmp/app/assets/javascripts/cable.js bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:60 F Failure: ChannelGeneratorTest#test_channel_suffix_is_not_duplicated [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:87]: Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:80 F Failure: ChannelGeneratorTest#test_channel_on_revoke [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:77]: Expected file "app/assets/javascripts/cable.js" to exist, but does not bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:68 Finished in 0.064384s, 108.7227 runs/s, 481.4861 assertions/s. 7 runs, 31 assertions, 4 failures, 1 errors, 0 skips ``` After: ``` $ bin/test test/generators/channel_generator_test.rb Run options: --seed 44857 ....... Finished in 0.060243s, 116.1961 runs/s, 697.1764 assertions/s. 7 runs, 42 assertions, 0 failures, 0 errors, 0 skips ``` * Fix shared generator tests. * webpacker-default: Modify `ControllerGeneratorTest` The JS assets generator was dropped. ref. https://github.com/rails/rails/commit/46215b179483d3e4d264555f5a4952f43eb8142a * Revert "Simpler import style". It's currently failing with an error of "TypeError: undefined is not an object (evaluating '__WEBPACK_IMPORTED_MODULE_2_activestorage___default.a.start')". Waiting for @javan to have a look. This reverts commit 5d3ebb71059f635d3756cbda4ab9752027e09256. * require webpacker in test app * Add webpacker without making the build hang/timeout. (#33640) * use yarn workspaces to allow for installing unreleased packages and only generate js/bootsnap when required * no longer need to have webpacker in env templates as webpacker moved this config to yml file * Fix rubocop violation * Got the test passing for the running scaffold * update expected lines of code * update middleware tests to account for webpacker * disable js in plugins be default to get the tests passing (#34009) * clear codeclimate report issues * Anything newer than currently released is good * Use Webpacker development version during development of Rails * Edge should get development webpacker as well * Add changelog entry for Webpacker change
* Refactor migrations_path command option to databaseGannon McGibbon2018-09-281-0/+15
|
* Add migrations_paths option to model generatorGannon McGibbon2018-09-271-0/+16
|
* Switch to supports_cache_versioning? check to a class methodschneems2018-09-201-1/+3
| | | | | - Moving the `supports_cache_versioning?` check to a class method. - Shorten the method doc. - Expand on the error message.
* [close #33907] Error when using "recyclable" cache keys with a store that ↵schneems2018-09-201-0/+5
| | | | | | | | | | | | | | does not support it If you are using the "in cache versioning" also known as "recyclable cache keys" the cache store must be aware of this scheme, otherwise you will generate cache entries that never invalidate. This PR adds a check to the initialization process to ensure that if recyclable cache keys are being used via ``` config.active_record.cache_versioning = true ``` Then the cache store needs to show that it supports this versioning scheme. Cache stores can let Rails know that they support this scheme by adding a method `supports_in_cache_versioning?` and returning true.
* Fixed to RAILS_MASTER_KEY as a default env key for decrypting.Wojciech Wnętrzak2018-09-201-1/+1
| | | | | Fixes mistake left in https://github.com/rails/rails/pull/33521/files#diff-2a29095afcfe2c683b82a779a94c2208R59 and misunderstanding in https://github.com/rails/rails/commit/d69b04de0ff33237209afea6f6cac3ab27934908
* Fix env name for master keyyuuji.yaginuma2018-09-201-1/+1
| | | | When using environment specific credentials, `RAILS_MASTER_KEY` is not used.
* Support environment specific credentials file. (#33521)Wojciech Wnętrzak2018-09-191-0/+9
| | | | | | For `production` environment look first for `config/credentials/production.yml.enc` file that can be decrypted by `ENV["RAILS_MASTER_KEY"]` or `config/credentials/production.key` master key. Edit given environment credentials file by command `rails credentials:edit --environment production`. Default behavior can be overwritten by setting `config.credentials.content_path` and `config.credentials.key_path`.
* Merge pull request #33785 from bogdanvlviv/follow-up-33773-33779Rafael França2018-09-111-1/+1
|\ | | | | Clarify changelog entry added in #33779 [ci skip]
| * Clarify changelog entry added in #33779 [ci skip]bogdanvlviv2018-09-031-1/+1
| | | | | | | | Related to #33773
* | Formatting CHANGELOGs [ci skip]Ryuta Kamizono2018-09-071-4/+4
|/ | | | Fixing code block rendering, indentation, backticks, etc.
* Update changelog with null_store defaultMichael Nelson2018-09-021-0/+4
| | | | [ci skip]
* Emit warning for unknown inflection rule when generating model.Yoshiyuki Kinjo2018-08-311-0/+4
| | | | | | For words like "abuse", Rails cannot derive its singular form from plural form "abuses" without defining custom inflection rule. `rails generate model` and its families now emit warning for this case.
* Add migrations_paths option to migration generatorEileen Uchitelle2018-08-301-0/+15
| | | | | | | | | | | | | Adds an option to the migration generator to allow setting the migrations paths for that migration. This is useful for applications that use multiple databases and put migrations per database in their own directories. ``` bin/rails g migration CreateHouses address:string --migrations-paths=db/kingston_migrate invoke active_record create db/kingston_migrate/20180830151055_create_houses.rb ```
* Make `rake routes` deprecate before deletingyuuji.yaginuma2018-08-201-0/+4
| | | | | | | `rake routes` was a public task. Therefore, I think that we should deprecate it before deleting it. Related to #32121.
* [ci skip] Add deprecration of to CHANGELOGAnnie-Claude Côté2018-08-161-0/+4
|
* Merge pull request #33559 from anniecodes/dev-taskKasper Timm Hansen2018-08-151-0/+4
|\ | | | | Move `dev:cache` rake task to use Rails::Command
| * Update Changelog to add deprecation to `rake dev:cache`Annie-Claude Côté2018-08-131-0/+4
| |
* | Fix broken list formatting [ci skip]yuuji.yaginuma2018-08-151-4/+4
|/
* Add deprecations related to `rails notes` command to ChangelogAnnie-Claude Côté2018-07-091-0/+19
| | | | | | | * SOURCE_ANNOTATION_DIRECTORIES deprecation * Deprecation of `rake notes`, use `rails notes` instead * Deprecation of `rails notes:custom ANNOTATION=custom`, `rails notes:optimize`, `rails notes:todo`, and `rails notes:fixme` in favor of passing `-annotations` or `-a` to `rails notes` * They have all been deprecrated in https://github.com/rails/rails/pull/33220
* Don't generate yarn's contents in `app:update` task if it's skippedTsukuru Tanimichi2018-05-161-0/+2
|
* Don't generate `config/spring.rb` in `app:update` task when spring isn't loadedTsukuru Tanimichi2018-05-131-1/+5
|
* Don't generate assets' initializer in `app:update` task if sprockets is skippedTsukuru Tanimichi2018-05-051-0/+4
| | | | | | | | | | | | | | | | Execute `rails new myapp -S` and then upgrade the app by using the `app:update` task, `bin/rails c` results in `NoMethodError`. ``` $ bin/rails app:update $ bin/rails c Traceback (most recent call last): 44: from bin/rails:4:in `<main>' (snip) 1: from /Users/tanimichi.tsukuru/ghq/github.com/moneyforward/moneyplus/config/initializers/assets.rb:4:in `<top (required)>' /Users/tanimichi.tsukuru/ghq/github.com/moneyforward/moneyplus/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/lib/rails/railtie/configuration.rb:97:in `method_missing': undefined method `assets' for #<Rails::Application::Configuration:0x00007fcb8d3697e0> (NoMethodError) Did you mean? asset_host ```
* Make the master.key readable only by the ownerJose Luis Duran2018-04-191-0/+17
| | | | | | | | | | | | | | This change may only apply to POSIX-compliant systems. Previously: $ ls -l config/master.key -rw-r--r-- 1 owner group 32 Jan 1 00:00 master.key Now: $ ls -l config/master.key -rw------- 1 owner group 32 Jan 1 00:00 master.key
* Deprecate support for using `HOST` environment to specify server IP (#32540)Yuji Yaginuma2018-04-161-0/+8
| | | | | | | | | | | | At SuSE, `$HOST` is set by default and is equal to `$HOSTNAME`. https://www.suse.com/documentation/sled11/book_sle_admin/data/sec_adm_variables.html Therefore, by default, it binds to hostname instead of `localhost`. This seems not to be appropriate as default behavior. In order to avoid the name of the environment variable being used, I changed the environment variable from `HOST` to `BINDING`. Fixes #29516.
* Remove changelog header for unreleased versionRafael Mendonça França2018-03-131-2/+0
| | | | | | We only add the header when releasing to avoid some conflicts. [ci skip]
* Introduce explicit rails server handler optionGenadi Samokovarov2018-03-041-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I mistype `rails server production` instead of `rails server -e production` expecting to lunch a server in the production environment all the time. However, the signature of `rails server --help` is: ``` Usage: rails server [puma, thin etc] [options] ``` This means that the `production` argument is being interpreted as a Rack server handler like Puma, Thin or Unicorn. Should we argue for the `rails server production`? I'm not sure of the reasons, but the `rails console production` behavior was deprecated in: https://github.com/rails/rails/pull/29358, so parity with the existing `rails console production` usage may not hold anymore. In any case, this PR introduces an explicit option for the Rack servers configuration. The option is called `--using` (or `-u` for short) to avoid the `rails server --server` tantrum. The new interface of `rails server` is: ``` Usage: rails server [using] [options] Options: -p, [--port=port] # Runs Rails on the specified port - defaults to 3000. -b, [--binding=IP] # Binds Rails to the specified IP - defaults to 'localhost' in development and '0.0.0.0' in other environments'. -c, [--config=file] # Uses a custom rackup configuration. # Default: config.ru -d, [--daemon], [--no-daemon] # Runs server as a Daemon. -e, [--environment=name] # Specifies the environment to run this server under (development/test/production). -u, [--using=name] # Specifies the Rack server used to run the application (thin/puma/webrick). -P, [--pid=PID] # Specifies the PID file. # Default: tmp/pids/server.pid -C, [--dev-caching], [--no-dev-caching] # Specifies whether to perform caching in development. [--early-hints], [--no-early-hints] # Enables HTTP/2 early hints. ``` As a bonus, if you mistype the server to use, you'll get an auto-correction message: ``` $ rails s tin Could not find handler "tin". Maybe you meant "thin" or "cgi"? Run `rails server --help` for more options. ```
* Add --expanded option to "rails routes"Benoit Tigeot2018-02-281-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | When using rails routes with small terminal or complicated routes it can be very difficult to understand where is the element listed in header. psql had the same issue, that's why they created "expanded mode" you can switch using `\x` or by starting psql with ``` -x --expanded Turn on the expanded table formatting mode. This is equivalent to the \x command. ``` The output is similar to one implemented here for rails routes: db_user-# \du List of roles -[ RECORD 1 ]---------------------------------------------- Role name | super Attributes | Superuser, Create role, Create DB Member of | {} -[ RECORD 2 ]---------------------------------------------- Role name | role Attributes | Superuser, Create role, Create DB, Replication Member of | {}
* Remove changelogs for Rails 6.0 since they were backported to `5-2-stable`bogdanvlviv2018-02-261-8/+0
| | | | | | | | | | | | | | | | Remove railties' changelog added by 7340596de45dc4c0f62a287b6acc4e71d8ee6c60 since it was backported to `5-2-stable` via ac99916fcf7bf27bb1519d4f7387c6b4c5f0463d Remove activesupport's changelog added by 1077ae96b34b5a1dfbf10ee0c40b1ceb1eb6b30b since it was backported to `5-2-stable` via a2b97e4ffef971607a1be8fc7909f099b6840f36 Remove activesupport's changelog added by 0d41a76d0c693000005d79456dee7f9299f5e8d4 since it was backported to `5-2-stable` via cdce6a709e1cbc98fff009effc3b1b3ce4c7e8db Remove activestorage's changelog added by d57c52a385eb57c6ce8c6d124ab5e186f931d142 since it was backported to `5-2-stable` via 5292cdf59a2052c453d6016c69b90b790cbf2547 Follow up c113bdc9d0c2cffd535ca97aff85c4bdc46b11f6
* Rails 6 requires Ruby 2.4.1+Jeremy Daer2018-02-171-0/+7
| | | | | | Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
* Fix changelog entry [ci skip]Rafael Mendonça França2018-02-161-1/+7
|
* Add SuppressedSummaryReporter and TestUnitReporter only if necessaryKevin Robatel2018-02-151-1/+1
|
* Start Rails 6.0 development!!!Rafael Mendonça França2018-01-301-162/+1
| | | | :tada::tada::tada:
* Improve the deprecation message for using subclass of Rails::Application to ↵Prathamesh Sonpatki2018-01-071-1/+1
| | | | start the Rails server
* Preparing for 5.2.0.beta2 releaseRafael Mendonça França2017-11-281-0/+5
|
* Preparing for 5.2.0.beta1 releaseRafael Mendonça França2017-11-271-0/+2
|
* Deprecate an `after_bundle` callback in Rails plugin templatesyuuji.yaginuma2017-11-181-0/+4
| | | | | | | | | Since fbd1e98cf983572ca9884f17f933ffe92833632a, Rails plugin does not run `bundle install` when generating. Therefore, `after_bundle` callback is not actually executed after `bundle`. Since there is a difference between the name and the actual behavior, I think that should be remove.
* Add --skip-active-storage and do so automatically when --skip-active-record ↵bogdanvlviv2017-11-061-0/+6
| | | | | | | | | | | | is used Closes #30102 Revert part 787fe90dc0a7c5b91bb5af51f2858ea8c4676268 --skip-active-storage pass throughs `rails plugin new` Add changelog entry about default initialization of Active Storage
* redis-rb 4.0 supportJeremy Daer2017-10-081-0/+4
| | | | | | | | * Use `gem 'redis', '~> 4.0'` for new app Gemfiles * Loosen Action Cable redis-rb dep to `>= 3.3, < 5` * Bump redis-namespace for looser Redis version dep * Avoid using the underlying `redis.client` directly * Use `Redis.new` instead of `Redis.connect`
* Add `mini_magick` to default `Gemfile` as commentYoshiyuki Hirano2017-09-171-0/+4
| | | | | | * If we want to transform image on ActiveStorage, we should bundle `mini_magick`. * I've added comment block to default `Gemfile` to be easier to install this.