darthjee-core_ext 1.7.3 → 1.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +19 -8
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +7 -3
  6. data/Dockerfile +9 -0
  7. data/README.md +5 -6
  8. data/Rakefile +2 -0
  9. data/config/yardstick.rb +13 -0
  10. data/config/yardstick.yml +35 -0
  11. data/core_ext.gemspec +9 -7
  12. data/docker-compose.yml +3 -6
  13. data/lib/darthjee/core_ext/array.rb +2 -2
  14. data/lib/darthjee/core_ext/class.rb +90 -4
  15. data/lib/darthjee/core_ext/enumerable.rb +5 -1
  16. data/lib/darthjee/core_ext/hash.rb +30 -0
  17. data/lib/darthjee/core_ext/hash/cameliazable.rb +91 -0
  18. data/lib/darthjee/core_ext/hash/chain_fetcher.rb +10 -0
  19. data/lib/darthjee/core_ext/hash/key_changeable.rb +85 -53
  20. data/lib/darthjee/core_ext/hash/key_changer.rb +41 -31
  21. data/lib/darthjee/core_ext/hash/value_changer.rb +128 -11
  22. data/lib/darthjee/core_ext/version.rb +1 -1
  23. data/spec/integration/yard/{array → darthjee/core_ext/array}/hash_builder_spec.rb +3 -3
  24. data/spec/integration/yard/{array_spec.rb → darthjee/core_ext/array_spec.rb} +0 -0
  25. data/spec/integration/yard/darthjee/core_ext/class/default_value_spec.rb +143 -0
  26. data/spec/integration/yard/{date → darthjee/core_ext/date}/days_between_spec.rb +6 -6
  27. data/spec/integration/yard/{enumerable_spec.rb → darthjee/core_ext/enumerable_spec.rb} +0 -0
  28. data/spec/integration/yard/darthjee/core_ext/hash/cameliazable_spec.rb +34 -0
  29. data/spec/integration/yard/darthjee/core_ext/hash/chain_fetcher_spec.rb +51 -0
  30. data/spec/integration/yard/darthjee/core_ext/hash/key_changeable_spec.rb +48 -0
  31. data/spec/integration/yard/{hash → darthjee/core_ext/hash}/transformable_spec.rb +7 -3
  32. data/spec/integration/yard/darthjee/core_ext/hash/value_changer_spec.rb +66 -0
  33. data/spec/integration/yard/darthjee/core_ext/hash_spec.rb +42 -0
  34. data/spec/lib/array_spec.rb +27 -17
  35. data/spec/lib/class_spec.rb +108 -7
  36. data/spec/lib/darthjee/core_ext/hash/deep_hash_constructor_spec.rb +1 -1
  37. data/spec/lib/darthjee/core_ext/hash/key_changer_spec.rb +8 -8
  38. data/spec/lib/darthjee/core_ext/hash/keys_sorter_spec.rb +1 -0
  39. data/spec/lib/darthjee/core_ext/hash/to_hash_mapper_spec.rb +1 -0
  40. data/spec/lib/darthjee/core_ext/hash/value_changer_spec.rb +246 -0
  41. data/spec/lib/date_spec.rb +5 -4
  42. data/spec/lib/hash_spec.rb +45 -32
  43. data/spec/lib/math_spec.rb +1 -0
  44. data/spec/lib/numeric_spec.rb +39 -17
  45. data/spec/lib/object_spec.rb +7 -7
  46. data/spec/lib/symbol_spec.rb +2 -2
  47. data/spec/lib/time_spec.rb +5 -4
  48. data/spec/support/models/default_reader_model.rb +8 -0
  49. data/spec/support/models/default_value_model.rb +2 -0
  50. data/spec/support/models/dummy_iterator.rb +15 -0
  51. data/spec/support/models/dummy_transformer.rb +15 -0
  52. data/spec/support/shared_examples/array/array_random.rb +2 -1
  53. data/spec/support/shared_examples/clean.rb +20 -20
  54. data/spec/support/shared_examples/date.rb +18 -13
  55. data/spec/support/shared_examples/hash/chain_fetch.rb +4 -3
  56. data/spec/support/shared_examples/hash/chain_hash_keys_changer.rb +14 -7
  57. data/spec/support/shared_examples/hash/hash_keys_changer.rb +10 -4
  58. data/spec/support/shared_examples/hash/hash_transpose.rb +1 -1
  59. data/spec/support/shared_examples/hash/keys_appender.rb +14 -4
  60. data/spec/support/shared_examples/hash/keys_camelizer.rb +7 -7
  61. data/spec/support/shared_examples/hash/keys_sorter.rb +3 -3
  62. data/spec/support/shared_examples/hash/keys_underscorer.rb +2 -2
  63. data/spec/support/shared_examples/hash/map_to_hash.rb +14 -12
  64. data/spec/support/shared_examples/hash/remap.rb +4 -4
  65. data/spec/support/shared_examples/hash/value_changer.rb +40 -33
  66. metadata +70 -20
  67. data/spec/integration/yard/class/default_value_spec.rb +0 -58
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  shared_examples 'a class with camlize_keys method' do
4
- describe :lower_camelize_keys do
4
+ describe '#lower_camelize_keys' do
5
5
  let(:expected) { { inputKey: 'value' } }
