hash_ext 0.5.0 → 0.6.0

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
  SHA256:
3
- metadata.gz: cdfe491b5c140f70b6b00ad01689d4ad0a19f284247f0ee0ec8f1a0a142fefc2
4
- data.tar.gz: 51c7366d4aadaa3425104581ee9315ccd2876769eaa672bb5f70fcf074f97143
3
+ metadata.gz: 97edf774c7ae90b8d8dd27030b1df0b025186e35028c7e5933a1ebf4e63f0c1c
4
+ data.tar.gz: 1a5ba2d621c3eb1d786f7870130274f2b1d522cab2e1bd61ced2a75f2dbaf904
5
5
  SHA512:
6
- metadata.gz: dea9009fd4c2ae946c3b975c09ba208a357c6ed7abe974185260102affbd6a0e4f68910fd1dbff2378306004958aaedd4024eae4dbd50c71cb95b6be3beb1f9b
7
- data.tar.gz: '09bc0cc742daaa6854c5e23d338e55bcbc080168586d6d9a44a390e34b98bb5c490656c90f52e793349892d8b23ad3e3e0e552218e7c88d323671fe47802a0c1'
6
+ metadata.gz: 40d2e0967ecc8a5c73efe22bc29bdf5184e411adc189f555d182d46a31639556802be0daa7f67a239110e55558583fa4598d3bb75f3846b36381578a671018a2
7
+ data.tar.gz: 5ff8c56fa6e3729927714f7713bf88540ed718ac1cd0c2814e220ce7b8c815738cd89e33c81281fd726d23a5e5c492d8798ab5230dd002d122bd7e4f259ab242
@@ -5,12 +5,12 @@ rvm:
5
5
  - 2.0
6
6
  - 2.1
7
7
  - 2.2
8
- - 2.3.0
9
- - 2.4.0
10
- - 2.5.0
11
- - 2.6.0
12
- - jruby-1.7.25
13
- - jruby-9.1.7.0
8
+ - 2.3
9
+ - 2.4
10
+ - 2.5
11
+ - 2.6
12
+ - 2.7
13
+ - jruby-9.2.9.0
14
14
  - ruby-head
15
15
  - jruby-head
16
16
 
@@ -18,8 +18,4 @@ matrix:
18
18
  fast_finish: true
19
19
  allow_failures:
20
20
  - rvm: ruby-head
21
- - rvm: jruby-head
22
-
23
- before_install:
24
- - rvm all-gemsets do gem uninstall bundler -ax || true
25
- - gem install bundler -v "< 2"
21
+ - rvm: jruby-head
data/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
  [![Build Status](https://travis-ci.org/gabynaiman/hash_ext.svg?branch=master)](https://travis-ci.org/gabynaiman/hash_ext)
5
5
  [![Coverage Status](https://coveralls.io/repos/gabynaiman/hash_ext/badge.svg?branch=master)](https://coveralls.io/r/gabynaiman/hash_ext?branch=master)
6
6
  [![Code Climate](https://codeclimate.com/github/gabynaiman/hash_ext.svg)](https://codeclimate.com/github/gabynaiman/hash_ext)
7
- [![Dependency Status](https://gemnasium.com/gabynaiman/hash_ext.svg)](https://gemnasium.com/gabynaiman/hash_ext)
8
7
 
9
8
  Hash extensions without monkey patching
10
9
 
@@ -19,7 +19,6 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ['lib']
21
21
 
22
- spec.add_development_dependency 'bundler', '~> 1.12'
23
22
  spec.add_development_dependency 'rake', '~> 11.0'
24
23
  spec.add_development_dependency 'minitest', '~> 5.0', '< 5.11'
25
24
  spec.add_development_dependency 'minitest-colorin', '~> 0.1'
@@ -53,6 +53,13 @@ class Hash
53
53
  super normalize_key(key), *args, &block
54
54
  end
55
55
 
56
+ def dig(*keys)
57
+ normalized_key = keys.map { |k| normalize_key(k) }
58
+ normalized_key.inject(self) do |target, key|
59
+ target ? target[key] : nil
60
+ end
61
+ end
62
+
56
63
  def to_h
57
64
  each_with_object({}) do |(key, value), hash|
58
65
  hash[key] = value_to_h value
@@ -1,3 +1,3 @@
1
1
  module HashExt
2
- VERSION = '0.5.0'
2
+ VERSION = '0.6.0'
3
3
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Naiman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-29 00:00:00.000000000 Z
11
+ date: 2020-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.12'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.12'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: rake
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -173,8 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
159
  - !ruby/object:Gem::Version
174
160
  version: '0'
175
161
  requirements: []
176
- rubyforge_project:
177
- rubygems_version: 2.7.3
162
+ rubygems_version: 3.0.6
178
163
  signing_key:
179
164
  specification_version: 4
180
165
  summary: Hash extensions without monkey patching