aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "only install ffmpeg and mupdf on activestorage builds"Yasuo Honda2017-12-121-1/+4
| | | | This reverts commit 6ec0ed67d9afcc666ad0424b10e9903f63e60714.
* Merge pull request #31414 from fatkodima/ignore_tables-commentRyuta Kamizono2017-12-121-1/+1
|\ | | | | Remove stale comment about `ActiveRecord::SchemaDumper.ignore_tables` [skip ci]
| * Remove stale comment about `ActiveRecord::SchemaDumper.ignore_tables` [skip ci]fatkodima2017-12-121-1/+1
|/
* Enable `Layout/SpaceBeforeComma` rubocop rule, and fixed moreRyuta Kamizono2017-12-1224-43/+46
| | | | Follow up of #31390.
* Merge pull request #31411 from eugeneius/time_helpers_redefine_methodRyuta Kamizono2017-12-121-1/+2
|\ | | | | Prevent race condition when resetting time stubs
| * Prevent race condition when resetting time stubsEugene Kenny2017-12-121-1/+2
| | | | | | | | | | | | | | | | | | If the current thread is preempted after the stub has been removed but before the original method has been restored, then the other thread will get a `NoMethodError` when it tries to call the method. Using `silence_redefinition_of_method` instead of `undef_method` ensures that either the stub or the original method is always in place.
* | Merge pull request #31410 from swrobel/patch-3Ryuta Kamizono2017-12-121-1/+1
|\ \ | |/ |/| Fix secrets command deprecation message
| * Fix secrets command deprecation messageStefan Wrobel2017-12-111-1/+1
| |
* | Merge pull request #31402 from yhirano55/update_routing_guide_for_direct_methodRyuta Kamizono2017-12-121-0/+43
|\ \ | |/ |/| [ci skip] Update routing guide for Direct & resolved routes
| * [ci skip] Update routing guide for DirectYoshiyuki Hirano2017-12-121-0/+43
| | | | | | | | * Added the direct method to routing guide.
* | Fix optimizing GIF variants using mogrify's -layers optionGeorge Claghorn2017-12-111-5/+7
| |
* | Revert "Invoke mogrify once when transforming an image"George Claghorn2017-12-111-8/+6
| | | | | | | | This reverts commit a80f81af055f02bf4625c90470aa90441cf6fc24.
* | Merge pull request #31407 from Edouard-chin/remove-create-fixtures-helperRafael França2017-12-111-4/+0
|\ \ | | | | | | `create_fixtures` doesn't work since at least a94220b
| * | `create_fixtures` doesn't work since at least ↵Edouard CHIN2017-12-111-4/+0
| | | | | | | | | | | | | | | | | | | | | a94220b66c9e4890007f66b092b25f8a64a19d31: - The namespacing should be `ActiveRecord::FixtureSet` - I might be missing something but I'm not sure why `create_fixtures` is useful for nowaday (unless for testing rails internal /shrug) and since it's been that long it wasn't working I think it should be fine to just fire it
* | | Merge pull request #31399 from yhirano55/return_nil_if_raise_http_errorGeorge Claghorn2017-12-111-1/+1
|\ \ \ | | | | | | | | Return `nil` instead of `false` if raise `Azure::Core::Http::HTTPError`
| * | | Return `nil` instead of `false` if raise `Azure::Core::Http::HTTPError`Yoshiyuki Hirano2017-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * If it raise error `Azure::Core::Http::HTTPError`, return `nil` instead of `false` in `ActiveStorage::Service::AzureStorageService#delete`. * Other services behave as same as this.
* | | | Merge pull request #31401 from ↵George Claghorn2017-12-111-0/+7
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | yhirano55/update_instrumentation_guide_for_active_storage_service [ci skip] Update instrumentation guide for ActiveStorage
| * | | [ci skip] Update instrumentation guide for ActiveStorageYoshiyuki Hirano2017-12-121-0/+7
| | |/ | |/| | | | | | | * Added `service_delete_prefixed.active_storage`.
* / | Invoke mogrify once when transforming an imageGeorge Claghorn2017-12-111-6/+8
|/ / | | | | | | Execute a single mogrify command with multiple options rather than one command per option. Permit the use of all mogrify options, not just the ones that fall through to MiniMagick::Image#method_missing.
* | Merge pull request #30361 from mfo/masterEileen M. Uchitelle2017-12-114-1/+25
|\ \ | | | | | | StreamingTemplateRenderer fails to forward I18n.locale in layouts
| * | fix(streaming_template_renderer): I18n.locale broken in layout. I18n gem ↵mfo2017-11-254-1/+25
| | | | | | | | | | | | stores the current locale in Thread.current[:local] (see: https://github.com/svenfuchs/i18n/blob/master/lib/i18n.rb#L23). StreamingTemplateRenderer is implemented with Fiber which have its own stack of locals and can not access Thread.current.locals(keys, see: https://ruby-doc.org/core-2.2.0/Thread.html#class-Thread-label-Fiber-local+vs.+Thread-local).
* | | Merge pull request #31389 from yhirano55/webpack_config_in_active_storageJavan Makhmali2017-12-111-1/+0
|\ \ \ | | | | | | | | `webpack` is assigned but never used in webpack.config.js
| * | | `webpack` is assigned but never used in webpack.config.jsYoshiyuki Hirano2017-12-111-1/+0
| | |/ | |/| | | | | | | * Removed webpack const, so it is assigned but never used in webpack.config.js.
* | | Merge pull request #31390 from lonre/patch-1Eileen M. Uchitelle2017-12-101-1/+1
|\ \ \ | |/ / |/| | Remove whitespace
| * | Update validates.rbLonre Wang2017-12-101-1/+1
|/ /
* | Reset schema cache after testyuuji.yaginuma2017-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, `test_copy_table_with_composite_primary_keys` test fails depending on execution order. The reproduction step is as follows. ``` $ ARCONN=sqlite3_mem bin/test -w -n "/^(?:CalculationsTest#(?:test_#skip_query_cache\\!_for_a_simple_calculation)|PrimaryKeyAnyTypeTest#(?:test_any_type_primary_key)|ActiveRecord::ConnectionAdapters::SQLite3AdapterTest#(?:test_copy_table_with_composite_primary_keys))$/" --seed 41545 ``` The column info is cached by `PrimaryKeyAnyTypeTest#test_any_type_primary_key`, and the test seems to have failed due to the influence. So clear cache after testing so as not to affect other tests. Related: https://travis-ci.org/rails/rails/jobs/313730163#L1788
* | Merge pull request #31384 from rails/dont-override-serverGuillermo Iguaran2017-12-093-2/+24
|\ \ | | | | | | Change the system tests to set Puma as default server only when the user haven't specified manually another server.
| * | Change the system tests to set Puma as default server only when the user ↵Guillermo Iguaran2017-12-093-2/+24
|/ / | | | | | | haven't specified manually another server.
* | Add secure `X-Download-Options` and `X-Permitted-Cross-Domain-Policies` to ↵Guillermo Iguaran2017-12-094-4/+15
| | | | | | | | default headers set.
* | Merge pull request #31379 from bogdanvlviv/ci-against-jruby_9_1_15Ryuta Kamizono2017-12-091-3/+3
|\ \ | | | | | | CI against JRuby 9.1.15.0
| * | CI against JRuby 9.1.15.0bogdanvlviv2017-12-081-3/+3
| | | | | | | | | | | | | | | JRuby 9.1.15.0 has been released: http://jruby.org/2017/12/07/jruby-9-1-15-0.html
* | | Merge pull request #31354 from maciej-ka/docs-link_to-nil-name-exampleClaudio B2017-12-081-0/+5
|\ \ \ | | | | | | | | docs: add example for a nil name in link_to
| * | | docs: add example for a nil name in link_tomaciej-ka2017-12-071-0/+5
| | | |
* | | | Merge pull request #31355 from rails/fix-rails-env-with-rubyAaron Patterson2017-12-085-3/+82
|\ \ \ \ | |_|/ / |/| | | Fix Rails environment when running tests with Ruby
| * | | Set the Rails environment from an environment variableAaron Patterson2017-12-082-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Option parsing happens too late to have any impact on the Rails environment. Rails accesses the environment name and memoizes it too early in the boot process for a commandline option to have any impact on the database connection, so we'll change this test to set the environment from an environment variable (and ensure it still works when running tests with `ruby`)
| * | | Revert "remove unnecessary `RAILS_ENV` setting"Aaron Patterson2017-12-082-0/+4
| | | | | | | | | | | | | | | | This reverts commit 9a80f52541ed2c93ebef02909ecab3aaf9127150.
| * | | Add failing test for wrong database connectionAaron Patterson2017-12-081-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | When tests are run with just `ruby`, the RAILS_ENV is set to `development` too early, and we connect to the development database rather than the test database.
| * | | Fix Rails environment when running tests with RubyAaron Patterson2017-12-063-3/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I frequently run tests with `ruby`, not with a runner like `rake` or `rails`. When running the test with just `ruby` the `RAILS_ENV` environment variable did not get set to "test", and this would cause the tests to fail (and even mutate the development database!) This commit adds integration tests for running tests with just `ruby` and ensures the environment gets defaulted to "test". I also added a test to ensure that passing an environment to `-e` actually works (and fixed that case too). An interesting / annoying thing is that Minitest picks up it's plugins by asking RubyGems for a list of files: https://github.com/seattlerb/minitest/blob/ca6a71ca901016db09a5ad466b4adea4b52a504a/lib/minitest.rb#L92-L100 This means that RubyGems needs to somehow know about the file before it can return it to Minitest. Since we are not packaging Rails as a Gem before running the integration tests on it (duh, why would you do that?), RubyGems doesn't know about the file, so it can't tell Minitest, so Minitest doesn't automatically require it. This means I had to manually require and insert the plugin in our integration test. I've left comments about that in the test as well. Ugh.
* | | | Swap raw video width and height if angle is 90 or 270 degreesGeorge Claghorn2017-12-082-3/+15
| | | |
* | | | SQLite: Fix `copy_table` with composite primary keysRyuta Kamizono2017-12-082-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `connection.primary_key` also return composite primary keys, so `from_primary_key_column` may not be found even if `from_primary_key` is presented. ``` % ARCONN=sqlite3 be ruby -w -Itest test/cases/adapters/sqlite3/sqlite3_adapter_test.rb -n test_copy_table_with_composite_primary_keys Using sqlite3 Run options: -n test_copy_table_with_composite_primary_keys --seed 19041 # Running: E Error: ActiveRecord::ConnectionAdapters::SQLite3AdapterTest#test_copy_table_with_composite_primary_keys: NoMethodError: undefined method `type' for nil:NilClass /path/to/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:411:in `block in copy_table' ``` This change fixes `copy_table` to do not lose composite primary keys.
* | | | Merge pull request #30780 from ↵Sean Griffin2017-12-072-0/+23
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | JackMc/fix-chrome-referrer-invalidauthenticitytoken Fix issue #30658 by checking explicitly for 'null' referrer
| * | | | Add a better error message when a "null" Origin header occursJack McCracken2017-11-032-0/+23
| | | | |
* | | | | Fix customizing Content-Type via GCS service URLsGeorge Claghorn2017-12-072-1/+21
| | | | |
* | | | | Merge pull request #31365 from ↵Eileen M. Uchitelle2017-12-077-4/+42
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | bogdanvlviv/add-headless_firefox-driver-to-system_tests Add headless firefox driver to System Tests
| * | | | | Add headless firefox driver to System Testsbogdanvlviv2017-12-077-4/+42
| | | | | |
* | | | | | Fix `scope_for_create` to do not lose polymorphic associationsRyuta Kamizono2017-12-083-3/+26
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This regression was caused at 213796fb due to polymorphic predicates are combined by `Arel::Nodes::And`. But I'd like to keep that combined because it would help inverting polymorphic predicates correctly (e9ba12f7), and we can collect equality nodes regardless of combined by `Arel::Nodes::And` (`a AND (b AND c) AND d` == `a AND b AND c AND d`). This change fixes the regression to collect equality nodes in `Arel::Nodes::And` as well. Fixes #31338.
* | | | | Merge pull request #31327 from aellispierce/custom-id-change-table-sqliteEileen M. Uchitelle2017-12-072-1/+23
|\ \ \ \ \ | | | | | | | | | | | | Fix sqlite migrations with custom primary keys
| * | | | | Fix sqlite migrations with custom primary keysAshley Ellis Pierce2017-12-062-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if a record was created with a custom primary key, that table could not be migrated using sqlite. While attempting to copy the table, the type of the primary key was ignored. Once that was corrected, copying the indexes would fail because custom primary keys are autoindexed by sqlite by default. To correct that, this skips copying the index if the index name begins with "sqlite_". This is a reserved word that indicates that the index is an internal schema object. SQLite prohibits applications from creating objects whose names begin with "sqlite_", so this string should be safe to use as a check. ref https://www.sqlite.org/fileformat2.html#intschema
* | | | | | Merge pull request #31358 from ↵Andrew White2017-12-071-5/+5
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | yhirano55/made_example_codes_inherit_application_record [ci skip] Make `Todo` classes inherit `ApplicationRecord`
| * | | | | [ci skip] Make Todo classes inherit ApplicationRecordYoshiyuki Hirano2017-12-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example codes that use `has_many` or `before_create` in `Module::Concerning` look like active record models. So I've made them inherit `ApplicationRecord`.