aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use `credentials` instead of `keyfile` in GCS seviceyuuji.yaginuma2017-11-295-21/+23
| | | | | | | | | | | | | The `keyfile` was renamed to `credentials` in `google-cloud-storage` 1.8.0. https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-storage/CHANGELOG.md#180--2017-11-14 Although `keyfile` can still be used, but it looks like deprecate. https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/ddf7b2a856d676316525eb581c1a4cc83ca6097b/google-cloud-storage/lib/google/cloud/storage.rb#L589...L590 Therefore, I think that should use `credentials` in newly generated applications. Ref: https://github.com/GoogleCloudPlatform/google-cloud-ruby/issues/1802
* Merge pull request #31270 from tjschuck/deprecation_example_code_formattingYuji Yaginuma2017-11-292-2/+2
|\ | | | | Formatting fix for example code
| * Formatting fix for example codeT.J. Schuck2017-11-282-2/+2
|/ | | | | | | | | | | | | | | | Just cleaning up the formatting of the example code here to format an inline bit of commentary as a comment. Before: ![](https://monosnap.com/file/Clso8IQGOWHU3o6cStbY5NaMPx3ysP.png) After: ![](https://monosnap.com/file/QdbKKvLAeiQ0RucppVYETvaWEstnOI.png) [ci skip]
* Merge pull request #31179 from kinnrot/scoping-reserved-namesRafael Mendonça França2017-11-285-0/+49
|\ | | | | | | Scoping reserved names
| * Prevent scope named same as a ActiveRecord::Relation instance method.Chen Kinnrot2017-11-285-0/+48
| | | | | | | | | | | | | | | | | | Due to inconsistent behavior when chaining scopes and one scope named after a Relation method Validation code added in 2 places: - scope, to prevent problematic scope names. - enum, cause it tries to auto define scope.
* | Merge pull request #31254 from suginoy/update_doc_find_orderRafael França2017-11-281-3/+4
|\ \ | | | | | | [ci skip]Update docs `ActiveRecord::FinderMethods#find`
| * | Update docs `ActiveRecord::FinderMethods#find`suginoy2017-11-281-3/+4
| | | | | | | | | | | | ref https://github.com/rails/rails/pull/22653
* | | Make sure the request exist befoe trying to send early hintsRafael Mendonça França2017-11-282-2/+32
| | | | | | | | | | | | | | | | | | | | | Action Mailer context for example responds to request but don't have a a request object. Fixes #31265
* | | Preparing for 5.2.0.beta2 releaseRafael Mendonça França2017-11-2827-51/+108
| | |
* | | Merge pull request #31264 from fatosmorina/fix_typosRafael França2017-11-2813-27/+41
|\ \ \ | | | | | | | | Fix typos and add a few suggestions
| * | | Fix typos and add a few suggestionsFatos Morina2017-11-2813-27/+41
|/ / /
* | | Merge pull request #31261 from ↵Andrew White2017-11-283-0/+54
|\ \ \ | |_|/ |/| | | | | | | | rails/fix-relative-url-root-with-optimized-url-helpers Fix optimized url helpers when using relative url root
| * | Fix optimized url helpers when using relative url rootAndrew White2017-11-283-0/+54
| |/ | | | | | | Fixes #31220.
* | Merge pull request #31255 from dixitp012/update_action_controller_guideRyuta Kamizono2017-11-281-1/+1
|\ \ | |/ |/| [ci skip] Update MVC wiki link
| * [ci skip] Update MVC wiki linkDixit Patel2017-11-281-1/+1
|/
* Use same version constraint in mysql adapter and generated applicationyuuji.yaginuma2017-11-282-2/+2
| | | | Follow up of 924a368f5c654f5304e575c767eb0fc64adc8659
* Merge pull request #31248 from y-yagi/fix_31245Rafael França2017-11-271-1/+1
|\ | | | | Include migration files in gem
| * Include migration files in gemyuuji.yaginuma2017-11-281-1/+1
| | | | | | | | Fixes #31245
* | Change how `AttributeSet::Builder` receives its defaultsSean Griffin2017-11-274-20/+21
|/ | | | | | | | | | | | | | | | | | | | | There are two concerns which are both being combined into one here, but both have the same goal. There are certain attributes which we want to always consider initialized. Previously, they were handled separately. The primary key (which is assumed to be backed by a database column) needs to be initialized, because there is a ton of code in Active Record that assumes `foo.id` will never raise. Additionally, we want attributes which aren't backed by a database column to always be initialized, since we would never receive a database value for them. Ultimately these two concerns can be combined into one. The old implementation hid a lot of inherent complexity, and is hard to optimize from the outside. We can simplify things significantly by just passing in a hash. This has slightly different semantics from the old behavior, in that `Foo.select(:bar).first.id` will return the default value for the primary key, rather than `nil` unconditionally -- however, the default value is always `nil` in practice.
* Drop mysql2 version less than 0.4.3 to guarantee fork safety (#31244)Ryuta Kamizono2017-11-281-1/+1
| | | | | | | | | | | | | | | Since #31173, mysql2 adapter depends on `automatic_close` which is introduced since mysql2 0.4.3. So the adapter with the mysql2 version before doesn't work with fork now. ``` % ARCONN=mysql2 be ruby -w -Itest test/cases/connection_adapters/connection_handler_test.rb -n test_forked_child_doesnt_mangle_parent_connection Using mysql2 Run options: -n test_forked_child_doesnt_mangle_parent_connection --seed 19988 /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:108:in `discard!': undefined method `automatic_close=' for #<Mysql2::Client:0x00007fedaa91dfd0> (NoMethodError) ``` This drops mysql2 version less than 0.4.3 to guarantee fork safety.
* Merge pull request #31243 from ignat-z/patch-1Rafael França2017-11-271-8/+6
|\ | | | | [ci skip] Fix documentation for deprecation method_wrappers
| * [ci skip] Fix documentation for deprecation method_wrappersIgnat Zakrevsky2017-11-271-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seems like version with class methods doesn't work. ```ruby require "active_support/deprecation.rb" module Fred extend self def aaa; end def bbb; end def ccc; end def ddd; end def eee; end end ActiveSupport::Deprecation.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead') Fred.aaa Fred.bbb Fred.ccc ``` # produces nothing vs ```ruby require "active_support/deprecation.rb" class Fred def aaa; end def bbb; end def ccc; end def ddd; end def eee; end end ActiveSupport::Deprecation.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead') Fred.new.aaa Fred.new.bbb Fred.new.ccc ``` produces ``` DEPRECATION WARNING: aaa is deprecated and will be removed from Rails 5.2 (called from <main> at deprications.rb:15) DEPRECATION WARNING: bbb is deprecated and will be removed from Rails 5.2 (use zzz instead) (called from <main> at deprications.rb:16) DEPRECATION WARNING: ccc is deprecated and will be removed from Rails 5.2 (use Bar#ccc instead) (called from <main> at deprications.rb:17) ```
* | Add releases notes to the guides indexRafael Mendonça França2017-11-271-0/+4
| |
* | Preparing for 5.2.0.beta1 releaseRafael Mendonça França2017-11-2727-59/+83
| |
* | Merge pull request #31242 from fgo/patch-22Rafael França2017-11-271-2/+2
|\ \ | |/ |/| Update Rails on Rack guide [ci skip]
| * Update Rails on Rack guide [ci skip]Francis Go2017-11-271-2/+2
| |
* | Update yarn lockRafael Mendonça França2017-11-271-10/+0
| |
* | Merge pull request #31237 from prathamesh-sonpatki/5-2-release-notesRafael França2017-11-271-0/+210
|\ \ | | | | | | Added first draft of Rails 5.2 release notes [ci skip]
| * | Added CSP as major feature [ci skip]Prathamesh Sonpatki2017-11-271-0/+5
| | |
| * | Added first draft of Rails 5.2 release notes [ci skip]Prathamesh Sonpatki2017-11-271-0/+205
| | |
* | | Make form_with_generates_ids default value to be falseRafael Mendonça França2017-11-273-5/+10
| | | | | | | | | | | | | | | This will keep the behavior of an application with the defaults of a 4.2 or 5.0 application behaving the same when upgrading to 5.2.
* | | Remove Content-Security-Policy initializer in API-only Applicationsyuuji.yaginuma2017-11-272-0/+8
| | | | | | | | | | | | | | | | | | Since `ContentSecurityPolicy::Middleware` is not loaded in API-only Applications, initializer is unnecessary. Ref: https://github.com/rails/rails/blob/9c10fec4c06da38f8975dfb851f4d899aa85f8b7/railties/lib/rails/application/default_middleware_stack.rb#L66..L68
* | | Update the middleware list with CSP [ci skip]Prathamesh Sonpatki2017-11-271-0/+1
| | |
* | | Merge pull request #31238 from prathamesh-sonpatki/csp-initializer-testAndrew White2017-11-271-0/+1
|\ \ \ | | | | | | | | Added missing test for presence of CSP initializer
| * | | Added missing test for presence of CSP initializerPrathamesh Sonpatki2017-11-271-0/+1
| |/ / | | | | | | | | | - Followup of #31162
* | | Merge pull request #31239 from prathamesh-sonpatki/fix-changelog-for-cspAndrew White2017-11-271-10/+10
|\ \ \ | |/ / |/| | Fix CHANGELOG for CSP PR #31162 [ci skip]
| * | Fix CHANGELOG for CSP PR #31162 [ci skip]Prathamesh Sonpatki2017-11-271-10/+10
|/ /
* | Add CHANGELOG.md entry for #31162 [ci skip]Andrew White2017-11-271-0/+60
| |
* | Merge pull request #31162 from rails/add-csp-configAndrew White2017-11-2713-34/+886
|\ \ | | | | | | Add DSL for configuring Content-Security-Policy header
| * | Add DSL for configuring Content-Security-Policy headerAndrew White2017-11-2713-34/+886
| | | | | | | | | | | | https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
* | | Enable `Style/DefWithParentheses` rubocop ruleRyuta Kamizono2017-11-275-4/+7
|/ / | | | | | | | | | | | | The def with blank `()` was newly added in #31176, but we have not used the blank `()` style in most part of our code base. So I've enabled `Style/DefWithParentheses` to prevent to newly added the code.
* | Merge pull request #31236 from y-yagi/use_puma_311_in_new_appsGuillermo Iguaran2017-11-272-2/+2
|\ \ | | | | | | Use Puma 3.11 in newly generated applications
| * | Use Puma 3.11 in newly generated applicationsyuuji.yaginuma2017-11-272-2/+2
|/ / | | | | | | | | | | | | In order to use early hints, need to use Puma 3.11.0 or higher. So, I think that should specify that version in newly generated applications. Ref: https://github.com/puma/puma/commit/f6f3892f4d82638fb7a2a57d993641b1486ee88a
* | Merge pull request #31167 from albertoalmagro/clean-db-ambiguityRafael França2017-11-261-2/+2
|\ \ | | | | | | Clean database naming ambiguity
| * | Remove DB naming ambiguityAlberto Almagro2017-11-261-2/+2
| | | | | | | | | | | | In some places this file referred to the database in three different ways: database, DB and db. The last one caused confusion with the db namespace and the db folder. This commit removes this ambiguity by using the whole word 'database' everywhere
* | | Add new error class `QueryCanceled` which will be raised when canceling ↵Ryuta Kamizono2017-11-276-3/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | statement due to user request (#31235) This changes `StatementTimeout` to `QueryCanceled` for PostgreSQL. In MySQL, errno 1317 (`ER_QUERY_INTERRUPTED`) is only used when the query is manually cancelled. But in PostgreSQL, `QUERY_CANCELED` error code (57014) which is used `StatementTimeout` is also used when the both case. And, we can not tell which reason happened. So I decided to introduce new error class `QueryCanceled` closer to the error code name.
* | | Rename `TransactionTimeout` to more descriptive `LockWaitTimeout` (#31223)Ryuta Kamizono2017-11-276-9/+9
| | | | | | | | | | | | | | | | | | Since #31129, new error class `StatementTimeout` has been added. `TransactionTimeout` is caused by the timeout shorter than `StatementTimeout`, but its name is too generic. I think that it should be a name that understands the difference with `StatementTimeout`.
* | | Merge pull request #31229 from y-yagi/remove_field_ids_from_scaffold_formKasper Timm Hansen2017-11-263-11/+7
|\ \ \ | | | | | | | | Remove field ids from scaffold form
| * | | Remove field ids from scaffold formyuuji.yaginuma2017-11-263-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | This was added with 27f103fc7e3260efe0b8dde66bf5354f2202ee32 for link labels and fields. However, `form_with` changed to generates ids by default with d3893ec38ec61282c2598b01a298124356d6b35a. So I think that adding an explicit ids is unnecessary.
* | | | Revert "Merge pull request #31006 from ↵eileencodes2017-11-262-17/+0
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | rails/kamipo/ordinal_methods_should_respect_loaded_records" This reverts commit 0f79ab91150b4cdb6c018530978a3395962c7a02, reversing changes made to d575f7f2e737739302a0e8210d01c10f5d4e2c35. This PR philosophically conflicts with #30800 and Matthew thinks we should hold off merging this until we find concensus. Reverting since we're about to cut a release for 5.2.