6
6
 
7
7
  context 'with underscore keys' do
@@ -72,7 +72,7 @@ shared_examples 'a class with camlize_keys method' do
72
72
  end
73
73
  end
74
74
 
75
- describe :lower_camelize_keys! do
75
+ describe '#lower_camelize_keys!' do
76
76
  let(:expected) { { inputKey: 'value' } }
77
77
 
78
78
  context 'with underscore keys' do
@@ -97,7 +97,7 @@ shared_examples 'a class with camlize_keys method' do
97
97
 
98
98
  context 'with string keys' do
99
99
  let(:expected) { { 'inputKey' => 'value' } }
100
- let(:hash) { { 'InputKey' => 'value' } }
100
+ let(:hash) { { 'InputKey' => 'value' } }
101
101
 
102
102
  it 'converts the keys to lower camel case' do
103
103
  expect(hash.lower_camelize_keys).to eq(expected)
@@ -143,7 +143,7 @@ shared_examples 'a class with camlize_keys method' do
143
143
  end
144
144
  end
145
145
 
146
- describe :camelize_keys do
146
+ describe '#camelize_keys' do
147
147
  let(:expected) { { InputKey: 'value' } }
148
148
 
149
149
  context 'with underscore keys' do
@@ -168,7 +168,7 @@ shared_examples 'a class with camlize_keys method' do
168
168
 
169
169
  context 'with string keys' do
170
170
  let(:expected) { { 'InputKey' => 'value' } }
171
- let(:hash) { { 'inputKey' => 'value' } }
171
+ let(:hash) { { 'inputKey' => 'value' } }
172
172
 
173
173
  it 'converts the keys to lower camel case' do
174
174
  expect(hash.camelize_keys).to eq(expected)
@@ -214,7 +214,7 @@ shared_examples 'a class with camlize_keys method' do
214
214
  end
215
215
  end
216
216
 
217
- describe :camelize_keys! do
217
+ describe '#camelize_keys!' do
218
218
  let(:expected) { { InputKey: 'value' } }
219
219
 
220
220
  context 'with underscore keys' do
@@ -239,7 +239,7 @@ shared_examples 'a class with camlize_keys method' do
239
239
 
240
240
  context 'with string keys' do
241
241
  let(:expected) { { 'InputKey' => 'value' } }
242
- let(:hash) { { 'inputKey' => 'value' } }
242
+ let(:hash) { { 'inputKey' => 'value' } }
243
243
 
244
244
  it 'converts the keys to lower camel case' do
245
245
  expect(hash.camelize_keys!).to eq(expected)
@@ -23,13 +23,13 @@ shared_examples 'a class with a keys sort method' do
23
23
  context 'when there is a nested hash' do
24
24
  let(:hash) { { b: 1, a: { d: 3, c: 4 } } }
25
25
 
26
- context 'and no option is given' do
26
+ context 'when no option is given' do
27
27
  it 'sorts keys recursively' do
