aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #18365 from pocke/fix_datatime_compareAaron Patterson2015-06-123-1/+15
|\ | | | | DateTime#<=> return nil when compare to the invalid String as Time.
| * DateTime#<=> return nil when compare to the invalid String as Time.pocke2015-01-063-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | before: p Time.now == 'a' # => false p Time.now <=> 'a' # => nil require 'active_support' require 'active_support/core_ext' p Time.now == 'a' # => false p Time.now <=> 'a' # => invalid date (ArgumentError) and on ruby 2.2, Time.now == 'a' warning. warning: Comparable#== will no more rescue exceptions of #<=> in the next release. warning: Return nil in #<=> if the comparison is inappropriate or avoid such comparison. after: - Error handling. - Quiet warnings.
* | Merge pull request #20494 from ↵Rafael Mendonça França2015-06-122-1/+26
|\ \ | | | | | | | | | | | | knovoselic/active_support_concern_class_methods_fix [ActiveSupport] Fix for #20489 - ActiveSupport::Concern#class_methods affects parent classes
| * | Fix for #20489 - ActiveSupport::Concern#class_methods affects parent classesKristijan Novoselic2015-06-122-1/+26
| | |
* | | select the AR adapter through `bin/test`.Yves Senn2015-06-111-0/+1
| | |
* | | use our runner (`bin/test`) for framework components.Yves Senn2015-06-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a script `bin/test` to most Rails framework components. The script uses the rails minitest plugin to augment the runner. See https://github.com/rails/rails/pull/19571 for details about the plugin. I did not yet add `bin/test` for activerecord, activejob and railties. These components rely on specific setup performed in the rake-tasks.
* | | inline test runner check into `as/testing/autorun.rb`.Yves Senn2015-06-111-1/+8
| | | | | | | | | | | | | | | This makes it possible to easily get the runner working with existing setups that rely on `active_support/testing/autorun.rb`.
* | | Use block variable instead of globalRoque Pinel2015-06-091-1/+1
|/ /
* | Use block variable instead of globalRoque Pinel2015-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ```ruby Benchmark.ips do |x| x.report("$&") { "foo".gsub(/f/) { $&.hex } } x.report("block var") { "foo".gsub(/f/) { |match| match.hex } } end ``` ``` Calculating ------------------------------------- $& 23.271k i/100ms block var 24.804k i/100ms ------------------------------------------------- $& 321.981k (± 7.4%) i/s - 1.606M block var 324.949k (± 9.2%) i/s - 1.612M ```
* | Merge pull request #19571 from kaspth/improve-runner-integrationYves Senn2015-06-082-0/+64
|\ \ | | | | | | | | | Improve Test Runner's Minitest integration.
| * | Improve test runner's Minitest integration.Kasper Timm Hansen2015-06-042-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also adds free mix and matching of directories, files and lines filters. Like so: bin/rails test models/post_test.rb test/integration models/person_test.rb:26 You can also mix in a traditional Minitest filter: bin/rails test test/integration -n /check_it_out/
* | | Code fix in CHANGELOGAditya Sanghi2015-06-081-1/+1
| | | | | | | | | :nail: remove extraneous bracket
* | | Merge pull request #20464 from ronakjangir47/active_support_stubbingArthur Nogueira Neves2015-06-0710-309/+366
|\ \ \ | | | | | | | | Removed mocha stubbing in active_support
| * | | Removed mocha stubbing in active_supportRonak Jangir2015-06-0710-309/+366
| | | |
* | | | A few documentation tweaks [ci skip]Robin Dupret2015-06-073-5/+5
|/ / / | | | | | | | | | [Robin Dupret & Shunsuke Aida]
* | | Merge pull request #20443 from teoljungberg/thoughtbot-capitalizationKasper Timm Hansen2015-06-051-1/+1
|\ \ \ | | | | | | | | [ci skip] Fix `thoughtbot` capitalization
| * | | Fix `thoughtbot` capitalizationTeo Ljungberg2015-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | The company name is spelled `thoughtbot` per https://github.com/thoughtbot/presskit/blob/master/README.md#name
* | | | Require active_support/duration.Jimmy Cuadra2015-06-041-0/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | ActiveSupport::TimeWithZone references `ActiveSupport::Duration` but does not require it, which can result in a `LoadError` when required directly without requiring a component less granular like `active_support/time`, where the autoload for `ActiveSupport::Duration` is set up.
* | | Merge pull request #20410 from schneems/schneems/boo-global-varsRafael Mendonça França2015-06-011-2/+2
|\ \ \ | | | | | | | | Use block variable instead of global
| * | | Use block variable instead of globalschneems2015-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ```ruby require 'benchmark/ips' Benchmark.ips do |x| x.report("$&") { "foo".sub(/f/) { $&.upcase } } x.report("block var") { "foo".sub(/f/) {|match| match.upcase } } end ``` ``` Calculating ------------------------------------- $& 48.658k i/100ms block var 49.666k i/100ms ------------------------------------------------- $& 873.156k (± 9.3%) i/s - 4.331M block var 969.744k (± 9.2%) i/s - 4.818M ``` It's faster, and gets rid of a few "magic" global variables
* | | | Merge pull request #20362 from kddeisz/enumerable_pluckRafael Mendonça França2015-06-012-2/+18
|\ \ \ \ | | | | | | | | | | Allow Enumerable#pluck to take a splat.
| * | | | Allow Enumerable#pluck to take a splat.Kevin Deisz2015-05-292-2/+18
| | |/ / | |/| | | | | | | | | | | | | | | | | | This allows easier integration with ActiveRecord, such that AR#pluck will now use Enumerable#pluck if the relation is loaded, without needing to hit the database.
* | | | Merge pull request #20138 from tgxworld/deprecated_assert_templateRafael Mendonça França2015-06-011-1/+1
|\ \ \ \ | | | | | | | | | | Deprecate `assert_template` and `assigns()`.
| * | | | Remove `assigns` and `assert_template`.Guo Xiang Tan2015-05-301-1/+1
| | |/ / | |/| |
* / | | Fix a range of values for parameters of the Time#changeNikolay Kondratyev2015-06-013-1/+9
|/ / / | | | | | | | | | | | | Passing 999999000 < `:nsec` < 999999999 and 999999 < `:usec` < 1000000 to change a time with utc_offset doesn't throw an `ArgumentError`.
* / / Revert "Replace use of alias chains with prepend at core_ext/date and ↵Roque Pinel2015-05-295-79/+89
|/ / | | | | | | core_ext/time"
* | Merge pull request #19878 from pabloh/replace_alias_chains_with_prependRafael Mendonça França2015-05-285-89/+79
|\ \ | | | | | | Replace use of alias chains with prepend at core_ext/date and core_ext/time
| * | Replace use of alias chains with prepend at core_ext/datePablo Herrero2015-05-045-89/+79
| | |
* | | Merge pull request #20267 from kaspth/fix-minitest-constant-clashingRafael Mendonça França2015-05-288-43/+45
|\ \ \ | | | | | | | | Avoid E constant clashing with Minitest defined version.
| * | | Avoid E constant clashing with Minitest defined version.Kasper Timm Hansen2015-05-228-43/+45
| | | | | | | | | | | | | | | | | | | | Minitest sets an E constant to an empty string to save GC time. This clashes with autoloading tests which define an E constant.
* | | | Add Enumerable#pluck.Kevin Deisz2015-05-283-0/+20
| | | | | | | | | | | | | | | | Allows fetching the same values from arrays as from ActiveRecord associations.
* | | | Remove unused package tasksArun Agrawal2015-05-281-7/+0
| | | | | | | | | | | | | | | | We are using `all:build` now.
* | | | Fix indentation warning on active_support ordered_optionsMehmet Emin İNAÇ2015-05-271-1/+1
| | | |
* | | | Merge pull request #20262 from arunagw/aa-remove-broken-unused-release-taskYves Senn2015-05-271-7/+0
|\ \ \ \ | | | | | | | | | | Remove broken and unused release task
| * | | | Remove broken and unused release taskArun Agrawal2015-05-221-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | - We do release with release.rb - There is no `rake/gemcutter`
* | | | | Merge pull request #20297 from gouravtiwari/patch-9Claudio B.2015-05-261-0/+6
|\ \ \ \ \ | | | | | | | | | | | | Added multibyte slice! example to doc [ci skip]
| * | | | | Added multibyte slice! example to doc [ci skip]Gourav Tiwari2015-05-261-0/+6
| | | | | |
* | | | | | Merge pull request #20208 from gaurish/raise_on_missing_ordered_optionsRafael Mendonça França2015-05-263-1/+39
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Add bang version to OrderedOptions
| * | | | | | Add bang version to OrderedOptionsGaurish Sharma2015-05-233-1/+36
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | By: Aditya Sanghi(@asanghi) Gaurish Sharma(gaurish)
* | | | | | Remove redundant 'like' from doc of slice! method [ci skip]Mehmet Emin İNAÇ2015-05-261-1/+1
| | | | | |
* | | | | | Merge pull request #16938 from akshay-vishnoi/remove-depricationYves Senn2015-05-264-168/+5
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | Remove `.superclass_delegating_accessor`.
| * | | | | Remove `.superclass_delegating_accessor`. Refer #14271Akshay Vishnoi2015-05-244-168/+4
| |/ / / /
* | | | | [skip ci] Update documentation for Duration#to_sAnton Davydov2015-05-251-0/+4
| | | | |
* | | | | Merge pull request #20286 from davydovanton/doc-deprecation-behaviorAbdelkader Boudih2015-05-251-0/+12
|\ \ \ \ \ | | | | | | | | | | | | Add documentation for Deprecation::Behavior module
| * | | | | [skip ci] Add documentation for Deprecation::Behavior moduleAnton Davydov2015-05-251-0/+12
| | | | | |
* | | | | | s/contstant/constant re #20282 [ci skip]Zachary Scott2015-05-241-2/+2
| | | | | |
* | | | | | Merge pull request #20282 from davydovanton/doc-proxy-wrappersZachary Scott2015-05-241-0/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add documentation for DeprecatedConstantProxy#class
| * | | | | | [skip ci] Add documentation for DeprecatedConstantProxy#classAnton Davydov2015-05-241-0/+5
| |/ / / / /
* | / / / / use keyword arguments in HTTP request methods of assert_difference example ↵yuuji.yaginuma2015-05-241-9/+9
| |/ / / / |/| | | | | | | | | | | | | | [ci skip]
* | | | | Merge pull request #20251 from davydovanton/doc-memory-storeRafael Mendonça França2015-05-212-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Add nodoc label for protected Cache methods