Commit Graph

5263 Commits

Author SHA1 Message Date
Carlos Antonio da Silva
f63c6e57ee Fix secrets.yml path in exception message
The file is config/secrets.yml, not config/initializers/secrets.yml.
2014-01-20 08:58:43 -02:00
Guillermo Iguaran
18e9188709 Merge pull request #13765 from robertomiranda/secrets_token
Update Error Message when secrets.secret_key_base isn't given
2014-01-19 20:08:32 -08:00
robertomiranda
90228a168b Update Error Message when secrets.secret_key_base isn't given 2014-01-19 22:29:34 -05:00
Anna Carey
0e9144dcec set encoding to binmode for pipe 2014-01-17 16:49:10 -05:00
Rafael Mendonça França
a49727213c Consistence in the block style 2014-01-17 00:30:41 -02:00
Rafael Mendonça França
5402b72faa Remove warnings on Ruby 2.1 2014-01-17 00:10:25 -02:00
Rafael Mendonça França
bcd6def32b Remove warning 2014-01-16 20:36:38 -02:00
Aaron Patterson
44c51fc9cc define the delegate methods on one line. fixes #13724
sup haters
2014-01-16 11:55:48 -08:00
Piotr Sarnacki
fbab7b2acc Revert "methods are defined right after the module_eval, so we don't need to do"
This change breaks tests in activesupport/test/core_ext/module_test.rb:

* test_delegation_exception_backtrace
* test_delegation_exception_backtrace_with_allow_nil

This reverts commit 0167765e3f84260522bc2f32d926c1f5dd44957c.
2014-01-16 10:45:53 +01:00
Aaron Patterson
0167765e3f methods are defined right after the module_eval, so we don't need to do
any line number maths
2014-01-15 16:07:12 -08:00
Yves Senn
d901699aca Merge pull request #13709 from akshay-vishnoi/typo
[ci skip] Grammar correction
2014-01-14 00:29:32 -08:00
Akshay Vishnoi
a71a8e2a35 [ci skip] Grammar correction 2014-01-14 13:43:47 +05:30
Gaurish Sharma
35e56f6fa5 standardize on jruby_skip & rbx_skip
This Adds helpers(jruby_skip & rbx_skip). In Future, Plan is to use
these helpers instead of calls directly to
RUBY_ENGINE/RbConfig/JRUBY_VERSION
2014-01-13 19:51:47 +05:30
Godfrey Chan
2b4ed72225 Merge pull request #13646 from jenseng/json_escape
Clarify behavior of json_escape [ci skip]
2014-01-12 20:50:38 -08:00
Andrew White
75c271198a Merge pull request #13668 from prathamesh-sonpatki/issue-13667
Fix iterating over DateTime by doing strict checking for Time objects
2014-01-12 00:24:50 -08:00
Prathamesh Sonpatki
1842a6920f Fix iterating over DateTime by doing strict checking for Time objects
- Fixes #13667
2014-01-11 18:35:38 +05:30
Jon Jensen
7ce6840693 Clarify behavior of json_escape, update examples
The behavior of json_escape was fixed in 2f1c5789, but the doc
changes and example in that commit incorrectly indicated that the
return value would be html-safe. Since quotation marks are
preserved, the raw value is not safe to use in other contexts
(specifically HTML attributes).
2014-01-09 20:35:13 -07:00
Aaron Patterson
b0acc77edc Check respond_to before delegation due to: d781caaf31 2014-01-09 14:12:05 -08:00
Rafael Mendonça França
a67f25d50b Merge pull request #13632 from tinogomes/master
Adding Hash#compact and Hash#compact! methods
2014-01-09 10:14:25 -08:00
tinogomes
5121593787 Adding Hash#compact and Hash#compact! methods
* Adding Hash#compact and Hash#compact! methods
  * Using Ruby 1.9 syntax on documentation
  * Updating guides for `Hash#compact` and `Hash#compact!` methods
  * Updating CHANGELOG for ActiveSupport
  * Removing unecessary protected method and lambda for `Hash#compact` implementations
  * Performing `Hash#compact` implementation - https://gist.github.com/tinogomes/8332883
  * fixing order position
  * Fixing typo