28
28
  expect(result).to eq(a: { c: 4, d: 3 }, b: 1)
29
29
  end
30
30
  end
31
31
 
32
- context 'and recursive option is given' do
32
+ context 'when recursive option is given' do
33
33
  let(:options) { { recursive: true } }
34
34
 
35
35
  it 'sorts keys recursively when argumen is passed' do
@@ -37,7 +37,7 @@ shared_examples 'a class with a keys sort method' do
37
37
  end
38
38
  end
39
39
 
40
- context 'and no recursive option is given' do
40
+ context 'when no recursive option is given' do
41
41
  let(:options) { { recursive: false } }
42
42
 
43
43
  it 'does not sorts keys recursively when argumen is passed' do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  shared_examples 'a class with underscore_keys method basic' do |method|
4
- describe :underscore_keys do
4
+ describe '#underscore_keys' do
5
5
  let(:expected) { { input_key: 'value' } }
6
6
 
7
7
  context 'with camel case keys' do
@@ -14,7 +14,7 @@ shared_examples 'a class with underscore_keys method basic' do |method|
14
14
 
15
15
  context 'with string keys' do
16
16
  let(:expected) { { 'input_key' => 'value' } }
17
- let(:hash) { { 'InputKey' => 'value' } }
17
+ let(:hash) { { 'InputKey' => 'value' } }
18
18
 
19
19
  it 'converts the keys to snake case' do
20
20
  expect(hash.send(method)).to eq(expected)
@@ -2,36 +2,38 @@
2
2
 
3
3
  shared_examples 'an array with map_to_hash method' do
4
4
  describe '#map_to_hash' do
5
- let(:subject) { %w[word1 wooord2] }
5
+ subject(:hash) { %w[word1 wooord2] }
6
+
6
7
  let(:mapping_block) { proc { |word| word.length } }
7
- let(:mapped) { subject.map_to_hash(&mapping_block) }
8
- let(:expected) { { 'word1' => 5, 'wooord2' => 7 } }
8
+ let(:mapped) { hash.map_to_hash(&mapping_block) }
9
+ let(:expected) { { 'word1' => 5, 'wooord2' => 7 } }
9
10
 
10
11
  it { expect(mapped).to be_a(Hash) }
11
12
 
12
13
  it 'has the original array as keys' do
13
- expect(mapped.keys).to eq(subject)
14
+ expect(mapped.keys).to eq(hash)
14
15
  end
15
16
 
16
17
  it 'has the mapped values as values' do
17
- expect(mapped.values).to eq(subject.map(&mapping_block))
18
+ expect(mapped.values).to eq(hash.map(&mapping_block))
18
19
  end
19
20
 
20
21
  it 'correctly map keys to value' do
21
22
  expect(mapped).to eq(expected)
22
23
  end
23
24
 
24
- context 'whe subject is an array' do
25
- let(:subject) { [%w[w1], %w[w2 w3]] }
26
- let(:mapped) { subject.map_to_hash(&mapping_block) }
25
+ context 'when hash is an array' do
26
+ subject(:hash) { [%w[w1], %w[w2 w3]] }
27
+
28
+ let(:mapped) { hash.map_to_hash(&mapping_block) }
27
29
  let(:expected) { { %w[w1] => 1, %w[w2 w3] => 2 } }
28
30
 
29
31
  it 'has the original array as keys' do
30
- expect(mapped.keys).to eq(subject)
32
+ expect(mapped.keys).to eq(hash)
31
33
  end
32
34
 
33
35
  it 'has the mapped values as values' do
34
- expect(mapped.values).to eq(subject.map(&mapping_block))
36
+ expect(mapped.values).to eq(hash.map(&mapping_block))
35
37
  end
36
38
 
37
39
  it 'correctly map keys to value' do
@@ -45,7 +47,7 @@ shared_examples 'a hash with map_to_hash method' do
45
47
  describe '#map_to_hash' do
46
48
  let(:hash) { { a: 1, b: 2 } }
47
49
  let(:mapping_block) { proc { |k, v| "#{k}_#{v}" } }
