aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Add missing requireyuuji.yaginuma2018-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this require, an error occurs when executing only `duration_test.rb`. Ref: https://travis-ci.org/rails/rails/jobs/338817558#L2205-L2210
* | | | | | Do not add master key when `RAILS_MASTER_KEY` env specified (#31922)Yuji Yaginuma2018-02-084-2/+27
| | | | | | | | | | | | | | | | | | Fixes #31917
* | | | | | Merge pull request #31918 from huacnlee/fix/blob-service-url-for-string-filenameGeorge Claghorn2018-02-073-1/+13
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Fix `blob.service_url` for supports string type `:filename` option
| * | | | | Fix `blob.service_url` for supports string or nil `:filename` option.Jason Lee2018-02-083-1/+13
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make sure `blob.service_url` present a `ActiveStorage::Filename` type to `serivce.url`. - Add `ActiveStorage::Filename.wrap` method. before: ```rb blob.service_url(filename: ActiveStorage::Filename.new("new.txt")) blob.service_url(filename: "new.txt") => NoMethodError: undefined method `parameters' for "new.txt":String params = {} blob.service_url(filename: params[:filename]) => NoMethodError: undefined method `parameters' for nil:NilClass ``` after: ```rb blob.service_url(filename: "new.txt") blob.service_url(filename: nil) ```
* | | | | Merge pull request #31923 from jdelStrother/duration-deserializationRafael França2018-02-072-0/+14
|\ \ \ \ \ | | | | | | | | | | | | Fix yaml deserialization of ActiveSupport::Duration
| * | | | | Fix yaml deserialization of ActiveSupport::DurationJonathan del Strother2018-02-072-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures the duration's @parts hash has a default value, to avoid this regression introduced in 5.1: YAML.load(YAML.dump(10.minutes)) + 1 # => NoMethodError: undefined method `+' for nil:NilClass
* | | | | | Bump `minitest-server`yuuji.yaginuma2018-02-071-2/+2
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | In order to use `minitest_bisect` with Minitest 5.11.x, it needs to be updated. Ref: https://github.com/seattlerb/minitest-server/issues/2
* | | | | Revert "✂️"Ryuta Kamizono2018-02-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 487a1061cc496455dfe5ee84d1e49d509c1675b5. This `#--` is necessary for the doc of `distinct`. [ci skip]
* | | | | ✂️schneems2018-02-061-2/+1
| | | | |
* | | | | Merge pull request #31914 from utilum/bump_em-socksifyMatthew Draper2018-02-071-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Update em-socksify to the latest version
| * | | | | Update em-socksify to the latest versionutilum2018-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Avoid warning: parentheses after method name is interpreted as an argument list, not a decomposed argument
* | | | | | Merge pull request #31912 from robin850/upgrade-sdoc-1-0Matthew Draper2018-02-072-11/+5
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Refer to a stable release of SDoc
| * | | | | Refer to a stable release of SDocRobin Dupret2018-02-062-11/+5
|/ / / / /
* | | | | Merge pull request #31880 from ↵Javan Makhmali2018-02-063-3/+13
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | rmacklin/publish-activestorage-source-in-addition-to-compiled-js Include source code in published activestorage npm package
| * | | | | Include source code in published activestorage npm packageRichard Macklin2018-02-063-3/+13
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows activestorage users to ship smaller javascript bundles to visitors using modern browsers, as demonstrated in this repository: https://github.com/rmacklin/activestorage-es2015-build-example In that example, the bundle shrinks by 5K (24%). In addition to allowing smaller bundles for those who ship untranspiled code to modern browsers, including the source code in the published package can be useful in other ways: 1. Users can import individual modules rather than the whole library 2. As a result of (1), users can also monkey patch parts of activestorage by importing the relevant module, modifying the exported object, and then importing the rest of activestorage (which would then use the patched object). Note: In order to allow the source code to be depended on rather than the compiled code, we have to declare the external dependency on spark-md5 as a regular dependency, not a development dependency. This means that even users who depend on the compiled code will have to download this package. However, spark-md5 is a small package, so this tradeoff seems worth it.
* | | | | Merge pull request #31240 from PHedkvist/sys_test_mobile_guideEileen M. Uchitelle2018-02-061-0/+28
|\ \ \ \ \ | | | | | | | | | | | | Example of multiple configurations for system test in guide [ci skip]
| * | | | | Example of mobile configuration for system test in guide [ci skip]Pierre Hedkvist2017-12-041-0/+28
| | | | | |
* | | | | | Invoke `load_schema` in `_default_attributes`Ryuta Kamizono2018-02-062-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently `_default_attributes` doesn't work unless `load_schema` is called before. The `MissingAttributeError` is caused by `reload_schema_from_cache` is invoked by `serialize`. I added `load_schema` in `_default_attributes` to `_default_attributes` works without any dependency like `attribute_types` etc. Closes #31905.
* | | | | | Use Redis#mget for RedisCacheStore#fetch_multifatkodima2018-02-052-0/+16
| | | | | |
* | | | | | Add missing instrumentation to RedisCacheStore#read_multifatkodima2018-02-057-18/+25
| | | | | |
* | | | | | Don't output information on drop if not verboseeileencodes2018-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to b988ecb, when I cherry-picked from my parallel testing branch I didn't realize `drop` wasn't part of the commit.
* | | | | | Add ability to turn off verbose for database taskseileencodes2018-02-051-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You could use the `VERBOSE` env var to turn off output for migrations tasks but you couldn't use it for other tasks. This change moves the `verbose?` check to a method so we can also use it in create and drop respectively. tenderlove and I noticed this as part of the ongoing work in parallel testing. When the parallel tests boot the app needs to create new databases for each worker. The output from these is unnecessary but there was previously no way to turn it off. Now if `VERBOSE=false` is passes to `bin/rails db:create` the text "Created blah blah db" will no longer be output.
* | | | | | Redis cache store: consolidate serializationJeremy Daer2018-02-041-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | Use `serialize_entry` throughout and introduce `serialize_entries`.
* | | | | | RedisCacheStore: fix `#write_multi` mset serializationfatkodima2018-02-042-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #31886 Fixes #31884
* | | | | | Make test runner work with AR test toolyuuji.yaginuma2018-02-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #29572, test runner will be loaded as minitest's plugin. Therefore, if specify a value in `Minitest.extensions` before the Minitest initialization process, the extension will not load and the test runner will not work. https://github.com/seattlerb/minitest/blob/44eee51ed9716c789c7cea8a90c131cf736b8915/lib/minitest.rb#L86 Also, load processing of adapter is done before minitest option processing, so set the adapter in the file so that the `-a` option works.
* | | | | | Prefer `@connection.abandon_results!` than `@connection.next_result while ↵Ryuta Kamizono2018-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | @connection.more_results?`
* | | | | | Add nodoc to `migrations_paths` and `migration_context` in `AbstractAdapter`Ryuta Kamizono2018-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are internally used only. [ci skip]
* | | | | | Merge pull request #31878 from timdiggins/corrections-to-31755Ryuta Kamizono2018-02-041-6/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct capitalization of "Rails" in guide text [ci skip]
| * | | | | | Correct capitalization of "Rails" in the guide text.Tim Diggins2018-02-031-6/+6
|/ / / / / / | | | | | | | | | | | | | | | | | | correction to #31755 as per https://github.com/rails/rails/pull/31755#discussion_r165819798
* | | | | | Merge pull request #28171 from sorra/fresh-thread-tagged-loggingRyuta Kamizono2018-02-031-1/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Improve test for TaggedLogging "keeps each tag in their own thread"
| * \ \ \ \ \ Merge branch 'master' into fresh-thread-tagged-loggingDongqing Hu2017-02-2610-9/+65
| |\ \ \ \ \ \
| * | | | | | | Improve test for TaggedLogging "keeps each tag in their own thread"Dongqing Hu2017-02-261-1/+2
| | | | | | | |
* | | | | | | | Add nodoc to `CredentialsGenerator` and `MasterKeyGenerator` [ci skip]yuuji.yaginuma2018-02-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These classes are internally used only.
* | | | | | | | Merge pull request #31868 from y-yagi/fix-build-failures-on-travisEileen M. Uchitelle2018-02-021-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix build failures on Travis
| * | | | | | | | Avoid bundle clean before cachingyuuji.yaginuma2018-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not sure cause, but due to the influence of `gem clean`, the expected gem seems not to be installed correctly. In order to avoid a test failure due to this, I fixed that `gem clean` not be executed. Ref: https://github.com/travis-ci/travis-ci/issues/2518#issuecomment-121168856 This is a workaround. If Travis fixes something, please revert this.
* | | | | | | | | Merge pull request #31276 from freeletics/fix-generators-listEileen M. Uchitelle2018-02-023-18/+5
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Removed "private" generators from command list.
| * | | | | | | | | Removed "private" generators from command list.Wojciech Wnętrzak2018-02-023-18/+5
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Appropriate way to handle encrypted command is by `bin/rails credentials` and `bin/rails encrypted` It was displayed on `bin/rails generate` command: ``` Please choose a generator below. Rails: application_record assets channel controller encrypted_file encryption_key_file generator ... ```
* | | | | | | | | Merge pull request #31854 from huacnlee/allow-more-options-for-service-urlGeorge Claghorn2018-02-012-2/+23
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | Allow ActiveStorage::Blob#service_url to pass addition options to service.url
| * | | | | | | | Allow `ActiveStorage::Blob#service_url` to pass addition options to ↵Jason Lee2018-02-012-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `service.url`. Because there have some service needs more parameters for file URL: https://www.alibabacloud.com/help/doc-detail/44687.htm ```rb class AliyunService < Service def url(key, options = {}) image_process = options[:oss_process] || "image/resize,w_800" "http://image-demo.oss-cn-hangzhou.aliyuncs.com/example.jpg?x-oss-process=#{image_process}" end end ``` Use case: ```erb <%= image_tag @user.avatar.service_url(oss_process: "image/resize,m_fill,h_100,w_100" %> ```
* | | | | | | | | PERF: Recover marshaling dump/load performance (#31827)Ryuta Kamizono2018-02-022-9/+27
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PERF: Recover marshaling dump/load performance This performance regression which is described in #30680 was caused by f0ddf87 due to force materialized `LazyAttributeHash`. Since 95b86e5, default proc has been removed in the class, so it is no longer needed that force materialized. Avoiding force materialized will recover marshaling dump/load performance. Benchmark: https://gist.github.com/blimmer/1360ea51cd3147bae8aeb7c6d09bff17 Before: ``` it took 0.6248569069430232 seconds to unmarshal the objects Total allocated: 38681544 bytes (530060 objects) allocated memory by class ----------------------------------- 12138848 Hash 10542384 String 7920000 ActiveModel::Attribute::Uninitialized 5600000 ActiveModel::Attribute::FromDatabase 1200000 Foo 880000 ActiveModel::LazyAttributeHash 400000 ActiveModel::AttributeSet 80 Integer 72 ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer 40 ActiveModel::Type::String 40 ActiveRecord::Type::DateTime 40 Object 40 Range allocated objects by class ----------------------------------- 250052 String 110000 ActiveModel::Attribute::Uninitialized 70001 Hash 70000 ActiveModel::Attribute::FromDatabase 10000 ActiveModel::AttributeSet 10000 ActiveModel::LazyAttributeHash 10000 Foo 2 Integer 1 ActiveModel::Type::String 1 ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer 1 ActiveRecord::Type::DateTime 1 Object 1 Range ``` After: ``` it took 0.1660824950085953 seconds to unmarshal the objects Total allocated: 13883811 bytes (220090 objects) allocated memory by class ----------------------------------- 5743371 String 4940008 Hash 1200000 Foo 880000 ActiveModel::LazyAttributeHash 720000 Array 400000 ActiveModel::AttributeSet 80 ActiveModel::Attribute::FromDatabase 80 Integer 72 ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer 40 ActiveModel::Type::String 40 ActiveModel::Type::Value 40 ActiveRecord::Type::DateTime 40 Object 40 Range allocated objects by class ----------------------------------- 130077 String 50004 Hash 10000 ActiveModel::AttributeSet 10000 ActiveModel::LazyAttributeHash 10000 Array 10000 Foo 2 Integer 1 ActiveModel::Attribute::FromDatabase 1 ActiveModel::Type::String 1 ActiveModel::Type::Value 1 ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer 1 ActiveRecord::Type::DateTime 1 Object 1 Range ``` Fixes #30680. * Keep the `@delegate_hash` to avoid to lose any mutations that have been made to the record
* | | | | | | | Merge pull request #31859 from bogdanvlviv/add-changelog-entry-for-31844Rafael França2018-02-011-0/+4
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add changelog entry for #31844
| * | | | | | | | Add changelog entry for #31844bogdanvlviv2018-02-011-0/+4
| | | | | | | | |
* | | | | | | | | Merge pull request #31855 from renchap/fix-activestorage-json-coderGeorge Claghorn2018-02-011-1/+1
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | ActiveStorage: use the full class name for the JSON coder
| * | | | | | | | Use the full class name for the JSON coder, as there may be anotherRenaud Chaput2018-02-011-1/+1
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `JSON` constant defined. For example when using the `representable` gem: https://github.com/trailblazer/representable/issues/224
* | | | | | | | Merge pull request #31853 from simi/patch-2Ryuta Kamizono2018-02-011-9/+9
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Update to latest rubies (2.2.9, 2.3.8 and 2.4.3) on Travis CI.
| * | | | | | | Update to latest rubies (2.2.9, 2.3.8 and 2.4.3) on Travis CI.Josef Šimánek2018-02-011-9/+9
|/ / / / / / /
* | | | | | | Merge pull request #31844 from ↵Ryuta Kamizono2018-02-014-0/+11
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | igorkasyanchuk/add_to_hash_and_to_h_for_session_and_cookies Consistent behavior for session and cookies with to_h and to_hash method
| * | | | | | | Consistent behavior for session and cookies with to_h and to_hash methodIgor Kasyanchuk2018-01-314-0/+11
| | | | | | | |
* | | | | | | | Correct orientation detectionGeorge Claghorn2018-01-312-3/+3
| | | | | | | |
* | | | | | | | Swap encoded image width and height if angle is 90 or 270 degreesGeorge Claghorn2018-01-313-3/+26
|/ / / / / / /