Commit Graph

6152 Commits

Author SHA1 Message Date
Yves Senn
92d170074c Merge pull request #20534 from qnm/activesupport-require-issue
Add require to ensure Time#advance works without implicit required
2015-09-07 17:02:41 +02:00
Yves Senn
2aad0b4168 Merge pull request #21250 from ronakjangir47/safe_const
safe_constantize - Added Object scoped missing test cases
2015-09-07 08:52:36 +02:00
Ronak Jangir
953a83e918 Removed Extra ‘the’ [ci skip] 2015-09-06 14:20:06 +05:30
Ronak Jangir
f96c7d963c safe_constantize - Added Object scoped missing test cases 2015-09-06 13:34:24 +05:30
Anshul Sharma
6cb7faf3a2 Update Unicode Version to 8.0.0 2015-09-04 00:16:03 +05:30
Yves Senn
d463b24f15 docs, make blank? behavior clear. Closes #21468. [ci skip] 2015-09-02 19:07:53 +02:00
Zachary Scott
aa3acf85cb Merge pull request #21467 from yui-knk/doc/subscribe
[ci skip] Add description about which object
2015-09-02 09:43:50 -04:00
yui-knk
42c95b690f [ci skip] Add description about which object
`ActiveSupport::Notifications.subscribe` expects as second parameter.
2015-09-02 21:51:06 +09:00
Rafael Mendonça França
ca32e61c2a No need CHANGELOG entry for #21421 [ci skip] 2015-09-01 00:11:58 -03:00
Leigh Halliday
7abbe137b7 ArrayInquirer to correctly find symbols or strings
The problem existed where if your ArrayInquirer values were
strings but you checked them using any? with a symbol, it would
not find the value. Now it will correctly check whether both
the String form or the Symbol form are included in the Array.

`
2015-08-28 16:20:02 -04:00
Robin Dupret
7a27de2bb0 Tiny documentation improvements [ci skip] 2015-08-28 15:33:48 +02:00
Vipul A M
7f23c5d524 - Extracted DELIMITED_REGEX to delimited_regex method and made use of user passed options[:delimited_regex] if available. Changed DELIMITED_REGEX to DEFAULT)DELIMITED_REGEX to signify what it means.
- Added tests for number to delimited and number to currency in both actionview and activesupport.

Changes

Changes
2015-08-28 11:34:17 +05:30
Jean Boussier
2e0cd0f371 10X speed improvements for AS::Dependencies.loadable_constants_for_path
When the autoload_paths start to grows, this methods is quite a hotspot

>> ActiveSupport::Dependencies.autoload_paths.size
=> 49

>> Benchmark.ips { |x| x.report('baseline') { ActiveSupport::Dependencies.loadable_constants_for_path(File.expand_path('app/models/shop')) }}
Calculating -------------------------------------
            baseline    90.000  i/100ms
-------------------------------------------------
            baseline      1.073k (±20.2%) i/s -      4.950k

After the patch

Calculating -------------------------------------
             patched   883.000  i/100ms
-------------------------------------------------
             patched     11.050k (±19.7%) i/s -     50.331k
2015-08-27 21:49:04 -04:00
Kasper Timm Hansen
a20c5236bf Merge pull request #21387 from ronakjangir47/remove_dup_minitest
Removed duplicate require 'minitest/mock'
2015-08-26 20:27:30 +02:00
Ronak Jangir
8d7bf97798 Removed duplicate requiring minitest/mock as it is already required in method_call_assertions 2015-08-26 19:43:54 +05:30
Ronak Jangir
1be7fcad6b Fixed to_datetime docs [ci skip] 2015-08-26 10:20:50 +05:30
Kasper Timm Hansen
c5a88e5004 Merge pull request #21257 from jdantonio/async-job
Initial implementation of ActiveJob AsyncAdapter.
2015-08-25 21:37:27 +02:00
Rafael Mendonça França
4788d7fd17 Merge pull request #21281 from ronakjangir47/added_docs
Added docs for TimeWithZone [ci skip]
2015-08-25 16:12:51 -03:00
Jerry D'Antonio
25a4155257 Initial implementation of ActiveJob AsyncAdapter. 2015-08-25 14:22:11 -04:00
Aaron Patterson
211f55d4fd use caller_locations instead of caller
We have `caller_locations`, so we don't need to parse the strings in the
callstack.
2015-08-24 18:39:35 -07:00
Sam Auciello
12208d4f66 minor documentation improvement [ci skip] 2015-08-24 18:00:40 -04:00
Gaurav Sharma
a50872d51d temp files are no more require
`💅`
2015-08-25 01:36:05 +05:30
Vijay Dev
4f252cddc1 Merge branch 'master' of github.com:rails/rails
Conflicts:
	guides/source/security.md
2015-08-24 06:05:07 +00:00
Matthew Draper
eb73110135 Merge pull request #16245 from byroot/more-atomic-write
File renaming should be the last operation of an atomic write
2015-08-21 01:32:43 +09:30
Jean Boussier
5d3b3cba4a File renaming should be the last operation of an atomic write 2015-08-20 11:51:32 -04:00
Yves Senn
013dd756e1 Merge pull request #21300 from jonahb/cache
Correct cache store superclass in comment [ci skip]
2015-08-20 09:43:02 +02:00
Kasper Timm Hansen
c83b117d4b Merge pull request #21279 from ronakjangir47/test_cleanup
Cleaned up generators tests using internal assertion helper
2015-08-20 07:37:59 +02:00
Ronak Jangir
63a70ad6ff Cleaned up generators tests using internal assertion helper 2015-08-20 09:22:56 +05:30
Jonah Burke
d617347be8 Correct cache store superclass in comment 2015-08-19 15:26:18 -04:00
Ronak Jangir
ef9caad63e Added docs for TimeWithZone [ci skip] 2015-08-18 12:08:04 +05:30
Jean Boussier
a94c2e1f23 Use == 0 instead of .zero? in #try
The perf gain is relatively minor but consistent:

```
Calculating -------------------------------------
             0.zero?   137.091k i/100ms
             1.zero?   137.350k i/100ms
              0 == 0   142.207k i/100ms
              1 == 0   144.724k i/100ms