48
- let(:expected) { { a: 'a_1', b: 'b_2' } }
50
+ let(:expected) { { a: 'a_1', b: 'b_2' } }
49
51
 
50
52
  it { expect(mapped).to be_a(Hash) }
51
53
 
@@ -68,7 +70,7 @@ shared_examples 'a hash with map_to_hash method' do
68
70
  context 'when hash uses arrays for keys' do
69
71
  let(:hash) { { %i[a b] => 1, %i[c d] => 2 } }
70
72
  let(:mapping_block) { proc { |k, v| "#{k.join('_')}_#{v}" } }
71
- let(:expected) { { %i[a b] => 'a_b_1', %i[c d] => 'c_d_2' } }
73
+ let(:expected) { { %i[a b] => 'a_b_1', %i[c d] => 'c_d_2' } }
72
74
 
73
75
  it 'has the original keys as keys' do
74
76
  expect(mapped.keys).to eq(hash.keys)
@@ -21,8 +21,8 @@ shared_examples 'a class with remap method' do
21
21
  end
22
22
 
23
23
  shared_examples 'a method that remaps the keys' do |method|
24
- let(:hash) { { a: 1, b: 2 } }
25
- let(:remap) { { a: :e } }
24
+ let(:hash) { { a: 1, b: 2 } }
25
+ let(:remap) { { a: :e } }
26
26
  let(:result) { subject.public_send(method, remap) }
27
27
 
28
28
  context 'when remap and hash keys match' do
@@ -80,8 +80,8 @@ shared_examples 'a method that remaps the keys' do |method|
80
80
  expect(result).to eq('a' => 1, b: 2)
81
81
  end
82
82
 
83
- context 'and the original key is an string' do
84
- let(:hash) { { 'a' => 1, 'b' => 2 } }
83
+ context 'when the original key is an string' do
84
+ let(:hash) { { 'a' => 1, 'b' => 2 } }
85
85
  let(:remap) { { 'a' => :a } }
86
86
 
87
87
  it 'does not remap the keys' do
@@ -1,58 +1,61 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  shared_examples 'a class with change_values method' do
4
- let(:subject) { { a: 1, b: 2, c: { d: 3, e: 4 } } }
4
+ subject(:hash) { { a: 1, b: 2, c: { d: 3, e: 4 } } }
5
+
5
6
  let(:inner_hash) { subject[:c] }
6
7
 
7
- describe :change_values do
8
+ describe '#change_values' do
8
9
  it_behaves_like 'a method that change the hash values', :change_values
9
10
 
10
11
  it 'does not change original hash' do
11
12
  expect do
12
- subject.change_values { |value| value + 1 }
13
- end.not_to(change { subject })
13
+ hash.change_values { |value| value + 1 }
14
+ end.not_to(change { hash })
14
15
  end
15
16
 
16
- it 'does not change original hash' do
17
+ it 'does not change original inner hash' do
17
18
  expect do
18
- subject.change_values { |value| value + 1 }
19
+ hash.change_values { |value| value + 1 }
19
20
  end.not_to(change { inner_hash })
20
21
  end
21
22
 
22
23
  context 'when using an array' do
23
- let(:subject) { { a: [{ b: 1 }] } }
24
+ subject(:hash) { { a: [{ b: 1 }] } }
25
+
24
26
  let(:inner_array) { subject[:a] }
25
27
 
26
28
  it 'does not change original hash' do
27
29
  expect do
28
- subject.change_values { |value| value + 1 }
30
+ hash.change_values { |value| value + 1 }
29
31
  end.not_to(change { inner_array })
30
32
  end
31
33
  end
32
34
  end
33
35
 
34
- describe :change_values! do
36
+ describe '#change_values!' do
35
37
  it_behaves_like 'a method that change the hash values', :change_values!
36
38
 
37
39
  it 'changes original hash' do
38
40
  expect do
39
- subject.change_values! { |value| value + 1 }
40
- end.to(change { subject })
41
+ hash.change_values! { |value| value + 1 }
42
+ end.to(change { hash })
41
43
  end
42
44
 
43
- it 'changes original hash' do
45
+ it 'changes original inner hash' do
44
46
  expect do
