inflections 3.2.11 → 3.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.markdown +6 -2
- data/README.markdown +1 -0
- data/lib/inflections.rb +7 -0
- data/lib/inflections/tr.rb +16 -0
- data/lib/inflections/version.rb +1 -1
- data/test/tr_test.rb +37 -0
- metadata +14 -20
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 943514dad862a0595bce5ac096bab606c02459b4
|
|
4
|
+
data.tar.gz: 5914a88010f1f0a70a3d1dba851b82eee16acb38
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 771e4fba98d606525132e4bbec89fde3dbf2c05572401df341bb42ef7486283b3b9077af1e4cd4d4495349c3f670f13994f08522240da9744476092d360256c6
|
|
7
|
+
data.tar.gz: d1d2b5af70d2d915d5a4866280be35244d0dbd4cb378b5d4f4a5026814b3cc8ad430c0ebe2ed1c7d9818ba32bc3d45a5249442626bf3892484edac0e116589c1
|
data/.travis.yml
CHANGED
data/CHANGELOG.markdown
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
3.2.
|
|
2
|
-
|
|
1
|
+
3.2.12 (Current release)
|
|
2
|
+
========================
|
|
3
|
+
* Support for Turkish (thanks to [Ferhat Elmas](https://github.com/ferhatelmas))
|
|
4
|
+
|
|
5
|
+
3.2.9.20121206
|
|
6
|
+
==============
|
|
3
7
|
* Support for Kazakh (thanks to [Galymzhan Kozhayev](https://github.com/galymzhan))
|
|
4
8
|
|
|
5
9
|
3.2.9
|
data/README.markdown
CHANGED
data/lib/inflections.rb
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
module Inflections
|
|
4
|
+
ActiveSupport::Inflector.inflections do |inflect|
|
|
5
|
+
inflect.clear
|
|
6
|
+
|
|
7
|
+
inflect.plural(/([aoıu][^aoıueöiü]{,6})$/, '\1lar')
|
|
8
|
+
inflect.plural(/([eöiü][^aoıueöiü]{,6})$/, '\1ler')
|
|
9
|
+
|
|
10
|
+
inflect.singular(/l[ae]r$/i, '')
|
|
11
|
+
|
|
12
|
+
inflect.irregular('ben', 'biz')
|
|
13
|
+
inflect.irregular('sen', 'siz')
|
|
14
|
+
inflect.irregular('o', 'onlar')
|
|
15
|
+
end
|
|
16
|
+
end
|
data/lib/inflections/version.rb
CHANGED
data/test/tr_test.rb
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
require 'test_helper'
|
|
4
|
+
require 'inflections/tr'
|
|
5
|
+
|
|
6
|
+
class TestTurkishInflections < MiniTest::Unit::TestCase
|
|
7
|
+
def test_regular_plurals
|
|
8
|
+
assert_equal 'günler', 'gün'.pluralize
|
|
9
|
+
assert_equal 'gün', 'günler'.singularize
|
|
10
|
+
|
|
11
|
+
assert_equal 'kirazlar', 'kiraz'.pluralize
|
|
12
|
+
assert_equal 'kiraz', 'kirazlar'.singularize
|
|
13
|
+
|
|
14
|
+
assert_equal 'kitaplar', 'kitap'.pluralize
|
|
15
|
+
assert_equal 'kitap', 'kitaplar'.singularize
|
|
16
|
+
|
|
17
|
+
assert_equal 'köpekler', 'köpek'.pluralize
|
|
18
|
+
assert_equal 'köpek', 'köpekler'.singularize
|
|
19
|
+
|
|
20
|
+
assert_equal 'testler', 'test'.pluralize
|
|
21
|
+
assert_equal 'test', 'testler'.singularize
|
|
22
|
+
|
|
23
|
+
assert_equal 'üçgenler', 'üçgen'.pluralize
|
|
24
|
+
assert_equal 'üçgen', 'üçgenler'.singularize
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def test_irregulars
|
|
28
|
+
assert_equal 'biz', 'ben'.pluralize
|
|
29
|
+
assert_equal 'ben', 'biz'.singularize
|
|
30
|
+
|
|
31
|
+
assert_equal 'siz', 'sen'.pluralize
|
|
32
|
+
assert_equal 'sen', 'siz'.singularize
|
|
33
|
+
|
|
34
|
+
assert_equal 'o', 'onlar'.singularize
|
|
35
|
+
assert_equal 'onlar', 'o'.pluralize
|
|
36
|
+
end
|
|
37
|
+
end
|
metadata
CHANGED
|
@@ -1,52 +1,46 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: inflections
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.2.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 3.2.12
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- David Celis
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
11
|
+
date: 2013-02-27 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: rake
|
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
16
|
requirements:
|
|
19
|
-
- -
|
|
17
|
+
- - '>='
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
21
19
|
version: '0'
|
|
22
20
|
type: :development
|
|
23
21
|
prerelease: false
|
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
-
none: false
|
|
26
23
|
requirements:
|
|
27
|
-
- -
|
|
24
|
+
- - '>='
|
|
28
25
|
- !ruby/object:Gem::Version
|
|
29
26
|
version: '0'
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
|
31
28
|
name: minitest
|
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
|
33
|
-
none: false
|
|
34
30
|
requirements:
|
|
35
|
-
- -
|
|
31
|
+
- - '>='
|
|
36
32
|
- !ruby/object:Gem::Version
|
|
37
33
|
version: '0'
|
|
38
34
|
type: :development
|
|
39
35
|
prerelease: false
|
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
-
none: false
|
|
42
37
|
requirements:
|
|
43
|
-
- -
|
|
38
|
+
- - '>='
|
|
44
39
|
- !ruby/object:Gem::Version
|
|
45
40
|
version: '0'
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
|
47
42
|
name: activesupport
|
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
|
49
|
-
none: false
|
|
50
44
|
requirements:
|
|
51
45
|
- - ~>
|
|
52
46
|
- !ruby/object:Gem::Version
|
|
@@ -54,7 +48,6 @@ dependencies:
|
|
|
54
48
|
type: :runtime
|
|
55
49
|
prerelease: false
|
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
-
none: false
|
|
58
51
|
requirements:
|
|
59
52
|
- - ~>
|
|
60
53
|
- !ruby/object:Gem::Version
|
|
@@ -82,6 +75,7 @@ files:
|
|
|
82
75
|
- lib/inflections/kk.rb
|
|
83
76
|
- lib/inflections/nb.rb
|
|
84
77
|
- lib/inflections/railtie.rb
|
|
78
|
+
- lib/inflections/tr.rb
|
|
85
79
|
- lib/inflections/version.rb
|
|
86
80
|
- test/en-GB_test.rb
|
|
87
81
|
- test/en_test.rb
|
|
@@ -89,29 +83,29 @@ files:
|
|
|
89
83
|
- test/kk_test.rb
|
|
90
84
|
- test/nb_test.rb
|
|
91
85
|
- test/test_helper.rb
|
|
86
|
+
- test/tr_test.rb
|
|
92
87
|
homepage: https://github.com/davidcelis/inflections
|
|
93
88
|
licenses: []
|
|
89
|
+
metadata: {}
|
|
94
90
|
post_install_message:
|
|
95
91
|
rdoc_options: []
|
|
96
92
|
require_paths:
|
|
97
93
|
- lib
|
|
98
94
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
99
|
-
none: false
|
|
100
95
|
requirements:
|
|
101
|
-
- -
|
|
96
|
+
- - '>='
|
|
102
97
|
- !ruby/object:Gem::Version
|
|
103
98
|
version: '0'
|
|
104
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
|
-
none: false
|
|
106
100
|
requirements:
|
|
107
|
-
- -
|
|
101
|
+
- - '>='
|
|
108
102
|
- !ruby/object:Gem::Version
|
|
109
103
|
version: '0'
|
|
110
104
|
requirements: []
|
|
111
105
|
rubyforge_project:
|
|
112
|
-
rubygems_version:
|
|
106
|
+
rubygems_version: 2.0.0
|
|
113
107
|
signing_key:
|
|
114
|
-
specification_version:
|
|
108
|
+
specification_version: 4
|
|
115
109
|
summary: Sane inflection rules for ActiveSupport.
|
|
116
110
|
test_files:
|
|
117
111
|
- test/en-GB_test.rb
|
|
@@ -119,4 +113,4 @@ test_files:
|
|
|
119
113
|
- test/es_test.rb
|
|
120
114
|
- test/kk_test.rb
|
|
121
115
|
- test/nb_test.rb
|
|
122
|
-
|
|
116
|
+
- test/tr_test.rb
|