2014-01-09 16:02:55 -02:00
Aaron Patterson
e176353b71 clear cache on body close so that cache remains during rendering
fixes #13547

The body may use the local cache during rendering.  `call`ing the app
doesn't mean that rendering is finished, so we need to wait until
`close` is called on the body.
2014-01-08 15:48:19 -08:00
Yves Senn
a03fed88f7 Revert "Speedup String#to"
This reverts commit 2ef1fb2c455ca53a0c1e1768f50824926ce28bd3.

As described in PR #13627 this commit broke functionality when passing
a negative Fixnum to the `String#to` method:

```ruby
assert_equal "hell", s.to(-2)
```

Before the revert, this failed with:

```
  1) Failure:
StringAccessTest#test_#to_with_negative_Fixnum,_position_is_counted_from_the_end [test/core_ext/string_ext_test.rb:275]:
Expected: "hell"
  Actual: nil
```

This revert is to keep the functionality on `master` working.
If there is another way to get the performance benefit and keep
the documented functionality we can add that.

/cc @amatsuda @carlosantoniodasilva
2014-01-08 11:27:43 +01:00
Yves Senn
40a83d740f typo fix in test name. [ci skip]. 2014-01-08 11:15:59 +01:00
Yves Senn
e37f16444a core_ext/string/access.rb test what we are documenting.
I also extracted the tests from a single bulk method into a separate test-case.
The new tests cover the API described in the docs.

There are two skipped tests, which are broken as of 2ef1fb2c455ca53a0c1e1768f50824926ce28bd3
* #to with negative Fixnum, position is counted from the end
* #from and #to can be combined

This was brought to my attention by #13627.

Closes #13627.
2014-01-08 10:25:40 +01:00
Arthur Neves
f3748c886a Add 'e' var on rescue DalliError, in order to log it 2014-01-06 12:47:47 -05:00
Carlos Antonio da Silva
6bf93b22d5 Fix typo in AS changelog, improve highlight [ci skip] 2014-01-06 10:28:44 -02:00
Yves Senn
535bd55fcd quick formatting pass through CHANGELOGS. [ci skip]. 2014-01-06 10:57:00 +01:00
Andrew White
a1564d470d Add CHANGELOG entry for #10634 [ci skip] 2014-01-05 19:23:53 +00:00
Andrew White
ffc273577a Merge pull request #10634 from teleological/time_advance_gregorian
Maintain proleptic gregorian in Time#advance
2014-01-05 11:19:00 -08:00
Arthur Neves
e7f56a7fe8 Raise if MemCacheStore doenst receive a Dalli obj
:mem_cache_store should receive a list of hosts or a dalli client,
otherwise raise it.
Also adding a changelog.
2014-01-03 16:39:50 -05:00
Arthur Neves
98458eea42 mem_cache_store requires dalli, so only accept dalli/client
:mem_cache_store require dalli, rescue Dalli exceptions, and follow Dalli API.
Memcached gem, for instance, doesnt work anymore, as the API are different.

As we already require one client, we should make sure that client works, and not accept others, and if someone wants to use another memcache client they can write their own store adapter.
2014-01-03 15:39:33 -05:00
Andrew White
75ad0e642c Don't lazy load the tzinfo library
Lazy loading the tzinfo library doesn't really buy us anything because
the gem is installed as a dependency via the gemspec and if a developer
is using Active Support outside of Rails then they can cherry pick which
files to load anyway.

Fixes #13553
2014-01-01 20:29:56 +00:00
Vipul A M
98cb3e69af update copyright notices to 2014. [ci skip] 2014-01-01 23:59:49 +05:30
Robin Dupret
afc98eadb8 Avoid raising a NameError on FreeBSD using Date
The Date object has a xmlschema method starting with Ruby 1.9 so we were
assuming that we could safely remove this method and redefine it later
but the call to remove_method throws a NameError on FreeBSD so we should
rely on remove_possible_method instead.