45
- subject.change_values! { |value| value + 1 }
47
+ hash.change_values! { |value| value + 1 }
46
48
  end.to(change { inner_hash })
47
49
  end
48
50
 
49
51
  context 'when using an array' do
50
- let(:subject) { { a: [{ b: 1 }] } }
52
+ subject(:hash) { { a: [{ b: 1 }] } }
53
+
51
54
  let(:inner_array) { subject[:a] }
52
55
 
53
56
  it 'changes original hash' do
54
57
  expect do
55
- subject.change_values! { |value| value + 1 }
58
+ hash.change_values! { |value| value + 1 }
56
59
  end.to(change { inner_array })
57
60
  end
58
61
  end
@@ -62,13 +65,13 @@ end
62
65
  shared_examples 'a method that change the hash values' do |method|
63
66
  context 'when using deeply nested hashes' do
64
67
  it 'updates values of hash' do
65
- result = subject.public_send(method) { |value| value + 1 }
68
+ result = hash.public_send(method) { |value| value + 1 }
66
69
  expected = { a: 2, b: 3, c: { d: 4, e: 5 } }
67
70
  expect(result).to eq(expected)
68
71
  end
69
72
 
70
73
  it 'works recursively when parameter is passed' do
71
- result = subject.public_send(method, recursive: true) do |value|
74
+ result = hash.public_send(method, recursive: true) do |value|
72
75
  value + 1
73
76
  end
74
77
  expected = { a: 2, b: 3, c: { d: 4, e: 5 } }
@@ -76,7 +79,7 @@ shared_examples 'a method that change the hash values' do |method|
76
79
  end
77
80
 
78
81
  it 'does not work recursively when parameter is passed as false' do
79
- result = subject.public_send(method, recursive: false) do |value|
82
+ result = hash.public_send(method, recursive: false) do |value|
80
83
  value + 1
81
84
  end
82
85
  expected = { a: 2, b: 3, c: { d: 3, e: 4 } }
@@ -84,7 +87,7 @@ shared_examples 'a method that change the hash values' do |method|
84
87
  end
85
88
 
86
89
  it 'does not ignore hash when option is passed' do
87
- result = subject.public_send(method, skip_inner: false) do |value|
90
+ result = hash.public_send(method, skip_inner: false) do |value|
88
91
  value.is_a?(Hash) ? 10 + value.size : value + 1
89
92
  end
90
93
  expected = { a: 2, b: 3, c: 12 }
@@ -92,7 +95,7 @@ shared_examples 'a method that change the hash values' do |method|
92
95
  end
93
96
 
94
97
  it 'ignore hash and work recursively when option is passed' do
95
- result = subject.public_send(method, skip_inner: true) do |value|
98
+ result = hash.public_send(method, skip_inner: true) do |value|
96
99
  value.is_a?(Hash) ? 10 + value.size : value + 1
97
100
  end
98
101
  expect(result).to eq(a: 2, b: 3, c: { d: 4, e: 5 })
@@ -100,7 +103,7 @@ shared_examples 'a method that change the hash values' do |method|
100
103
 
101
104
  it 'ignore hash and does not work recursively when option is passed' do
102
105
  options = { skip_inner: false, recursive: false }
103
- result = subject.public_send(method, options) do |value|
106
+ result = hash.public_send(method, options) do |value|
104
107
  value.is_a?(Hash) ? value : value + 1
105
108
  end
106
109
  expect(result).to eq(a: 2, b: 3, c: { d: 3, e: 4 })
@@ -108,30 +111,30 @@ shared_examples 'a method that change the hash values' do |method|
108
111
  end
109
112
 
110
113
  context 'when using deeply nested arrays' do
111
- let(:subject) { { a: 1, b: 2, c: [{ d: 3 }, { e: { f: 4 } }, 5] } }
114
+ subject(:hash) { { a: 1, b: 2, c: [{ d: 3 }, { e: { f: 4 } }, 5] } }
112
115
 
113
116
  it 'goes recursivly true arrays' do
114
- result = subject.public_send(method) { |value| value + 1 }
117
+ result = hash.public_send(method) { |value| value + 1 }
115
118
 
