reality-naming 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/lib/reality/naming.rb +1 -0
- data/reality-naming.gemspec +1 -1
- data/test/test_naming.rb +6 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d87a924fb1b43d3eabce08237b34e7cc2adc01a
|
4
|
+
data.tar.gz: 9c0fab7a2b7d35b45d10eac322cac2f8564b0c58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc1b8a598c14c17a51489b03745e8c2521481db6b0e8459d7e7a35525a49dd78d6d040fc0c90b04a07647212bf97b191a9d4318bf99cedcae620fc620f1ac3a6
|
7
|
+
data.tar.gz: e2472e45c70a770af12f8bc537de8fce3eef0f6d82ac6f2110c07992ec3804b4afec0bbea44658ba20c50f429d75f2b4be7d5aaca43111bc2d39ddce8346a402
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.1
|
data/lib/reality/naming.rb
CHANGED
data/reality-naming.gemspec
CHANGED
data/test/test_naming.rb
CHANGED
@@ -34,6 +34,7 @@ class TestNaming < Reality::Naming::TestCase
|
|
34
34
|
assert_equal Reality::Naming.camelize('this_Is_camel_cased'), 'thisIsCamelCased'
|
35
35
|
assert_equal Reality::Naming.camelize('EJB'), 'ejb'
|
36
36
|
assert_equal Reality::Naming.camelize('EJBContainer'), 'ejbContainer'
|
37
|
+
assert_equal Reality::Naming.camelize('_someField'), 'someField'
|
37
38
|
|
38
39
|
assert_equal Reality::Naming.pascal_case('thisIsCamelCased'), 'ThisIsCamelCased'
|
39
40
|
assert_equal Reality::Naming.pascal_case('ThisIsCamelCased'), 'ThisIsCamelCased'
|
@@ -41,6 +42,7 @@ class TestNaming < Reality::Naming::TestCase
|
|
41
42
|
assert_equal Reality::Naming.pascal_case('this_Is_camel_cased'), 'ThisIsCamelCased'
|
42
43
|
assert_equal Reality::Naming.pascal_case('EJB'), 'EJB'
|
43
44
|
assert_equal Reality::Naming.pascal_case('EJBContainer'), 'EJBContainer'
|
45
|
+
assert_equal Reality::Naming.pascal_case('_someField'), 'SomeField'
|
44
46
|
|
45
47
|
assert_equal Reality::Naming.pascal_case?('FindByID'), true
|
46
48
|
|
@@ -50,6 +52,7 @@ class TestNaming < Reality::Naming::TestCase
|
|
50
52
|
assert_equal Reality::Naming.underscore('this_Is_camel_cased'), 'this_is_camel_cased'
|
51
53
|
assert_equal Reality::Naming.underscore('EJB'), 'ejb'
|
52
54
|
assert_equal Reality::Naming.underscore('EJBContainer'), 'ejb_container'
|
55
|
+
assert_equal Reality::Naming.underscore('_someField'), 'some_field'
|
53
56
|
|
54
57
|
assert_equal Reality::Naming.uppercase_constantize('thisIsCamelCased'), 'THIS_IS_CAMEL_CASED'
|
55
58
|
assert_equal Reality::Naming.uppercase_constantize('ThisIsCamelCased'), 'THIS_IS_CAMEL_CASED'
|
@@ -57,6 +60,7 @@ class TestNaming < Reality::Naming::TestCase
|
|
57
60
|
assert_equal Reality::Naming.uppercase_constantize('this_Is_camel_cased'), 'THIS_IS_CAMEL_CASED'
|
58
61
|
assert_equal Reality::Naming.uppercase_constantize('EJB'), 'EJB'
|
59
62
|
assert_equal Reality::Naming.uppercase_constantize('EJBContainer'), 'EJB_CONTAINER'
|
63
|
+
assert_equal Reality::Naming.uppercase_constantize('_someField'), 'SOME_FIELD'
|
60
64
|
|
61
65
|
assert_equal Reality::Naming.xmlize('thisIsCamelCased'), 'this-is-camel-cased'
|
62
66
|
assert_equal Reality::Naming.xmlize('ThisIsCamelCased'), 'this-is-camel-cased'
|
@@ -64,6 +68,7 @@ class TestNaming < Reality::Naming::TestCase
|
|
64
68
|
assert_equal Reality::Naming.xmlize('this_Is_camel_cased'), 'this-is-camel-cased'
|
65
69
|
assert_equal Reality::Naming.xmlize('EJB'), 'ejb'
|
66
70
|
assert_equal Reality::Naming.xmlize('EJBContainer'), 'ejb-container'
|
71
|
+
assert_equal Reality::Naming.xmlize('_someField'), 'some-field'
|
67
72
|
|
68
73
|
assert_equal Reality::Naming.jsonize('thisIsCamelCased'), 'thisIsCamelCased'
|
69
74
|
assert_equal Reality::Naming.jsonize('ThisIsCamelCased'), 'thisIsCamelCased'
|
@@ -71,6 +76,7 @@ class TestNaming < Reality::Naming::TestCase
|
|
71
76
|
assert_equal Reality::Naming.jsonize('this_Is_camel_cased'), 'thisIsCamelCased'
|
72
77
|
assert_equal Reality::Naming.jsonize('EJB'), 'ejb'
|
73
78
|
assert_equal Reality::Naming.jsonize('EJBContainer'), 'ejbContainer'
|
79
|
+
assert_equal Reality::Naming.jsonize('_someField'), 'someField'
|
74
80
|
end
|
75
81
|
|
76
82
|
def test_split_into_words
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reality-naming
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Donald
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -46,6 +46,7 @@ extra_rdoc_files: []
|
|
46
46
|
files:
|
47
47
|
- ".gitattributes"
|
48
48
|
- ".gitignore"
|
49
|
+
- ".ruby-version"
|
49
50
|
- ".travis.yml"
|
50
51
|
- CONTRIBUTING.md
|
51
52
|
- Gemfile
|