inflections 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ac993d430f556418fbee44d79c1f5b11fc31653
4
- data.tar.gz: d6b997e6d402a2beaf57cecc36ed9c3392b181a8
3
+ metadata.gz: de0afd7263d22768a902318aae96d0c16602d3d6
4
+ data.tar.gz: 610ddbc4350533bab6e0acc3c3f2b529411abdc9
5
5
  SHA512:
6
- metadata.gz: b850277bbcbeadb2c51022f4587131d4808ce100d8ea2d6fd35889d71e9addeda4ffdf45d6a01c6bf68be2c25f86b2c9e38e13d99824cf738811187cfb0cb935
7
- data.tar.gz: 1c1422da8bffccab323b8ae27f8a75f03ef74f42df3d41b260ad9c1a59b1e4382f1d1d27e345bb98b069c658016e53e895cbad054b2f8c991642bbfe022dde02
6
+ metadata.gz: 4ac0437626498016422653003a80d552b027eab3669bfd097a75c3b1fb493f4fd3083751c910fa088591fa2340f3be83e1c69361015c9ba6b6c406868b89dbb5
7
+ data.tar.gz: 5be371032c050ee7d4d6169d6350522716e79a6eadc1a2314b2a62af292c230ae3d06e269ebfcc4f9bd52e777b1160ac148bd6ca05eaef7cdcb76e02e03cf678
@@ -3,6 +3,6 @@ language: ruby
3
3
  rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
+ - 2.1.0
6
7
  - jruby-19mode
7
- - rbx-19mode
8
8
 
@@ -22,20 +22,13 @@ $ bundle
22
22
 
23
23
  ## Usage
24
24
 
25
- ### Ruby on Rails
26
-
27
- You're done. The default inflections defined in ActiveSupport will be overwritten, and you can continue to define your own special cases in `config/intializers/inflections.rb`. I18n's default locale (set in `config/application.rb`) will determine which inflections are loaded.
28
-
29
- ### Otherwise
30
-
31
- Wherever you need 'em:
25
+ To inflect strings in a different locale:
32
26
 
33
27
  ```ruby
34
- require 'inflections'
35
-
36
- # Or require specific locales
37
- # require 'inflections/en'
38
- # require 'inflections/es'
28
+ 'persona'.pluralize(:es)
29
+ # => "personas"
30
+ 'madame'.pluralze(:fr)
31
+ # => "mesdames"
39
32
  ```
40
33
 
41
34
  Define your own additional rules as such:
@@ -51,10 +44,9 @@ end
51
44
 
52
45
  # Rails < 4.0.0
53
46
 
54
- If you're not using ActiveSupport 4.0, the multilingual Inflector won't be supported. You'll have to choose which locale you use. [Read more about the multilingual Inflector](http://davidcelis.com/blog/2012/07/31/edge-rails-a-multilingual-inflector/).
47
+ If you're not using ActiveSupport 4, the [multilingual Inflector](http://davidcelis.com/blog/2012/07/31/edge-rails-a-multilingual-inflector/) won't be supported. You should install inflections 3.2.x and you'll have to choose which locale you use by requiring a specific file:
55
48
 
56
49
  ```ruby
57
- # Require the old version and choose your locale
58
50
  gem 'inflections', '~> 3.2', require: 'inflections/en'
59
51
  ```
60
52
 
@@ -16,5 +16,5 @@ Gem::Specification.new do |gem|
16
16
  gem.add_development_dependency 'rake'
17
17
  gem.add_development_dependency 'minitest'
18
18
 
19
- gem.add_dependency 'activesupport', '4.0.0.beta1'
19
+ gem.add_dependency 'activesupport', '>= 4.0.0'
20
20
  end
@@ -1,8 +1,7 @@
1
1
  module Inflections
2
2
  MAJOR = 4
3
3
  MINOR = 0
4
- PATCH = 0
5
- PRE = nil
4
+ PATCH = 1
6
5
 
7
- VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join '.'
6
+ VERSION = [MAJOR, MINOR, PATCH].compact.join '.'
8
7
  end
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
  require 'inflections/en-GB'
3
3
 
4
- class TestEnglishInflections < MiniTest::Unit::TestCase
4
+ class TestEnglishInflections < Minitest::Test
5
5
  def test_regular_plurals
6
6
  assert_equal 'dogs', 'dog'.pluralize(:'en-GB')
7
7
  assert_equal 'dog', 'dogs'.singularize(:'en-GB')
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
  require 'inflections/en'
3
3
 