116
119
  expect(result).to eq(a: 2, b: 3, c: [{ d: 4 }, { e: { f: 5 } }, 6])
117
120
  end
118
121
 
119
122
  it 'does not work recursively when parameter is passed as false' do
120
- result = subject.public_send(method, recursive: false) do |value|
123
+ result = hash.public_send(method, recursive: false) do |value|
121
124
  value + 1
122
125
  end
123
126
  expect(result).to eq(a: 2, b: 3, c: [{ d: 3 }, { e: { f: 4 } }, 5])
124
127
  end
125
128
 
126
129
  it 'does not ignore array when option is passed' do
127
- result = subject.public_send(method, skip_inner: false) do |value|
130
+ result = hash.public_send(method, skip_inner: false) do |value|
128
131
  value.is_a?(Array) ? 10 + value.size : value + 1
129
132
  end
130
133
  expect(result).to eq(a: 2, b: 3, c: 13)
131
134
  end
132
135
 
133
136
  it 'ignores array when option is passed' do
134
- result = subject.public_send(method, skip_inner: true) do |value|
137
+ result = hash.public_send(method, skip_inner: true) do |value|
135
138
  value.is_a?(Array) ? 10 + value.size : value + 1
136
139
  end
137
140
  expect(result).to eq(a: 2, b: 3, c: [{ d: 4 }, { e: { f: 5 } }, 6])
@@ -139,7 +142,7 @@ shared_examples 'a method that change the hash values' do |method|
139
142
 
140
143
  it 'ignore hash and does not work recursively when option is passed' do
141
144
  options = { skip_inner: false, recursive: false }
142
- result = subject.public_send(method, options) do |value|
145
+ result = hash.public_send(method, options) do |value|
143
146
  value.is_a?(Array) ? value : value + 1
144
147
  end
145
148
  expect(result).to eq(a: 2, b: 3, c: [{ d: 3 }, { e: { f: 4 } }, 5])
@@ -147,8 +150,9 @@ shared_examples 'a method that change the hash values' do |method|
147
150
  end
148
151
 
149
152
  context 'when using a nested extra class' do
150
- let(:subject) { { a: 1, b: 2, c: Hash::ValueChanger::Dummy.new(3) } }
151
- let(:result) { subject.public_send(method) { |value| value + 1 } }
153
+ subject(:hash) { { a: 1, b: 2, c: Hash::ValueChanger::Dummy.new(3) } }
154
+
155
+ let(:result) { hash.public_send(method) { |value| value + 1 } }
152
156
  let(:expected) { { a: 2, b: 3, c: 4 } }
153
157
 
154
158
  it 'goes perform the mapping with the extra class' do
@@ -156,7 +160,8 @@ shared_examples 'a method that change the hash values' do |method|
156
160
  end
157
161
 
158
162
  context 'when class is an interactor' do
159
- subject { { a: 1, b: 2, c: object } }
163
+ subject(:hash) { { a: 1, b: 2, c: object } }
164
+
160
165
  let(:expected) { { a: 2, b: 3, c: [{ d: 4 }, { e: { f: 5 } }] } }
161
166
  let(:object) do
162
167
  Hash::ValueChanger::DummyIteractor.new({ d: 3 }, e: { f: 4 })
@@ -168,11 +173,13 @@ shared_examples 'a method that change the hash values' do |method|
168
173
  end
169
174
 
170
175
  context 'when using mapping inner array with inner objecth' do
176
+ subject(:hash) { { a: 1, b: array } }
177
+
171
178
  let(:object) { Hash::ValueChanger::Dummy.new(2) }
172
- let(:array) { Hash::ValueChanger::DummyIteractor.new(object) }
173
- let(:subject) { { a: 1, b: array } }
179
+ let(:array) { Hash::ValueChanger::DummyIteractor.new(object) }
180
+
174
181
  let(:result) do
175
- subject.public_send(method, skip_inner: false) do |value|
182
+ hash.public_send(method, skip_inner: false) do |value|
176
183
  case value
177
184
  when Numeric