-------------------------------------------------
             0.zero?      8.893M (± 6.5%) i/s -     44.280M
             1.zero?      8.751M (± 6.4%) i/s -     43.677M
              0 == 0     10.033M (± 7.0%) i/s -     49.915M
              1 == 0      9.814M (± 8.0%) i/s -     48.772M
```

And try! is quite a big hotspot for us so every little gain is appreciable.
2015-08-17 18:44:51 -04:00
Ronak Jangir
e49c2cd743 Replacing lambda with proc getting argument error because of it. 2015-08-17 20:28:00 +05:30
Lucas Mazza
549c681184 [ci skip] Add missing super to the setup of the ActiveSupport::LogSubscriber::TestHelper example. 2015-08-14 14:20:51 -03:00
Rafael Mendonça França
9a4a436fd7 Merge pull request #20647 from twalpole/method_source_dependency
Add method_source dependency to activesupport
2015-08-14 14:06:23 -03:00
Kasper Timm Hansen
0650d08488 Merge pull request #21025 from ronakjangir47/asserts
Added helper methods to stub any instance
2015-08-13 09:56:38 +02:00
Yves Senn
3b0e1e49e0 Merge pull request #21219 from repinel/assert-human-size-prefix-deprecated
Assert that the `:prefix` option of `number_to_human_size` is deprecated
2015-08-13 08:34:54 +02:00
Ronak Jangir
bfe7532876 Added helper methods to stub any instance 2015-08-13 08:32:35 +05:30
Roque Pinel
d723bc315e Assert that the :prefix option of number_to_human_size is deprecated 2015-08-12 21:49:12 -04:00
Zachary Scott
32424b6bfb Merge pull request #21217 from myrridin/myrridin-documentation-updates
[ci skip] Documentation: Switch around a common phrase for readability
2015-08-12 20:56:28 -04:00
akihiro17
93dc0b43d1 [ci skip] Fix rdoc markup 2015-08-12 23:53:10 +09:00
Godfrey Chan
94db733561 :nodoc: internal class [ci skip] 2015-08-10 21:05:06 -07:00
Jean Boussier
e96403bd5c Deprecate :si prefix in number_to_human_size without replacement 2015-08-10 23:35:05 -04:00
Jean Boussier
7081106457 Deprecate the :prefix option of number_to_human_size 2015-08-10 23:15:09 -04:00
Kasper Timm Hansen
a0fa45c0e6 Merge pull request #21124 from kirs/feature/reload-i18n
Reload I18n.load_path in development
2015-08-10 07:34:13 +02:00
Kir Shatrov
f50e90a1ae Reload I18n locales in development 2015-08-10 00:17:49 +02:00
Claudio B.
6e21494ac6 Merge pull request #21173 from repinel/fix-callback-terminator-docs
[ci skip] Fix the AS::Callbacks terminator docs
2015-08-08 13:40:39 -07:00
Roque Pinel
6a17897178 [ci skip] Fix the AS::Callbacks terminator docs
The second argument of the terminator lambda is no longer the result
of the callback, but the result lambda.

3a7609e2ba/activesupport/test/callbacks_test.rb (L553)
2015-08-08 13:40:33 -04:00
Aaron Lasseigne
725f9bf3e2 replace each with each_key when only the key is needed
Using each_key is faster and more intention revealing.

Calculating -------------------------------------
                each    31.378k i/100ms
            each_key    33.790k i/100ms
-------------------------------------------------
                each    450.225k (± 7.0%) i/s -      2.259M
            each_key    494.459k (± 6.3%) i/s -      2.467M

Comparison:
            each_key:   494459.4 i/s
                each:   450225.1 i/s - 1.10x slower
2015-08-08 11:54:09 -05:00
schneems
752432e82f Regexp#=== is faster than String#=~
Discussion https://github.com/JuanitoFatas/fast-ruby/pull/59#issuecomment-128513763
2015-08-07 11:16:32 -05:00
Lachlan Sylvester
a51dad1c52 Only invoke the default block for mattr_accessor once so that it does not cause issues if it is not idempotent 2015-08-07 20:05:02 +10:00