except_nested 0.1.2 → 0.1.3

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: b3dfd263c90824f4daca8a8dd835f9768dd81c6e
4
- data.tar.gz: da173964d7fd2a531c5a93880f0e3fef9136c8ab
3
+ metadata.gz: 9a3ed17b1f9fd0540a8fcdd320449ce45eb02857
4
+ data.tar.gz: 9f3e0695414fa73c6fadad1dbf32770cd6ac468f
5
5
  SHA512:
6
- metadata.gz: d5f57b52c637604679934e3f934dcbcb752d1d27d58a2eb54f72176860ea5a3ea1ef6776d1b0378d644057edab81db9a52decb6fb8e413fb94b2ad05ebcec981
7
- data.tar.gz: ed2c5069845bedd2021261f98bf1c9eb3392ba36002217787ac679c3f199c33e6a1e1cf674869b1139a4261cce69e6a7656060af8c8cb98cd227efba3b89704f
6
+ metadata.gz: 95de5a62325aa59c87208c801c8827961e0529e7a73003331f40fea311f2da54b9212123192a15c992ab589020784d6540a35141fd6dcd98489c8ce9873d487a
7
+ data.tar.gz: b39c5e69db13f7daf39a3337100f3917da39d94dd9349beb533f3ea1e83c9f469e7222982ac6cdf38274c5acdcec98baebec7159b66b4ac9522f4474174c5fc9
data/.gitignore CHANGED
@@ -34,3 +34,5 @@
34
34
 
35
35
  # Ignore publish script due to credentials
36
36
  .publish
37
+
38
+ codeclimate-test-reporter
data/Gemfile.lock CHANGED
@@ -1,58 +1,57 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- except_nested (0.1.2)
4
+ except_nested (0.1.3)
5
5
  activesupport (~> 5)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (5.1.3)
10
+ activesupport (5.2.6)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
- i18n (~> 0.7)
12
+ i18n (>= 0.7, < 2)
13
13
  minitest (~> 5.1)
14
14
  tzinfo (~> 1.1)
15
15
  codeclimate-test-reporter (0.4.8)
16
16
  simplecov (>= 0.7.1, < 1.0.0)
17
- concurrent-ruby (1.0.5)
18
- diff-lcs (1.3)
19
- docile (1.1.5)
20
- i18n (0.8.6)
21
- json (2.1.0)
22
- minitest (5.10.3)
23
- rake (10.5.0)
24
- rspec (3.6.0)
25
- rspec-core (~> 3.6.0)
26
- rspec-expectations (~> 3.6.0)
27
- rspec-mocks (~> 3.6.0)
28
- rspec-core (3.6.0)
29
- rspec-support (~> 3.6.0)
30
- rspec-expectations (3.6.0)
17
+ concurrent-ruby (1.1.9)
18
+ diff-lcs (1.4.4)
19
+ docile (1.3.5)
20
+ i18n (1.8.10)
21
+ concurrent-ruby (~> 1.0)
22
+ minitest (5.14.4)
23
+ rake (13.0.6)
24
+ rspec (3.10.0)
25
+ rspec-core (~> 3.10.0)
26
+ rspec-expectations (~> 3.10.0)
27
+ rspec-mocks (~> 3.10.0)
28
+ rspec-core (3.10.1)
29
+ rspec-support (~> 3.10.0)
30
+ rspec-expectations (3.10.1)
31
31
  diff-lcs (>= 1.2.0, < 2.0)
32
- rspec-support (~> 3.6.0)
33
- rspec-mocks (3.6.0)
32
+ rspec-support (~> 3.10.0)
33
+ rspec-mocks (3.10.2)
34
34
  diff-lcs (>= 1.2.0, < 2.0)
35
- rspec-support (~> 3.6.0)
36
- rspec-support (3.6.0)
37
- simplecov (0.12.0)
38
- docile (~> 1.1.0)
39
- json (>= 1.8, < 3)
40
- simplecov-html (~> 0.10.0)
41
- simplecov-html (0.10.2)
35
+ rspec-support (~> 3.10.0)
36
+ rspec-support (3.10.2)
37
+ simplecov (0.18.5)
38
+ docile (~> 1.1)
39
+ simplecov-html (~> 0.11)
40
+ simplecov-html (0.12.3)
42
41
  thread_safe (0.3.6)
43
- tzinfo (1.2.3)
42
+ tzinfo (1.2.9)
44
43
  thread_safe (~> 0.1)
45
44
 
46
45
  PLATFORMS
47
- ruby
46
+ x86_64-darwin-15
48
47
 
49
48
  DEPENDENCIES
50
- bundler (~> 1.15)
49
+ bundler (>= 2.2.20)
51
50
  codeclimate-test-reporter (~> 0.4.8)
52
51
  except_nested!
53
- rake (~> 10.0)
52
+ rake (~> 13.0)
54
53
  rspec (~> 3.0)
55
- simplecov (~> 0.12.0)
54
+ simplecov (~> 0.17)
56
55
 
57
56
  BUNDLED WITH