178
185
  value + 10
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: darthjee-core_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.3
4
+ version: 1.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darthjee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-06 00:00:00.000000000 Z
11
+ date: 2019-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 1.17.x
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
- version: '0'
40
+ version: 1.17.x
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry-nav
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.58.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '='
102
+ - !ruby/object:Gem::Version
103
+ version: 1.30.0
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 1.30.0
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: simplecov
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +128,28 @@ dependencies:
114
128
  requirements:
115
129
  - - ">="
116
130
  - !ruby/object:Gem::Version
117
- version: '0.9'
131
+ version: 0.9.18
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: 0.9.18
139
+ - !ruby/object:Gem::Dependency
140
+ name: yardstick
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: 0.9.9
118
146
  type: :development
119
147
  prerelease: false
120
148
  version_requirements: !ruby/object:Gem::Requirement
121
149
  requirements:
122
150
  - - ">="
123
151
  - !ruby/object:Gem::Version
124
- version: '0.9'
152
+ version: 0.9.9
125
153
  description: Extension of basic classes with usefull methods
126
154
  email:
127
155
  - darthjee@gmail.com
@@ -136,6 +164,7 @@ files:
136
164
  - ".rubocop_todo.yml"
137
165
  - ARRAY_README.md
138
166
  - DATE_README.md
167
+ - Dockerfile
139
168
  - ENUMERABLE_README.md
140
169
  - Gemfile
141
170
  - HASH_README.md
@@ -145,6 +174,8 @@ files:
145
174
  - README.md
146
175
  - Rakefile
147
176
  - SYMBOL_README.md
177
+ - config/yardstick.rb
178
+ - config/yardstick.yml
148
179
  - core_ext.gemspec
149
180
  - docker-compose.yml
150
181
  - lib/darthjee.rb
@@ -155,6 +186,7 @@ files:
155
186
  - lib/darthjee/core_ext/date.rb
156
187
  - lib/darthjee/core_ext/enumerable.rb
157
188
  - lib/darthjee/core_ext/hash.rb
189
+ - lib/darthjee/core_ext/hash/cameliazable.rb
158
190
  - lib/darthjee/core_ext/hash/chain_fetcher.rb
159
191
  - lib/darthjee/core_ext/hash/deep_hash_constructor.rb
160
192
  - lib/darthjee/core_ext/hash/key_changeable.rb
@@ -172,12 +204,17 @@ files:
172
204
  - lib/darthjee/core_ext/time.rb
173
205
  - lib/darthjee/core_ext/version.rb
174
206
  - mech.jpg
175
- - spec/integration/yard/array/hash_builder_spec.rb
176
- - spec/integration/yard/array_spec.rb
177
- - spec/integration/yard/class/default_value_spec.rb
178
- - spec/integration/yard/date/days_between_spec.rb
179
- - spec/integration/yard/enumerable_spec.rb
180
- - spec/integration/yard/hash/transformable_spec.rb
207
+ - spec/integration/yard/darthjee/core_ext/array/hash_builder_spec.rb
208
+ - spec/integration/yard/darthjee/core_ext/array_spec.rb
209
+ - spec/integration/yard/darthjee/core_ext/class/default_value_spec.rb
210
+ - spec/integration/yard/darthjee/core_ext/date/days_between_spec.rb
211
+ - spec/integration/yard/darthjee/core_ext/enumerable_spec.rb
212
+ - spec/integration/yard/darthjee/core_ext/hash/cameliazable_spec.rb
213
+ - spec/integration/yard/darthjee/core_ext/hash/chain_fetcher_spec.rb
214
+ - spec/integration/yard/darthjee/core_ext/hash/key_changeable_spec.rb
215
+ - spec/integration/yard/darthjee/core_ext/hash/transformable_spec.rb
216
+ - spec/integration/yard/darthjee/core_ext/hash/value_changer_spec.rb
217
+ - spec/integration/yard/darthjee/core_ext/hash_spec.rb
181
218
  - spec/lib/array_spec.rb
182
219
  - spec/lib/class_spec.rb
183
220
  - spec/lib/darthjee/core_ext/hash/chain_fetcher_spec.rb
@@ -186,6 +223,7 @@ files:
186
223
  - spec/lib/darthjee/core_ext/hash/keys_sorter_spec.rb
