utilise 0.6.1 → 0.6.2.pre.63
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/lib/utilise/augment/hash.rb +8 -8
- data/lib/utilise/version.rb +2 -2
- data/spec/utilise/version_spec.rb +1 -1
- metadata +28 -29
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MjkxOWY5MDE1YzQ2NTE5ZjI5MDY3Y2YxODAzOWNmMmY4N2UxZmNlMg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZjY2NTcwM2ViZWQ0NWRkZmRjZjZiMTgwMWU3OGNjODA5MDlkZjFiYw==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MGQxN2VjZTM3ZmMzMjM0ZjA3MzQ3OGU1M2NhZDI2MGNiOWNmZjViZDM2ZTJk
|
10
|
+
NWIxYTY2OGNmOWIwMDdlN2UxMTM3ZjAxMjFkZDU5MGQzMTA2OGRiZmQ3NjA1
|
11
|
+
MTE2ZGZjM2MxMmRhOGY4ODUwNjA4N2Y1NGQ5ZDdhZjIxN2Y1Nzk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZGFiZmUwMzQ2MWI3OTZjMGRmNmMzMGYzZjZlZWQ0MTQ0MGZjZThiYzA3MTI4
|
14
|
+
YmViYWRhODZmZTcwYjJlNTA3MTRiZGNhNDRiMDE0NTUyMTFlZjg5ZTcwY2Yx
|
15
|
+
NzVlMDRkMDdmOTBmNTNiOTQyMjRiODE1NjM2Y2UyNTU4NmQ1YzY=
|
data/lib/utilise/augment/hash.rb
CHANGED
@@ -6,32 +6,32 @@ module Utilise
|
|
6
6
|
module Hash
|
7
7
|
# Transforms all keys to snake case
|
8
8
|
def snake_keys
|
9
|
-
|
9
|
+
utilise_deep_transform_keys(self) { |key| key.snake }
|
10
10
|
end
|
11
11
|
|
12
12
|
# Transforms all keys to camel case
|
13
13
|
def camel_keys
|
14
|
-
|
14
|
+
utilise_deep_transform_keys(self) { |key| key.camel }
|
15
15
|
end
|
16
16
|
|
17
17
|
# Transforms all keys to space case
|
18
18
|
def space_keys
|
19
|
-
|
19
|
+
utilise_deep_transform_keys(self) { |key| key.space }
|
20
20
|
end
|
21
21
|
|
22
22
|
private
|
23
23
|
|
24
|
-
# Deep transform keys
|
24
|
+
# Deep transform keys in object
|
25
25
|
# An awesome piece of code from rails
|
26
|
-
# apidock.com/rails/
|
27
|
-
def
|
26
|
+
# http://apidock.com/rails/Hash/_deep_transform_keys_in_object
|
27
|
+
def utilise_deep_transform_keys(object, &block)
|
28
28
|
case object
|
29
29
|
when Hash
|
30
30
|
object.each_with_object({}) do |(key, value), result|
|
31
|
-
result[yield(key)] =
|
31
|
+
result[yield(key)] = utilise_deep_transform_keys(value, &block)
|
32
32
|
end
|
33
33
|
when Array
|
34
|
-
object.map { |e|
|
34
|
+
object.map { |e| utilise_deep_transform_keys(e, &block) }
|
35
35
|
else
|
36
36
|
object
|
37
37
|
end
|
data/lib/utilise/version.rb
CHANGED
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
describe Utilise do
|
4
4
|
describe '.version' do
|
5
5
|
it 'should return the current gem version' do
|
6
|
-
expect(Utilise.version).to eq('0.6.
|
6
|
+
expect(Utilise.version).to eq('0.6.2')
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'should return the current gem version with debug information' do
|
metadata
CHANGED
@@ -1,111 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utilise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2.pre.63
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Slaughter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.4'
|
20
20
|
type: :runtime
|
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: '3.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: coveralls
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.6'
|
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.6'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '10.4'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '10.4'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '3.3'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rubocop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0.33'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.33'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0.10'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.10'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: yard
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 0.8.7
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.8.7
|
111
111
|
description: Extends a few ruby classes with helpful methods
|
@@ -152,14 +152,14 @@ require_paths:
|
|
152
152
|
- lib
|
153
153
|
required_ruby_version: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
|
-
- -
|
155
|
+
- - ! '>='
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0'
|
158
158
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
159
|
requirements:
|
160
|
-
- -
|
160
|
+
- - ! '>'
|
161
161
|
- !ruby/object:Gem::Version
|
162
|
-
version:
|
162
|
+
version: 1.3.1
|
163
163
|
requirements: []
|
164
164
|
rubyforge_project:
|
165
165
|
rubygems_version: 2.4.5
|
@@ -167,14 +167,13 @@ signing_key:
|
|
167
167
|
specification_version: 4
|
168
168
|
summary: Utilises a few extra methods
|
169
169
|
test_files:
|
170
|
-
- spec/spec_helper.rb
|
171
|
-
- spec/utilise/array_spec.rb
|
172
|
-
- spec/utilise/fixnum_spec.rb
|
173
|
-
- spec/utilise/hash_spec.rb
|
174
|
-
- spec/utilise/hashie_spec.rb
|
175
|
-
- spec/utilise/object_spec.rb
|
176
|
-
- spec/utilise/string_spec.rb
|
177
|
-
- spec/utilise/symbol_spec.rb
|
178
|
-
- spec/utilise/time_spec.rb
|
179
170
|
- spec/utilise/version_spec.rb
|
180
|
-
|
171
|
+
- spec/utilise/time_spec.rb
|
172
|
+
- spec/utilise/symbol_spec.rb
|
173
|
+
- spec/utilise/string_spec.rb
|
174
|
+
- spec/utilise/object_spec.rb
|
175
|
+
- spec/utilise/hashie_spec.rb
|
176
|
+
- spec/utilise/hash_spec.rb
|
177
|
+
- spec/utilise/fixnum_spec.rb
|
178
|
+
- spec/utilise/array_spec.rb
|
179
|
+
- spec/spec_helper.rb
|