This call is actually needed to avoid warnings when running the test
suite.

Fixes #11723
2014-01-01 15:29:24 +01:00
Xavier Noria
126dc47665 blank? and present? commit to return singletons [Xavier Noria & Pavel Pravosud]
The contract of blank? and present? was in principle to return Object, as we
generally do, the test suite and description was consistent with that, but some
examples had comments like "# => true".

This cannot be unclear, we either fix the examples, or update the contract.

Since users may be already assuming singletons due to the examples and the fact
that they were returned before 30ba7ee, the safest option seems to be to revise
the contract and the implementation of String#blank?

The motivation for 30ba7ee was to improve the performance of the predicate, the
refactor based on === is on par regarding speed.

With this commit we start documenting return types using YARD conventions. We
plan to document return types gradually.
2013-12-28 20:03:38 +01:00
Paul Nikitochkin
37513b10a8 Extracted blank matcher regexp to constant 2013-12-28 16:52:14 +02:00
Norman Clarke
ef28028c45 Update to Unicode 6.3.0
6.3.0 was released on September 30, 2013.

http://unicode-inc.blogspot.com.ar/2013/09/announcing-unicode-standard-version-63.html
2013-12-27 14:56:54 -03:00
Norman Clarke
ab195841dd Use String#scrub when available to tidy bytes 2013-12-26 12:36:52 -03:00
Guillermo Iguaran
82053bee36 Merge pull request #13436 from robin850/patch-11
Add missing changelog entries and fix few typos
2013-12-21 10:56:29 -08:00
Robin Dupret
b894b7b90a Fix few typos in the documentation [ci skip] 2013-12-21 18:59:55 +01:00
Carlos Antonio da Silva
b9c9766cd4 Fix typo [ci skip] 2013-12-21 15:03:32 -02:00
Kenta Murata & Akira Matsuda
9e997e9039 Fix AS::NumberHelper results with large precisions
before:
  ActiveSupport::NumberHelper.number_to_rounded '3.14159', precision: 50
  => "3.14158999999999988261834005243144929409027099609375"
after:
  ActiveSupport::NumberHelper.number_to_rounded '3.14159', precision: 50
  => "3.14159000000000000000000000000000000000000000000000"
2013-12-20 16:26:35 +09:00
Rafael Mendonça França
04ad814bb9 Make sure multiline string is not accepted by the regexp 2013-12-19 17:28:19 -02:00
Xavier Noria
d0829f46db Revert "revises the release notes about message verifiers [ci skip]"
This reverts commit 293a1a68992ba3e3e80f9f0f685e866ff79bf11a.
2013-12-19 19:59:48 +01:00
Xavier Noria
293a1a6899 revises the release notes about message verifiers [ci skip]
Example code does not run yet with beta1.
2013-12-19 19:58:40 +01:00
Vijay Dev
a3b1105ada Merge branch 'master' of github.com:lifo/docrails 2013-12-20 00:10:30 +05:30
Rafael Mendonça França
f70e94cbd2 Merge pull request #13406 from hincupetru/master
Fixed configurable.rb regular expression name check
2013-12-19 08:35:48 -08:00
Hincu Petru
4cb30d9f8b Fixed configurable.rb regular expression name check 2013-12-19 17:30:01 +00:00
Rafael Mendonça França
21fe17a067 Merge pull request #13401 from akshay-vishnoi/refactor
Prevent creation of instance methods when `instance_reader = false`, Grammar checks, Conditional statements combined
2013-12-19 07:39:13 -08:00
Akshay Vishnoi
d4197bc4a2 Prevent creation of instance methods when instance_reader = false, Grammar checks, Conditional statements combined 2013-12-19 19:35:13 +05:30