- 26 5月, 2014 1 次提交
-
-
由 Akshay Vishnoi 提交于
`yield` was missing in #with_dup, due to which 57 assertions were not running in real, and all tests were passing by default. Error was introduced in commit - 31ceb5e6.
-
- 11 4月, 2014 1 次提交
-
-
由 Akshay Vishnoi 提交于
-
- 29 11月, 2013 1 次提交
-
-
由 Lihan Li 提交于
-
- 07 11月, 2013 1 次提交
-
-
由 claudiob 提交于
So strings can be humanized without being capitalized: 'employee_salary'.humanize # => "Employee salary" 'employee_salary'.humanize(capitalize: false) # => "employee salary"
-
- 21 8月, 2013 1 次提交
-
-
由 Gaurish Sharma 提交于
-
- 03 8月, 2013 1 次提交
-
-
由 Gaurish Sharma 提交于
When we call define_method with non-english chars like ¿por qué? it errors out on JRuby as of 1.7.4 & would leave out the following error invalid byte sequence in US-ASCII To work around this issue, I have switched to define_test method call define method with fixed string & the index of the hash. the index was added because otherwise, ruby will raise method redefined warning. As far as I can see there are no side-effect of this change for other implementations. For readbility I have added a message to asssert_equal informing for which word/phase the test has passed. Before this Change: JRuby: Tests terminated suddenly with an error. no reported of Failues or errors MRI: All Green. After this Change, JRuby: the `ActiveSupport` TestsSuite gracefully fails with report at the end which test failed & why. MRI: All Green(no change)
-
- 30 7月, 2013 1 次提交
-
-
由 Andrew White 提交于
-
- 10 4月, 2013 2 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts commit fa3ef8e8, reversing changes made to e0af93dd. Reason: Routes, Active Record and the rendering stack should not depend on the default locale
-
- 18 3月, 2013 1 次提交
-
-
由 Vipul A M 提交于
-
- 17 3月, 2013 1 次提交
-
-
由 Steve Klabnik 提交于
This reverts commit 867dc170, reversing changes made to 9a421aaa. This breaks anyone who's using ForceSSL: https://travis-ci.org/rails-api/rails-api/jobs/5556065 Please see comments on #8156 for some discussion.
-
- 16 3月, 2013 1 次提交
-
-
由 Fred Wu 提交于
Fixed a bug where the inflector would replace camelCase strings and disregarding specified acronyms, fixes #8015
-
- 11 3月, 2013 1 次提交
-
-
由 Vipul A M 提交于
-
- 04 1月, 2013 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 02 12月, 2012 2 次提交
-
-
由 Florent Guilleux 提交于
This reverts commit 90c887fa.
-
由 Florent Guilleux 提交于
-
- 24 8月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 31 7月, 2012 1 次提交
-
-
由 David Celis 提交于
The Inflector is currently not very supportive of internationalized websites. If a user wants to singularize and/or pluralize words based on any locale other than English, they must define each case in locale files. Rather than create large locale files with mappings between singular and plural words, why not allow the Inflector to accept a locale? This patch makes ActiveSupport::Inflector locale aware and uses `:en`` unless otherwise specified. Users will still be provided a list of English (:en) inflections, but they may additionally define inflection rules for other locales. Each list is kept separately and permanently. There is no reason to limit users to one list of inflections: ActiveSupport::Inflector.inflections(:es) do |inflect| inflect.plural(/$/, 's') inflect.plural(/([^aeéiou])$/i, '\1es') inflect.plural(/([aeiou]s)$/i, '\1') inflect.plural(/z$/i, 'ces') inflect.plural(/á([sn])$/i, 'a\1es') inflect.plural(/é([sn])$/i, 'e\1es') inflect.plural(/í([sn])$/i, 'i\1es') inflect.plural(/ó([sn])$/i, 'o\1es') inflect.plural(/ú([sn])$/i, 'u\1es') inflect.singular(/s$/, '') inflect.singular(/es$/, '') inflect.irregular('el', 'los') end 'ley'.pluralize(:es) # => "leyes" 'ley'.pluralize(:en) # => "leys" 'avión'.pluralize(:es) # => "aviones" 'avión'.pluralize(:en) # => "avións" A multilingual Inflector should be of use to anybody that is tasked with internationalizing their Rails application. Signed-off-by: NDavid Celis <david@davidcelis.com>
-
- 21 6月, 2012 1 次提交
-
-
由 Godfrey Chan 提交于
This is a follow up to #4719. It appears that singularize and pluralize are supposed to be idempotent - i.e. when you call singularize or pluralize multiple times on the same string, you should get the same result. (At least for the "officially supported" cases that the stock inflector is designed to handle.) #4719 added the missing tests for regular cases, and this commit added the missing tests for the irregularities. While I'm at that, I also synced up the irregularity test cases with the current set of irregularity cases that we ship out-of-the-box.
-
- 25 2月, 2012 1 次提交
-
-
由 Xavier Noria 提交于
Trying alternative implementations of the inflections is hard because the suite is coupled with the current one, setting ivars by hand etc. This commit relies on initialize_dup, as long as you maintain that one you can tweak the implementation.
-
- 04 2月, 2012 1 次提交
-
-
由 Tim Gildea 提交于
-
- 27 1月, 2012 1 次提交
-
-
由 Mark McSpadden 提交于
Add Inflection test (and fixes) to ensure singularizing a singular actually give you the correct singular in more cases
-
- 06 1月, 2012 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 30 10月, 2011 1 次提交
-
-
由 Xavier Noria 提交于
This commit also implements a faster version of #demodulize I was unable to isolate with git add --patch. Not a big fan of the name #deconstantize. It complements #demodulize getting rid of the rightmost constant, hence the name, but it is unrelated to the well-known #constantize. So unsure. Could not come with anything better, please feel free to rename.
-
- 29 10月, 2011 1 次提交
-
-
由 Xavier Noria 提交于
This is also faster on 1.9.
-
- 23 9月, 2011 1 次提交
-
-
由 Ryan Oblak 提交于
Added ActiveSupport::Inflector.safe_constantize and String#safe_constantize; refactored common constantize tests into ConstantizeTestCases
-
- 09 9月, 2011 1 次提交
-
-
由 José Valim 提交于
-
- 08 9月, 2011 1 次提交
-
-
由 Damien Mathieu 提交于
-
- 11 6月, 2011 2 次提交
- 25 4月, 2011 1 次提交
-
-
由 Stefan Huber 提交于
-
- 01 3月, 2011 1 次提交
-
-
由 Sam Elliott 提交于
[#6490 state:committed] Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
- 17 2月, 2011 1 次提交
-
-
由 Dan Pickett 提交于
[#6363] Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
- 22 12月, 2010 2 次提交
-
-
由 Piotr Sarnacki 提交于
-
由 John Paul Ashenfelter 提交于
Added a word boundary to uncountable inflection regex for #singularize so short inflections like ors do not affect larger words like sponsors [#6093 state:resolved]
-
- 20 5月, 2010 1 次提交
-
-
由 Santiago Pastorino 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 10 8月, 2009 1 次提交
-
-
由 Prem Sichanugrist 提交于
Fix that irregular plural inflections should not be double-pluralized: 'people'.pluralize should return 'people' not 'peoples'. [#1183 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
- 02 7月, 2009 1 次提交
-
-
Signed-off-by: NYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
-
- 23 4月, 2009 1 次提交
-
-
由 Jeremy Kemper 提交于
-
- 11 3月, 2009 1 次提交
-
-
由 Henrik N 提交于
Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
-