aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | | | Merge pull request #25929 from kamipo/load_target_is_public_methodSantiago Pastorino2016-07-263-7/+5
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | | | | | | `load_target` is a public method
| * | | | | | | | | | | `load_target` is a public methodRyuta Kamizono2016-07-233-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `send` is unnecessary.
* | | | | | | | | | | | Merge pull request #25953 from ↵Santiago Pastorino2016-07-261-4/+6
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/make_force_signal37_to_load_all_clients_of_firm_to_private Make `force_signal37_to_load_all_clients_of_firm` to private
| * | | | | | | | | | | | Make `force_signal37_to_load_all_clients_of_firm` to privateRyuta Kamizono2016-07-261-4/+6
| | |_|/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not a test case.
* | | | | | | | | | | | Merge pull request #25936 from prathamesh-sonpatki/bump-arelSantiago Pastorino2016-07-261-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | | | | | | Bump Arel to fix few failing tests on Ruby 2.4 related to the Integer unification
| * | | | | | | | | | | Bump Arel to fix few failing tests on Ruby 2.4 related to the Integer ↵Prathamesh Sonpatki2016-07-241-1/+1
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unification * Following tests were failing on Ruby edge 2.4 version - - RelationTest#test_update_all_with_joins_and_offset_and_order: - RelationTest#test_update_all_with_joins_and_offset: - BasicsTest#test_no_limit_offset: - CalculationsTest#test_offset_is_kept: - ActiveRecord::CollectionCacheKeyTest#test_cache_key_for_queries_with_offset_which_return_0_rows: - FinderTest#test_third_to_last: * As Arel 7.1 supports Integer unification after https://github.com/rails/arel/pull/437 we can use it.
* | | | | | | | | | | Merge pull request #25950 from jules2689/masterRafael França2016-07-251-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix an exception where content-type is nil
| * | | | | | | | | | | Also yield in parameters for a nil content_mime_typeJulian Nadeau2016-07-251-1/+1
| | |_|_|_|_|/ / / / / | |/| | | | | | | | |
* | | | | | | | | | | Whoops, forgot the changelog entry for the previous commitSean Griffin2016-07-251-0/+5
| | | | | | | | | | |
* | | | | | | | | | | Correct the behavior of virtual attributes on models loaded from the dbSean Griffin2016-07-256-12/+74
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we had primarily tested the behavior of these attributes by calling `.new`, allowing this to slip through the cracks. There were a few ways in which they were behaving incorrectly. The biggest issue was that attempting to read the attribute would through a `MissingAttribute` error. We've corrected this by returning the default value when the attribute isn't backed by a database column. This is super special cased, but I don't see a way to avoid this conditional. I had considered handling this higher up in `define_default_attribute`, but we don't have the relevant information there as users can provide new defaults for database columns as well. Once I corrected this, I had noticed that the attributes were always being marked as changed. This is because the behavior of `define_default_attribute` was treating them as assigned from `Attribute::Null`. Finally, with our new implementation, `LazyAttributeHash` could no longer be marshalled, as it holds onto a proc. This has been corrected as well. I've not handled YAML in that class, as we do additional work higher up to avoid YAML dumping it at all. Fixes #25787 Close #25841
* | | | | | | | | | systematic revision of =~ usage in AVXavier Noria2016-07-2511-28/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where appropriate, prefer the more concise Regexp#match?, String#include?, String#start_with?, or String#end_with?
* | | | | | | | | | use \A and \z when you mean \A and \zXavier Noria2016-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Ruby ^ and $ mean start and end of *line*. A regexp that validates an email should not check if some line of the string looks like an email, and maybe be surrounded by the entire Joyce's Ulysses. What the regexp has to check is if the string itself looks like an email. This validator is used only in tests, the ^/$ anchors implied no risk.
* | | | | | | | | | adds missing requiresXavier Noria2016-07-2411-1/+14
| | | | | | | | | |
* | | | | | | | | | systematic revision of =~ usage in AMoXavier Noria2016-07-244-7/+11
| |_|/ / / / / / / |/| | | | | | | |
* | | | | | | | | Merge pull request #25928 from mechanicles/info-for-cache-fetch-blockप्रथमेश Sonpatki2016-07-241-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add proper description for `Rails.cache.fetch` [ci skip]
| * | | | | | | | | Proper description for `Rails.cache.fetch` [ci skip]Santosh Wadghule2016-07-241-1/+1
| | | | | | | | | |
* | | | | | | | | | removes spurious lineXavier Noria2016-07-241-1/+0
| | | | | | | | | |
* | | | | | | | | | give some love to this test fileXavier Noria2016-07-231-151/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It all started noticing some foo.method({ ... }) method calls in passing. This is a whole pass modernizing this file. While some string literals are edited where I touched code, this pass does not uniformizes quotes. A ton are left untouched on purposes. We have no defined style.
* | | | | | | | | | systematic revision of =~ usage in ARXavier Noria2016-07-2321-29/+34
| |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where appropriatei, prefer the more concise Regexp#match?, String#include?, String#start_with?, or String#end_with?
* | | | | | | | | Merge pull request #25908 from mechanicles/derives-fromKasper Timm Hansen2016-07-232-8/+8
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Explain meaning of the code very well and Remove confusion. [ci skip]
| * | | | | | | | | Explain meaning of the code very well and Remove confusion. [ci skip]Santosh Wadghule2016-07-232-8/+8
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code like `render(topics) => render("topics/topic")` adds confusion for the readers. On first impression, that code feels like hash kind of data, but it's not. So make it more clear and meaningful.
* | | | | | | | | Merge pull request #25914 from jmccartie/jm/not_inRafael França2016-07-224-0/+81
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Adds `not_in?` onto Object
| * | | | | | | | | Adds `not_in?` onto ObjectJon McCartie2016-07-214-0/+81
| | | | | | | | | |
* | | | | | | | | | revises a regexpXavier Noria2016-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The exclamation mark is not a metacharacter.
* | | | | | | | | | systematic revision of =~ usage in ASXavier Noria2016-07-2217-29/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where appropriate prefer the more concise Regexp#match?, String#include?, String#start_with?, and String#end_with?
* | | | | | | | | | adds require for Regexp#match?Xavier Noria2016-07-221-0/+2
| | | | | | | | | |
* | | | | | | | | | revises styleXavier Noria2016-07-221-1/+1
| | | | | | | | | |
* | | | | | | | | | the infamous typo only seen in GitHub's diff [ci skip]Xavier Noria2016-07-221-1/+1
|/ / / / / / / / /
* | | | | | | | | performance boost for String#blank? in Ruby 2.4Xavier Noria2016-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some casual benchmarks showed a 2x factor. All credit goes to @nurse.
* | | | | | | | | define Range#match? if Ruby < 2.4Xavier Noria2016-07-224-2/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the rationale in the documentation included in this patch. We are going to gradually introduce this predicate in the code base.
* | | | | | | | | Allow MessageEncryptor to take advantage of authenticated encryption modesBart de Water2016-07-213-4/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AEAD modes like `aes-256-gcm` provide both confidentiality and data authenticity, eliminating the need to use MessageVerifier to check if the encrypted data has been tampered with. Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
* | | | | | | | | Merge pull request #25911 from juno/fix-comment-indentXavier Noria2016-07-211-3/+3
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix incorrect indentation in method comment
| * | | | | | | | | Fix incorrect indentation in method comment [ci skip]Junya Ogura2016-07-211-3/+3
|/ / / / / / / / /
* | | | | | | | | explain the meaning of some RuboCop config options [ci skip]Xavier Noria2016-07-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For consistency mainly. Also, some have a name that could make the reader think they enforce the opposite of what they do, because the default is not visible there.
* | | | | | | | | Merge pull request #25907 from gsamokovarov/lock-web-console-for-5.0Yves Senn2016-07-212-3/+3
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | Enforce minimal web-console version for Rails 5
| * | | | | | | | Enforce minimal web-console version for Rails 5Genadi Samokovarov2016-07-212-3/+3
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I dropped the version constraint in web-console with the idea it will be easier to upgrade the console between Rails releases. However, issues like #25899 started popping up. I'm reintroducing the constraint, but this time, I don't set an upper limit to the major version. This will keep the web-console in a version that always works for the current Rails version and can be easily upgraded to the last one with `bundle update`. We may need to backport this for Rails 5.0.1. Fixes #25899.
* | | | | | | | Merge pull request #25616 from ignatiusreza/callable_cache_keyKasper Timm Hansen2016-07-213-5/+30
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Bring back support for callable cache key when rendering collection
| * | | | | | | | Bring back support for callable cache_key on collection renderingIgnatius Reza2016-07-213-5/+30
|/ / / / / / / /
* | | | | | | | Merge pull request #25902 from etiennebarrie/remove-tabs-before-commandsRafael França2016-07-201-4/+4
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | Remove tab chars before commands to be run
| * | | | | | | Remove tab chars before commands to be runÉtienne Barrié2016-07-201-4/+4
|/ / / / / / /
* | | | | | | Merge pull request #25885 from kamipo/fix_explain_logging_with_bindsRafael França2016-07-204-17/+28
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix explain logging with binds
| * | | | | | | Fix explain logging with bindsRyuta Kamizono2016-07-204-17/+28
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | `binds` is an array of a query attribute since Active Record 5.0.
* | | | | | | Merge pull request #25786 from ↵Rafael França2016-07-202-5/+21
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/add_exists_and_update_all_to_collection_proxy Add `exists?` and `update_all` to `CollectionProxy` for respects an association scope
| * | | | | | | Add `exists?` and `update_all` to `CollectionProxy` for respects an ↵Ryuta Kamizono2016-07-202-5/+21
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | association scope Fixes #25732.
* | | | | | | Merge pull request #25897 from ↵Rafael França2016-07-202-14/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | yahonda/remove_set_date_columns_and_modify_attributes_test Remove Oracle specific tests based on deprecated behaviors
| * | | | | | Oracle TIMESTAMP sql type is associated with Rails `DateTime` type nowYasuo Honda2016-07-202-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Refer https://github.com/rsim/oracle-enhanced/pull/845 Remove `set_date_columns` which has been deprecated in Oracle enhanced adapter - Refer https://github.com/rsim/oracle-enhanced/pull/869
* | | | | | | Merge pull request #25438 from prathamesh-sonpatki/rm-session-store-initializerRafael Mendonça França2016-07-2010-29/+49
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Setup default session store internally, no longer through an initializer
| * | | | | | | Setup default session store internally, no longer through an application ↵Prathamesh Sonpatki2016-07-1710-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initializer - By default the session store will be set to cookie store with application name as session key. - Older apps are not affected as they will have the session store initializer generated by Rails in older versions, and Rails will not overwrite the session store if it is already set or disabled. - But new apps will not have the initializer, instead the session store will be set to cookie store by default. - Based on comment by DHH here - https://github.com/rails/rails/issues/25181#issuecomment-222312764.
| * | | | | | | Refactor the existing session_store to use keyword args and raise early when ↵Prathamesh Sonpatki2016-07-171-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set to activerecord session store - Use keyword args as it is possible to use them now. - The error message for activerecord-session_store gem was added in 1807384. - But it was added for a code path which gets called when we try to **access** the session store, not when we **set** it. - So the test expecting the exception started failing because now the session store is set via railtie again **after** setting it first with :active_record_store in the test. - As the error is not raised while setting the store to :active_record_store, the store gets overwritten by railtie and when we access it via `session_store` while building the default middleware stack, the exception is not raised. - This commit moves the code for raising the exception to the path where we try to set the store.
| * | | | | | | Introduce a new method for checking whether session_store is set by user or ↵Prathamesh Sonpatki2016-07-171-0/+4
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by Rails - We need to ability to check whether the session store it is set or not so that we can set it ourselves in an internal initializer. - We can't rely on return value of `config.session_store` as it can return `nil` when set to `disabled` and we will accidentally override it and set to default cookie store. - So introduced new method which just tells us whether it is set or not.