mack_ruby_core_extensions 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/created.rid +1 -1
- data/doc/files/README.html +1 -1
- data/doc/files/lib/extensions/array_rb.html +1 -1
- data/doc/files/lib/extensions/class_rb.html +1 -1
- data/doc/files/lib/extensions/float_rb.html +1 -1
- data/doc/files/lib/extensions/hash_rb.html +1 -1
- data/doc/files/lib/extensions/kernel_rb.html +1 -1
- data/doc/files/lib/extensions/math_rb.html +1 -1
- data/doc/files/lib/extensions/method_not_implemented_rb.html +1 -1
- data/doc/files/lib/extensions/module_rb.html +1 -1
- data/doc/files/lib/extensions/nil_rb.html +1 -1
- data/doc/files/lib/extensions/object_rb.html +1 -1
- data/doc/files/lib/extensions/string_rb.html +1 -1
- data/doc/files/lib/extensions/symbol_rb.html +1 -1
- data/doc/files/lib/mack_ruby_core_extensions_rb.html +1 -1
- data/doc/files/lib/utils/inflections_rb.html +1 -1
- data/doc/files/lib/utils/inflector_rb.html +1 -1
- data/lib/utils/inflections.rb +2 -1
- data/test/utils/inflection_test.rb +5 -0
- metadata +3 -3
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Sun, 27 Apr 2008 15:50:01 -0400
|
data/doc/files/README.html
CHANGED
data/lib/utils/inflections.rb
CHANGED
@@ -49,6 +49,7 @@ Mack::Utils::Inflector.inflections do |inflect|
|
|
49
49
|
inflect.singular(/(.*)ss$/, '\1ss')
|
50
50
|
inflect.singular(/(.*)ies$/, '\1y')
|
51
51
|
|
52
|
+
inflect.irregular('knowledge', 'knowledge')
|
52
53
|
inflect.irregular('person', 'people')
|
53
54
|
inflect.irregular('child', 'children')
|
54
55
|
inflect.irregular('sex', 'sexes')
|
@@ -58,5 +59,5 @@ Mack::Utils::Inflector.inflections do |inflect|
|
|
58
59
|
inflect.irregular('talisman', 'talismans')
|
59
60
|
inflect.irregular('penis', 'penises')
|
60
61
|
|
61
|
-
inflect.uncountable(%w(pokemon
|
62
|
+
inflect.uncountable(%w(pokemon equipment information rice money species series fish sheep deer offspring))
|
62
63
|
end
|
@@ -25,6 +25,11 @@ class InflectionTest < Test::Unit::TestCase
|
|
25
25
|
assert_equal "equipment", inflect.pluralize("equipment")
|
26
26
|
end
|
27
27
|
|
28
|
+
def test_knowledge
|
29
|
+
assert_equal "knowledge", inflect.singularize("knowledge")
|
30
|
+
assert_equal "knowledge", inflect.pluralize("knowledge")
|
31
|
+
end
|
32
|
+
|
28
33
|
def inflect
|
29
34
|
Mack::Utils::Inflector.instance
|
30
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mack_ruby_core_extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- markbates
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-04-
|
12
|
+
date: 2008-04-27 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
requirements: []
|
102
102
|
|
103
103
|
rubyforge_project: magrathea
|
104
|
-
rubygems_version: 1.
|
104
|
+
rubygems_version: 1.1.1
|
105
105
|
signing_key:
|
106
106
|
specification_version: 2
|
107
107
|
summary: mack_ruby_core_extensions
|