aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | has_(one/many)_attached presence validationfatkodima2018-02-112-0/+34
| | | | | | |
* | | | | | | Adding precision about which letter case to use for controller names … ↵simonjamain2018-04-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#32740) * Adding precision about which letter case to use for controller names in routing Many people (including myself) encounter an error when having multiple words controller names and trying to put camelCase in their routes
* | | | | | | Ensure that `ids_reader` respects dirty target whether target is loaded or notRyuta Kamizono2018-04-272-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently `ids_reader` doesn't respect dirty target when the target is not loaded yet unlike `collection.size`. I believe the inconsistency is a bug, fixes the `ids_reader` to behave consistently regardless of whether target is loaded or not.
* | | | | | | Merge pull request #32617 from tgturner/size-should-use-available-associationRyuta Kamizono2018-04-273-1/+82
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Loaded associations should not run a new query when size is called
| * | | | | | | Loaded associations should not run a new query when size is calledGraham Turner2018-04-263-1/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Already loaded associations were running an extra query when `size` was called on the association. This fix ensures that an extra query is no longer run. Update tests to use proper methods
* | | | | | | | Update 'rails_welcome.png' to reflect a more diverse population (#32735)Jamie Dihiansan2018-04-261-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update 'rails_welcome.png' to reflect a more diverse population * Cleanup 'rails_welcome.png'
* | | | | | | | Add test case that assigning belongs_to on destroyed object raises frozen errorRyuta Kamizono2018-04-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to ensure that the behavior has not changed before and after #31575.
* | | | | | | | Address `Style/StringLiterals` offenceRyuta Kamizono2018-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caused at 9276ea89d2b0be9fdd1ad6590857f8d45a38c267.
* | | | | | | | Don't dup Strings when jsonifyingAkira Matsuda2018-04-271-2/+6
| |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | This method would be called so many times and would create so many temporary garbage Strings
* | | | | | | Don't try to destoy the given string via method argumentAkira Matsuda2018-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Or it would raise if the argument was frozen. And even with this change, it would still reduce String allocations together with 9276ea89d2b0be9fdd1ad6590857f8d45a38c267 because `escape` should be `true` in most cases
* | | | | | | Reduce String allocations when building Action View tagsAkira Matsuda2018-04-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method is called against each tag option for each tag, and creates an extra garbage String per each call
* | | | | | | Reduce extra object creations in TaggedLoggingAkira Matsuda2018-04-271-1/+3
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tags_text method creates 3 Ruby objects per each logger call when no custom tags are given (which is the default setting, and so presumably the majority use case). This patch reduces two temporary object creations in this case. require 'allocation_tracer' ObjectSpace::AllocationTracer.setup(%i{type}) tags = ['a'] pp before: ObjectSpace::AllocationTracer.trace { tags.collect { |tag| "[#{tag}] " }.join } pp after: ObjectSpace::AllocationTracer.trace { "[#{tags[0]}] " } {:before=>{[:T_ARRAY]=>[1, 0, 0, 0, 0, 0], [:T_STRING]=>[2, 0, 0, 0, 0, 0]}} {:after=>{[:T_STRING]=>[1, 0, 0, 0, 0, 0]}}
* | | | | | Merge pull request #32725 from nikolai-b/rm_count_math_mixinRyuta Kamizono2018-04-261-2/+0
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Remove math module from count
| * | | | | Remove math module from countNikolai B2018-04-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Not required after https://github.com/rails/arel/pull/449
* | | | | | Merge pull request #32728 from ricardotk002/prevent-duplication-active-storageGeorge Claghorn2018-04-253-10/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | Prevent code duplication in ActiveStorage analyzers tests
| * | | | | | Move #extract_metadata_from to ActiveStorage's TestHelperRicardo Díaz2018-04-253-10/+4
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ImageAnalyzerTest and VideoAnalyzerTest are defining the same helper, since both use `#create_file_blob` that is defined in TestHelper, it makes sense to move `#extract_metadata_from` to that side.
* | | | | | Simplify URL generation for partial downloads from GCSGeorge Claghorn2018-04-251-1/+2
| | | | | |
* | | | | | Merge pull request #32721 from javan/ast-unminify-jsJavan Makhmali2018-04-256-1386/+1093
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Unminify activestorage.js
| * | | | | Unminify activestorage.jsJavan Makhmali2018-04-256-1386/+1093
|/ / / / /
* | | | | Merge pull request #32717 from tgturner/make-get-and-set-values-public-againRyuta Kamizono2018-04-253-4/+15
|\ \ \ \ \ | | | | | | | | | | | | Make get_value public again
| * | | | | `get_value` needs to be a public methodGraham Turner2018-04-253-4/+15
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | Adds test case for failing issue Moves set_value back to protected
* | | | | Merge pull request #32702 from bogdanvlviv/fix-description-for-31685Rafael França2018-04-251-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Fix title for example of removing data from `session` [ci skip]
| * | | | | Fix title for example of removing data from `session` [ci skip]bogdanvlviv2018-04-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After #31685 the description says different what we expect to see in the example. Change `assign that key to be nil` to `or delete the key/value pair` in order to highlight what is shown in the example. Fix one more example of removing data from the session in favour of using `delete` since assigning to `nil` doesn't delete key from it.
* | | | | | Add a helper method to check that gem does not exist in `Gemfile`yuuji.yaginuma2018-04-251-49/+26
| | | | | |
* | | | | | Merge pull request #32713 from utilum/max_ffi_versionRafael França2018-04-252-4/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix segmentation fault in EventedFileUpdateChecker
| * | | | | | Fix segmentation fault in EventedFileUpdateCheckerutilum2018-04-242-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | resolves #32705
* | | | | | | Merge pull request #32715 from vaidehijoshi/refactor-scanner-testRafael França2018-04-251-47/+50
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Break up Journey's scanner test
| * | | | | | | Break up Journey's scanner testvaidehijoshi2018-04-241-47/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This breaks up the one megatest for Journey's scanner into multiple test cases, which also provides better output when there is a failure in the scanner. Before: ``` ./bin/test test/journey/route/definition/scanner_test.rb Run options: --seed 778 F Failure: ActionDispatch::Journey::Definition::TestScanner#test_tokens [/Users/vaidehijoshi/Code/tilde/rails/actionpack/test/journey/route/definition/scanner_test.rb:57]: --- expected +++ actual @@ -1 +1 @@ -[[:SLASH, "/"], [:LITERAL, "page!!"]] +[[:SLASH, "/"], [:LITERAL, "page!"]] bin/test Users/vaidehijoshi/Code/tilde/rails/actionpack/test/journey/route/definition/scanner_test.rb:14 Finished in 0.090899s, 11.0012 runs/s, 44.0049 assertions/s. 1 runs, 4 assertions, 1 failures, 0 errors, 0 skips ``` After: ``` ./bin/test test/journey/route/definition/scanner_test.rb Run options: --seed 2230 ....................F Failure: ActionDispatch::Journey::Definition::TestScanner#test_scanning_/page$ [/Users/vaidehijoshi/Code/tilde/rails/actionpack/test/journey/route/definition/scanner_test.rb:58]: Wrong tokens for `/page$`. --- expected +++ actual @@ -1 +1 @@ -[[:SLASH, "/"], [:LITERAL, "page$$"]] +[[:SLASH, "/"], [:LITERAL, "page$"]] bin/test Users/vaidehijoshi/Code/tilde/rails/actionpack/test/journey/route/definition/scanner_test.rb:56 F Failure: ActionDispatch::Journey::Definition::TestScanner#test_scanning_/page! [/Users/vaidehijoshi/Code/tilde/rails/actionpack/test/journey/route/definition/scanner_test.rb:58]: Wrong tokens for `/page!`. --- expected +++ actual @@ -1 +1 @@ -[[:SLASH, "/"], [:LITERAL, "page!!"]] +[[:SLASH, "/"], [:LITERAL, "page!"]] bin/test Users/vaidehijoshi/Code/tilde/rails/actionpack/test/journey/route/definition/scanner_test.rb:56 F Failure: ActionDispatch::Journey::Definition::TestScanner#test_scanning_/page& [/Users/vaidehijoshi/Code/tilde/rails/actionpack/test/journey/route/definition/scanner_test.rb:58]: Wrong tokens for `/page&`. --- expected +++ actual @@ -1 +1 @@ -[[:SLASH, "/"], [:LITERAL, "page&&"]] +[[:SLASH, "/"], [:LITERAL, "page&"]] bin/test Users/vaidehijoshi/Code/tilde/rails/actionpack/test/journey/route/definition/scanner_test.rb:56 Finished in 0.126447s, 181.8944 runs/s, 181.8944 assertions/s. 23 runs, 23 assertions, 3 failures, 0 errors, 0 skips ```
* | | | | | | | Merge pull request #32716 from yahonda/arel_collectors_bindMatthew Draper2018-04-251-0/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Address `NameError: uninitialized constant Arel::Collectors::Bind`
| * | | | | | | | Address `NameError: uninitialized constant Arel::Collectors::Bind`Yasuo Honda2018-04-251-0/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when tested with Ruby 2.5 or higher ```ruby $ ruby -v ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux] $ bundle exec ruby -w -Itest test/cases/arel/collectors/bind_test.rb -n test_compile_gathers_all_bind_params Run options: -n test_compile_gathers_all_bind_params --seed 24420 E Error: Arel::Collectors::TestBind#test_compile_gathers_all_bind_params: NameError: uninitialized constant Arel::Collectors::Bind Did you mean? Binding test/cases/arel/collectors/bind_test.rb:15:in `collect' test/cases/arel/collectors/bind_test.rb:19:in `compile' test/cases/arel/collectors/bind_test.rb:31:in `test_compile_gathers_all_bind_params' bin/rails test test/cases/arel/collectors/bind_test.rb:30 Finished in 0.002343s, 426.8559 runs/s, 0.0000 assertions/s. 1 runs, 0 assertions, 0 failures, 1 errors, 0 skips $ ``` It is likely due to Ruby 2.5 does not look up top level constant. https://www.ruby-lang.org/en/news/2017/12/25/ruby-2-5-0-released/ "Top-level constant look-up is no longer available."
* | | | | | | | Merge pull request #32097 from matthewd/arelMatthew Draper2018-04-25145-4/+11379
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Merge Arel
| * | | | | | | | Arel: :nodoc: allMatthew Draper2018-02-2481-81/+81
| | | | | | | | |
| * | | | | | | | Arel: rubocop -aMatthew Draper2018-02-24143-3077/+3179
| | | | | | | | |
| * | | | | | | | Merge Arel into Active RecordMatthew Draper2018-02-24146-4/+11277
| |\ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ Merge pull request #516 from yahonda/ruby250Rafael França2018-01-253-1/+6
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | CI with Ruby 2.5.0
| | | * | | | | | | | BigDecimal.new is deprecated in Ruby 2.5Yasuo Honda2018-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refer https://github.com/ruby/bigdecimal/pull/86
| | | * | | | | | | | require 'date' to address for Ruby 2.5Yasuo Honda2018-01-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Address #517
| | | * | | | | | | | Use the latest RubyGems 2.7.4 or higherYasuo Honda2018-01-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refer https://github.com/rubygems/rubygems/issues/2123
| | | * | | | | | | | CI with Ruby 2.5.0Yasuo Honda2018-01-061-0/+1
| | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://www.ruby-lang.org/en/news/2017/12/25/ruby-2-5-0-released/
| | * | | | | | | | Merge pull request #481 from lautis/lateralAaron Patterson2017-12-286-1/+40
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Lateral expressions for PostgreSQL
| | | * | | | | | | | PostgreSQL lateral expressionsVille Lautanala2017-04-255-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for PostgreSQL lateral expressions. This is treated as an unary function applied to a query expression. Lateral is a separate function to provide interoperability with aliases and unions. These are also separate node types that wrap SelectStatements. The lateral option would need to be implemented in these nodes separately if lateral was an option of SelectStatement. When building the query, an alias can be given as an argument. This enables building a lateral query with an table alias without using either Nodes::TableAlias or Nodes::Lateral directly.
| | | * | | | | | | | Fix link to SQL-92 grammarVille Lautanala2017-04-251-1/+1
| | | | | | | | | | |
| | * | | | | | | | | Merge pull request #513 from itsNikolay/remove_unused_requiresAaron Patterson2017-12-2811-17/+1
| | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Remove Unused `require`
| | | * | | | | | | | | Remove Unused `require`Nikolay Ponomarev2017-12-2711-17/+1
| | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It looks like they are left from old design
| | * | | | | | | | | Merge pull request #512 from itsNikolay/reduce_ReduceAaron Patterson2017-12-275-39/+9
| | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Reduce `Reduce`
| | | * | | | | | | | | Reduce `Reduce`Nikolay Ponomarev2017-12-275-39/+9
| | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove `Arel::Visitors::Reduce` because it almost completely duplicates `Arel::Visitors::Visitor`
| | * | | | | | | | | Merge pull request #449 from kbrock/expr_nodeMatthew Draper2017-12-0616-28/+40
| | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Introduce Expression Node
| | | * | | | | | | | | Delete is not a NodeExpression, change parentKeenan Brock2017-12-051-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires a little cut and paste from the Binary node, but it is used in different parts of sql
| | | * | | | | | | | | Introduce NodeExpression as parent of scalar nodesKeenan Brock2017-12-0515-25/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQL is very powerful. Many nodes can be used as a sub expression or query. grouping all of these possible nodes together
| | * | | | | | | | | | Merge pull request #511 from ecbrodie/patch-1Rafael França2017-12-051-1/+7
| | |\ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / / | | |/| | | | | | | | | Explicitly mentions the #and operator