58
- 1.15.3
57
+ 2.2.20
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
  [![Gem Version](https://badge.fury.io/rb/except_nested.svg)](https://rubygems.org/gems/except_nested)
3
3
  [![Build Status](https://travis-ci.org/abarrak/except_nested.svg?branch=master)](https://travis-ci.org/abarrak/except_nested)
4
4
  [![Test Coverage](https://codeclimate.com/github/abarrak/except_nested/badges/coverage.svg)](https://codeclimate.com/github/abarrak/except_nested/coverage)
5
- [![Dependency Status](https://gemnasium.com/badges/github.com/abarrak/except_nested.svg)](https://gemnasium.com/github.com/abarrak/except_nested)
6
5
 
7
6
  **except_nested** allows exclusion of given hash keys at various depth of the hash.
8
7
 
@@ -34,6 +33,7 @@ Given the following hash:
34
33
  ```ruby
35
34
  h = { name: 'Zohoor', degree: 'Psychology', preferences: { color: 'mauve', drink: 'coffee', pet: 'cat' } }
36
35
  ```
36
+
37
37
  You can deep except keys:
38
38
 
39
39
  ```ruby
@@ -51,10 +51,10 @@ h.except_nested(:degree, preferences: [:color, :pet, :drink])
51
51
 
52
52
  # original hash is preserved ..
53
53
  h
54
- => { name: "Zohoor", degree: "Psychology", preferences: {color: "mauve", drink: "coffee", pet: "cat"}}
54
+ => { name: "Zohoor", degree: "Psychology", preferences: { color: "mauve", drink: "coffee", pet: "cat" } }
55
55
  ```
56
56
 
57
- Or exclude keys at first level just like normal `#except` does:
57
+ Or exclude keys in the first level just like normal `#except` does:
58
58
 
59
59
  ```ruby
60
60
  h.except_nested(:name)
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.email = ["abdullah@abarrak.com"]
14
14
 
15
15
  spec.summary = "An extended version of active_support #except hash utility."
16
- spec.description = "except_nested allows exclusion of given hash keys at various depth."
16
+ spec.description = "except_nested allows extraction of given hash values at various depth of the hash."
17
17
  spec.homepage = "https://github.com/abarrak/except_nested"
18
18
  spec.license = "MIT"
19
19
 
@@ -25,9 +25,9 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ["lib"]
26
26
 
27
27
  spec.add_dependency 'activesupport', '~> 5'
28
- spec.add_development_dependency "bundler", "~> 1.15"
29
- spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_development_dependency "bundler", ">= 2.2.20"
29
+ spec.add_development_dependency "rake", "~> 13.0"
30
30
  spec.add_development_dependency "rspec", "~> 3.0"
31
- spec.add_development_dependency "simplecov", "~> 0.12.0"
31
+ spec.add_development_dependency "simplecov", "~> 0.17"
32
32
  spec.add_development_dependency "codeclimate-test-reporter", "~> 0.4.8"
33
33
  end
@@ -24,7 +24,7 @@ class Hash
24
24
  if key.is_a?(Hash)
25
25
  key.each do |sub_key, sub_value|
26
26
  if sub_value.is_a?(Array)
27
- self[sub_key].delete_if { |k, v| sub_value.include?(k) }
27
+ self[sub_key].delete_if { |k, _| sub_value.include?(k) }
28
28
  delete(sub_key) if self[sub_key].empty?
29
29
  elsif sub_value.is_a?(Hash)
30
30
  self[sub_key].except_nested!(sub_value)
@@ -33,7 +33,7 @@ class Hash
33
33
  end
34
34
  end
35
35
  elsif key.is_a?(Array)
36
- delete_if { |k, v| k == key.first }
36
+ delete_if { |k, _| k == key.first }
37
37
  else
38
38
  delete(key)
39
39
  end
@@ -1,3 +1,3 @@
1
1
  module ExceptNested
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: except_nested
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdullah Barrak
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-19 00:00:00.000000000 Z
11
+ date: 2021-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -28,30 +28,30 @@ 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: '1.15'
33
+ version: 2.2.20
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: '1.15'
40
+ version: 2.2.20
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
- version: '10.0'
47
+ version: '13.0'
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
- version: '10.0'
54
+ version: '13.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.12.0
75
+ version: '0.17'
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
- version: 0.12.0
82
+ version: '0.17'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: codeclimate-test-reporter
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +94,8 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.4.8
97
- description: except_nested allows exclusion of given hash keys at various depth.
97
+ description: except_nested allows extraction of given hash values at various depth
98
+ of the hash.
98
99
  email:
99
100
  - abdullah@abarrak.com
100
101
  executables: []
@@ -121,7 +122,7 @@ homepage: https://github.com/abarrak/except_nested
121
122
  licenses:
122
123
  - MIT
123
124
  metadata: {}
124
- post_install_message:
125
+ post_install_message:
125
126
  rdoc_options: []
126
127
  require_paths:
127
128
  - lib
@@ -136,9 +137,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
137
  - !ruby/object:Gem::Version
137
138
  version: '0'
138
139
  requirements: []
139
- rubyforge_project:
140
+ rubyforge_project:
140
141
  rubygems_version: 2.6.12
141
- signing_key:
142
+ signing_key:
142
143
  specification_version: 4
143
144
  summary: 'An extended version of active_support #except hash utility.'
144
145
  test_files: []