4
- class TestEnglishInflections < MiniTest::Unit::TestCase
4
+ class TestEnglishInflections < Minitest::Test
5
5
  def test_regular_plurals
6
6
  assert_equal 'dogs', 'dog'.pluralize(:en)
7
7
  assert_equal 'dog', 'dogs'.singularize(:en)
@@ -3,7 +3,7 @@
3
3
  require 'test_helper'
4
4
  require 'inflections/es'
5
5
 
6
- class TestSpanishInflections < MiniTest::Unit::TestCase
6
+ class TestSpanishInflections < Minitest::Test
7
7
  def test_plurales_regulares
8
8
  assert_equal 'libros', 'libro'.pluralize(:es)
9
9
  assert_equal 'libro', 'libros'.singularize(:es)
@@ -3,7 +3,7 @@
3
3
  require 'test_helper'
4
4
  require 'inflections/fr'
5
5
 
6
- class TestFrenchInflections < MiniTest::Unit::TestCase
6
+ class TestFrenchInflections < Minitest::Test
7
7
  def test_regular_plurals
8
8
  assert_equal 'amis', 'ami'.pluralize(:fr)
9
9
  assert_equal 'ami', 'amis'.singularize(:fr)
@@ -57,7 +57,7 @@ class TestFrenchInflections < MiniTest::Unit::TestCase
57
57
  def test_exceptions_to_ending_in_ail
58
58
  assert_equal 'travaux', 'travail'.pluralize(:fr)
59
59
  assert_equal 'travail', 'travaux'.singularize(:fr)
60
-
60
+
61
61
  assert_equal 'baux', 'bail'.pluralize(:fr)
62
62
  assert_equal 'bail', 'baux'.singularize(:fr)
63
63
 
@@ -3,7 +3,7 @@
3
3
  require 'test_helper'
4
4
  require 'inflections/kk'
5
5
 
6
- class TestKazakhInflections < MiniTest::Unit::TestCase
6
+ class TestKazakhInflections < Minitest::Test
7
7
  def test_voiceless
8
8
  assert_equal 'сабақтар', 'сабақ'.pluralize(:kk)
9
9
  assert_equal 'сабақ', 'сабақтар'.singularize(:kk)
@@ -3,7 +3,7 @@
3
3
  require 'test_helper'
4
4
  require 'inflections/nb'
5
5
 
6
- class TestNorwegianBokmalInflections < MiniTest::Unit::TestCase
6
+ class TestNorwegianBokmalInflections < Minitest::Test
7
7
  def test_svake_substantiv_er
8
8
  assert_equal 'hunder', 'hund'.pluralize(:nb)
9
9
  assert_equal 'hund', 'hunder'.singularize(:nb)
@@ -3,7 +3,7 @@
3
3
  require 'test_helper'
4
4
  require 'inflections/tr'
5
5
 
6
- class TestTurkishInflections < MiniTest::Unit::TestCase
6
+ class TestTurkishInflections < Minitest::Test
7
7
  def test_regular_plurals
8
8
  assert_equal 'günler', 'gün'.pluralize(:tr)
9
9
  assert_equal 'gün', 'günler'.singularize(:tr)
@@ -16,7 +16,7 @@ class TestTurkishInflections < MiniTest::Unit::TestCase
16
16
 
17
17
  assert_equal 'köpekler', 'köpek'.pluralize(:tr)
18
18
  assert_equal 'köpek', 'köpekler'.singularize(:tr)
19
-
19
+
20
20
  assert_equal 'testler', 'test'.pluralize(:tr)
21
21
  assert_equal 'test', 'testler'.singularize(:tr)
22
22
 
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inflections
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Celis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-12 00:00:00.000000000 Z
11
+ date: 2015-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activesupport
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 4.0.0.beta1
47
+ version: 4.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 4.0.0.beta1
54
+ version: 4.0.0
55
55
  description: A better set of singularization and pluralization rules for Ruby/Rails
56
56
  applications using ActiveSupport.
57
57
  email:
@@ -60,8 +60,8 @@ executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - .gitignore
64
- - .travis.yml
63
+ - ".gitignore"
64
+ - ".travis.yml"
65
65
  - CHANGELOG.markdown
66
66
  - Gemfile
67
67
  - LICENSE
@@ -94,17 +94,17 @@ require_paths:
94
94
  - lib
95
95
  required_ruby_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - '>='
97
+ - - ">="
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.0.3
107
+ rubygems_version: 2.4.5
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Sane inflection rules for ActiveSupport.