187
224
  - spec/lib/darthjee/core_ext/hash/squasher_spec.rb
188
225
  - spec/lib/darthjee/core_ext/hash/to_hash_mapper_spec.rb
226
+ - spec/lib/darthjee/core_ext/hash/value_changer_spec.rb
189
227
  - spec/lib/date_spec.rb
190
228
  - spec/lib/enumerable_spec.rb
191
229
  - spec/lib/hash_spec.rb
@@ -195,7 +233,10 @@ files:
195
233
  - spec/lib/symbol_spec.rb
196
234
  - spec/lib/time_spec.rb
197
235
  - spec/spec_helper.rb
236
+ - spec/support/models/default_reader_model.rb
198
237
  - spec/support/models/default_value_model.rb
238
+ - spec/support/models/dummy_iterator.rb
239
+ - spec/support/models/dummy_transformer.rb
199
240
  - spec/support/models/hash/value_changer/dummy.rb
200
241
  - spec/support/models/hash/value_changer/dummy_iteractor.rb
201
242
  - spec/support/shared_examples/array/array_random.rb
@@ -238,12 +279,17 @@ signing_key:
238
279
  specification_version: 4
239
280
  summary: Core Extensions
240
281
  test_files:
241
- - spec/integration/yard/array/hash_builder_spec.rb
242
- - spec/integration/yard/array_spec.rb
243
- - spec/integration/yard/class/default_value_spec.rb
244
- - spec/integration/yard/date/days_between_spec.rb
245
- - spec/integration/yard/enumerable_spec.rb
246
- - spec/integration/yard/hash/transformable_spec.rb
282
+ - spec/integration/yard/darthjee/core_ext/array/hash_builder_spec.rb
283
+ - spec/integration/yard/darthjee/core_ext/array_spec.rb
284
+ - spec/integration/yard/darthjee/core_ext/class/default_value_spec.rb
285
+ - spec/integration/yard/darthjee/core_ext/date/days_between_spec.rb
286
+ - spec/integration/yard/darthjee/core_ext/enumerable_spec.rb
287
+ - spec/integration/yard/darthjee/core_ext/hash/cameliazable_spec.rb
288
+ - spec/integration/yard/darthjee/core_ext/hash/chain_fetcher_spec.rb
289
+ - spec/integration/yard/darthjee/core_ext/hash/key_changeable_spec.rb
290
+ - spec/integration/yard/darthjee/core_ext/hash/transformable_spec.rb
291
+ - spec/integration/yard/darthjee/core_ext/hash/value_changer_spec.rb
292
+ - spec/integration/yard/darthjee/core_ext/hash_spec.rb
247
293
  - spec/lib/array_spec.rb
248
294
  - spec/lib/class_spec.rb
249
295
  - spec/lib/darthjee/core_ext/hash/chain_fetcher_spec.rb
@@ -252,6 +298,7 @@ test_files:
252
298
  - spec/lib/darthjee/core_ext/hash/keys_sorter_spec.rb
253
299
  - spec/lib/darthjee/core_ext/hash/squasher_spec.rb
254
300
  - spec/lib/darthjee/core_ext/hash/to_hash_mapper_spec.rb
301
+ - spec/lib/darthjee/core_ext/hash/value_changer_spec.rb
255
302
  - spec/lib/date_spec.rb
256
303
  - spec/lib/enumerable_spec.rb
257
304
  - spec/lib/hash_spec.rb
@@ -261,7 +308,10 @@ test_files:
261
308
  - spec/lib/symbol_spec.rb
262
309
  - spec/lib/time_spec.rb
263
310
  - spec/spec_helper.rb
311
+ - spec/support/models/default_reader_model.rb
264
312
  - spec/support/models/default_value_model.rb
313
+ - spec/support/models/dummy_iterator.rb
314
+ - spec/support/models/dummy_transformer.rb
265
315
  - spec/support/models/hash/value_changer/dummy.rb
266
316
  - spec/support/models/hash/value_changer/dummy_iteractor.rb
267
317
  - spec/support/shared_examples/array/array_random.rb