aboutsummaryrefslogtreecommitdiffstats
path: root/railties
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Include `ActiveSupport::Testing::MethodCallAssertions` in ↵bogdanvlviv2018-06-092-2/+2
| |_|/ |/| | | | | | | | | | | | | | `railties/test/isolation/abstract_unit.rb` Related to #33102
* | | Remove unnecessary testyuuji.yaginuma2018-06-032-8/+2
| |/ |/| | | | | | | Since #32289, `Spellchecker.suggest` returns only one value, multiple suggestions not output.
* | Merge pull request #30406 from eliotsykes/reduce-spring-watch-callsRafael Mendonça França2018-05-231-6/+6
|\ \ | | | | | | | | | Minimize Spring.watch calls
| * | Minimize Spring.watch callsEliot Sykes2017-08-251-6/+6
| | |
* | | Enable warnings in all test tasksutilum2018-05-231-1/+1
| | | | | | | | | | | | Also normalize AJ task use t, like all other Rails test tasks.
* | | Merge pull request #32699 from printercu/patch-3Rafael França2018-05-221-1/+7
|\ \ \ | | | | | | | | Respect NODE_ENV when running `rails yarn:install`
| * | | Respect NODE_ENV when running `rails yarn:install`printercu2018-04-231-1/+7
| | |/ | |/| | | | | | | | | | | | | `yarn install --prod` removes dev deps, so it's impossible to run `assets:precompile` with dev npm dependencies. This change makes rake task pass NODE_ENV to yarn when explicitly set.
* | | Bump minimum version of Thor to 0.19.0Guillermo Iguaran2018-05-221-1/+1
| | | | | | | | | | | | Thor 0.18 is causing failures in all the generator tests.
* | | Merge pull request #32934 from aki77/fix-locale-selectorRafael França2018-05-221-7/+10
|\ \ \ | | | | | | | | Fix locale selector to email preview
| * | | Fix locale selectoraki2018-05-191-7/+10
| | | |
* | | | Enable `Lint/StringConversionInInterpolation` rubocop ruleRyuta Kamizono2018-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | To prevent redundant `to_s` like https://github.com/rails/rails/pull/32923#discussion_r189460008 automatically in the future.
* | | | Add test case that configure ↵yuuji.yaginuma2018-05-201-0/+17
|/ / / | | | | | | | | | | | | | | | `config.action_view.finalize_compiled_template_methods` Follow up of #32418.
* | | Don't generate yarn's contents in `app:update` task if it's skippedTsukuru Tanimichi2018-05-164-3/+25
| | |
* | | Merge pull request #32837 from ttanimichi/app-update-skip-springYuji Yaginuma2018-05-143-1/+17
|\ \ \ | | | | | | | | Don't generate `config/spring.rb` in `app:update` task when spring isn't loaded
| * | | Don't generate `config/spring.rb` in `app:update` task when spring isn't loadedTsukuru Tanimichi2018-05-133-1/+17
| | | |
* | | | Fix `CustomCops/AssertNot` to allow it to have failure messageRyuta Kamizono2018-05-133-3/+3
| | | | | | | | | | | | | | | | Follow up of #32605.
* | | | Remove unused `remove_file` methodTsukuru Tanimichi2018-05-081-4/+0
|/ / / | | | | | | | | | | | | | | | In #32780, We have supported the `--skip-sprockets` option in the `app:update` task. When `options[:api]` is truthy, `option[:skip_sprockets]` is also truthy. So we can remove this `remove_file` method. https://github.com/rails/rails/blob/42b9e7e50c084e119a679cf155b70b5efc4d36ff/railties/lib/rails/generators/rails/app/app_generator.rb#L281-L283
* | | Skip `bootsnap` contents in `app:update` task if `bootsnap` is not usedyuuji.yaginuma2018-05-072-0/+14
| | |
* | | prefer File.write for bulk writesXavier Noria2018-05-052-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I saw these ones while working on #32362. File.write was introduced in Ruby 1.9.3 and it is the most concise way to perform bulk writes (as File.read is for bulk reading). The existing flags enabled binmode, but we are dumping text here. The portable way to dump text is text mode. The only difference is newlines, and portable code should in particular emit portable newlines. Please note the hard-coded \ns are still correct. In languages with C semantics for newlines like Ruby, Python, Perl, and others, "\n" is a portable newline. Both when writing and when reading. On Windows, the I/O layer is responsible for prepending a CR before each LF on writing, and removing CRs followed by LFs on reading. On Unix, binmode is a no-op.
* | | Merge pull request #32780 from ttanimichi/tmpYuji Yaginuma2018-05-054-1/+22
|\ \ \ | | | | | | | | Don't generate assets' initializer in `app:update` task if sprockets is skipped
| * | | Don't generate assets' initializer in `app:update` task if sprockets is skippedTsukuru Tanimichi2018-05-054-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* | | | Partly revert #32289 to provide Rails' custom fallback in caseutilum2018-05-011-2/+49
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `DidYouMean::SpellChecker` is not defined. `did_you_mean` is bundled in Ruby but can be uninstalled, and is not always available, sometimes even on our CI: https://travis-ci.org/rails/rails/jobs/372638523#L2405 https://travis-ci.org/rails/rails/jobs/372638523#L2416 https://travis-ci.org/rails/rails/jobs/372638523#L2427 ...
* | | Swap assertion order for better reportingutilum2018-04-291-1/+1
| | | | | | | | | | | | `assert_directory("test/system")` may pass even if `assert_file("test/system/.keep")` fails.
* | | Add a helper method to check that gem does not exist in `Gemfile`yuuji.yaginuma2018-04-251-49/+26
| | |
* | | Fix test method nameyuuji.yaginuma2018-04-251-2/+2
| | | | | | | | | | | | We don't use `mini_magick` directly since #32471.
* | | Merge pull request #32471 from janko-m/use-image_processing-gemGeorge Claghorn2018-04-232-3/+3
|\ \ \ | |/ / |/| | Use ImageProcessing gem for ActiveStorage variants
| * | Use ImageProcessing gem for ActiveStorage variantsJanko Marohnić2018-04-182-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ImageProcessing gem is a wrapper around MiniMagick and ruby-vips, and implements an interface for common image resizing and processing. This is the canonical image processing gem recommended in [Shrine], and that's where it developed from. The initial implementation was extracted from Refile, which also implements on-the-fly transformations. Some features that ImageProcessing gem adds on top of MiniMagick: * resizing macros - #resize_to_limit - #resize_to_fit - #resize_to_fill - #resize_and_pad * automatic orientation * automatic thumbnail sharpening * avoids the complex and inefficient MiniMagick::Image class * will use "magick" instead of "convert" on ImageMagick 7 However, the biggest feature of the ImageProcessing gem is that it has an alternative implementation that uses libvips. Libvips is an alternative to ImageMagick that can process images very rapidly (we've seen up 10x faster than ImageMagick). What's great is that the ImageProcessing gem provides the same interface for both implementations. The macros are named the same, and the libvips implementation does auto orientation and thumbnail sharpening as well; only the operations/options specific to ImageMagick/libvips differ. The integration provided by this PR should work for both implementations. The plan is to introduce the ImageProcessing backend in Rails 6.0 as the default backend and deprecate the MiniMagick backend, then in Rails 6.1 remove the MiniMagick backend.
* | | Merge pull request #32686 from yhirano55/fix-indentation-with-rubocopRyuta Kamizono2018-04-221-1/+1
|\ \ \ | | | | | | | | Fix indentation manually
| * | | Fix indentation manuallyYoshiyuki Hirano2018-04-221-1/+1
| | | | | | | | | | | | | | | | Rubocop auto-correct doesn't work well, so I fixed indentation manually.
* | | | Merge pull request #31554 from fatkodima/controller_generator_suffixGuillermo Iguaran2018-04-222-1/+33
|\ \ \ \ | | | | | | | | | | Gracefully handle extra "controller" when generating controller
| * | | | Gracefully handle extra "controller" when generating controllerfatkodima2018-03-232-1/+33
| | | | |
* | | | | Strip duplicated suffixes more strictlyRyuta Kamizono2018-04-223-3/+3
| | | | | | | | | | | | | | | | | | | | In the previous code incorrectly removes intermediate words.
* | | | | Merge pull request #32685 from yhirano55/fix-duplicated-suffix-for-job-generatorRyuta Kamizono2018-04-222-0/+15
|\ \ \ \ \ | | | | | | | | | | | | Fix duplicated suffix for JobGenerator
| * | | | | Fix duplicated suffix for JobGeneratorYoshiyuki Hirano2018-04-222-0/+15
| | |/ / / | |/| | |
* / | | | Add test case to ChannelGeneratorTestYoshiyuki Hirano2018-04-221-0/+10
|/ / / / | | | | | | | | | | | | * Add a test case to ensure avoid duplicated suffix in channel generator
* | | | Don't include bootsnap by default in apps generated under JRubyGuillermo Iguaran2018-04-202-4/+13
| | | |
* | | | [ci skip] Prefix class name with Rails:: in docsAlberto Almagro2018-04-201-3/+3
| | | | | | | | | | | | | | | | | | | | After renaming and deprecation of SourceAnnotationExtractor documentation has been updated to reflect the new name Rails::SourceAnnotationExtractor
* | | | [ci skip] Improve #find_in documentation.Alberto Almagro2018-04-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous documentation version listed only the default registered extensions. This was misleading because if more extensions get registered with <tt>SourceAnnotationExtractor::Annotation.register_extensions</tt>, they would be also taken into account. By saying that we consider all registered extensions we document what happens in reality.
* | | | Fix typo on method nameAlberto Almagro2018-04-201-1/+1
| | | |
* | | | Create a .ruby-version compatible with MRI/JRuby by defaultGuillermo Iguaran2018-04-192-2/+2
| | | |
* | | | [ci skip] Restore of links in RDOC_MAIN after an update of the file (#32644)Felipe Tovar2018-04-191-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ci skip] Update links in RDOC_MAIN and remove style of word rails in README * [ci skip] Update links in RDOC_MAIN and remove style of word rails in README [Felipe Tovar & Rafael Mendonça França]
* | | | Merge pull request #32605 from composerinteralia/assert-notRafael França2018-04-1913-37/+37
|\ \ \ \ | | | | | | | | | | Add RuboCop for `assert_not` over `assert !`
| * | | | Replace `assert !` with `assert_not`Daniel Colson2018-04-1913-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | This autocorrects the violations after adding a custom cop in 3305c78dcd.
* | | | | Merge pull request #32626 from ftovaro/masterXavier Noria2018-04-191-22/+29
|\ \ \ \ \ | | | | | | | | | | | | [ci skip] Update README and RDOC_MAIN
| * | | | | [ci skip] Remove style of the word Rails at the topFelipe Tovar2018-04-191-1/+1
| | | | | |
| * | | | | [ci skip] update RDOC_MAINFelipe Tovar2018-04-191-23/+30
| |/ / / /
* / / / / Make the master.key readable only by the ownerJose Luis Duran2018-04-193-0/+27
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Fix test to allow IF NOT EXISTS in structure:dumputilum2018-04-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: ``` $ ruby -v ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux] $ ruby -w -Itest -Ilib -I../activesupport/lib -I../actionpack/lib -I../actionview/lib -I../activemodel/lib test/application/rake/multi_dbs_test.rb Run options: --seed 28744 F Failure: ApplicationTests::RakeTests::RakeMultiDbsTest#test_db:migrate_and_db:structure:dump_and_db:structure:load_works_on_all_databases [test/application/rake/multi_dbs_test.rb:70]: Expected /CREATE TABLE \"books\"/ to match "CREATE TABLE IF NOT EXISTS \"schema_migrations\" (\"version\" varchar NOT NULL PRIMARY KEY);\nCREATE TABLE IF NOT EXISTS \"ar_internal_metadata\" (\"key\" varchar NOT NULL PRIMARY KEY, \"value\" varchar, \"created_at\" datetime NOT NULL, \"updated_at\" datetime NOT NULL);\nCREATE TABLE IF NOT EXISTS \"books\" (\"id\" integer PRIMARY KEY AUTOINCREMENT NOT NULL, \"title\" varchar, \"created_at\" datetime NOT NULL, \"updated_at\" datetime NOT NULL);\nCREATE TABLE sqlite_sequence(name,seq);\nINSERT INTO \"schema_migrations\" (version) VALUES\n('20180416201805');\n\n\n". ```
* | | | Deprecate support for using `HOST` environment to specify server IP (#32540)Yuji Yaginuma2018-04-163-3/+35
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Add .keep exception for storage folderPaul2018-04-131-1/+4
| | | | | | | | | Fixes https://github.com/rails/rails/issues/32546 by including the `.keep` file in the .gitignore, bringing the `storage` folder in line with the `tmp` and `log` folders.