string_inflection 0.1.1 → 0.1.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ca9cdd00caffd2c562f56c1ec2e35effab1c4de
|
4
|
+
data.tar.gz: d0267bb698110d8dc38c1224e183f57c65b20b81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 019e09b3f9346e786d70c87221f3bfdfee6ec13b6563a1bf7997c8e80989243749e9ce2229879e914b75ae017d4d2913df7eec833635acc3a945a07092a21df0
|
7
|
+
data.tar.gz: 247143fe9f30fbb09834fc16b91ac5c2454fa1a557b07c50fdad113fdeebb4be516d0621f26006a06d17c20dfecff277ebbef91e94a40dbada44802fec2d94ad
|
@@ -11,11 +11,10 @@ module StringInflection
|
|
11
11
|
extend Method
|
12
12
|
@method_definition = proc {
|
13
13
|
s = split(/[^\w]/).last
|
14
|
-
s.downcase
|
15
|
-
diff = StringInflection.singulars[s]
|
14
|
+
diff = StringInflection.singulars[s.downcase]
|
16
15
|
return s[0..(-1 - diff[0])] + diff[1] if diff
|
17
16
|
SINGULAR_PATTERNS.each do |i|
|
18
|
-
s if s.sub!(i[0], i[1])
|
17
|
+
return s if s.sub!(i[0], i[1])
|
19
18
|
end
|
20
19
|
s + 's'
|
21
20
|
}
|
@@ -11,8 +11,7 @@ module StringInflection
|
|
11
11
|
extend Method
|
12
12
|
@method_definition = proc {
|
13
13
|
s = split(/[^\w]/).last
|
14
|
-
s.downcase
|
15
|
-
diff = StringInflection.plurals[s]
|
14
|
+
diff = StringInflection.plurals[s.downcase]
|
16
15
|
return s[0..(-1 - diff[0])] + diff[1] if diff
|
17
16
|
PLURAL_PATTERNS.each do |i|
|
18
17
|
return s if s.sub!(i[0], i[1])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: string_inflection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1
|
4
|
+
version: 0.1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mosop
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|