hash_ext 0.2.3 → 0.3.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
- SHA1:
3
- metadata.gz: eba87bb627d260913baffdb6da736ed155ccef99
4
- data.tar.gz: f44ace55737bf6249643940f8fea149bc176c7be
2
+ SHA256:
3
+ metadata.gz: bb3a7d52074eaa16664df7d5bdcea9e55707c03f1b588b11ec343a216486a0fb
4
+ data.tar.gz: cd5424081c17dbf054d2c419535f28fd9a01d1ed29193a48ba4a423a797c58bf
5
5
  SHA512:
6
- metadata.gz: 6071d9756d9ca39ba7bcd151b32e357fdc454c010de8938c6680ce17cbace13386095b1cc6a7a813270dd0cc14c318af617fa1fb7d18e5a7d0aa67ed90cb03c4
7
- data.tar.gz: 773ca805d092b144470489a2cd931cc515b5efa79c2b83afe345658171009da156056ae174ad33abdfb3d4c769650dc3aeb3e1bf8996f6cb49447d34870b90d1
6
+ metadata.gz: 2026727664be4c2092e83630acc50397cabefea5f3f3a85ebc89453d83befffcd16edb704ca627128d9f17b59e3f920d23cbc02e904df229e123e1ac00eacf5d
7
+ data.tar.gz: 7a86313de223db2f7eeca2ed0d4776d9233844184a678e10386e4335d329a1452d62d619d98820a8726982f28d9e28f77243f91f2fc0b4c31482ea7c18c82ac6
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.3.0
1
+ ruby-2.5.0
data/.travis.yml CHANGED
@@ -1,10 +1,23 @@
1
1
  language: ruby
2
+
2
3
  rvm:
3
4
  - 1.9.3
4
5
  - 2.0
5
6
  - 2.1
6
7
  - 2.2
7
8
  - 2.3.0
8
- - jruby
9
+ - 2.4.0
10
+ - 2.5.0
11
+ - jruby-1.7.25
12
+ - jruby-9.1.7.0
13
+ - ruby-head
14
+ - jruby-head
15
+
16
+ matrix:
17
+ fast_finish: true
18
+ allow_failures:
19
+ - rvm: ruby-head
20
+ - rvm: jruby-head
21
+
9
22
  before_install:
10
23
  - gem install bundler
data/Rakefile CHANGED
@@ -3,9 +3,15 @@ require 'rake/testtask'
3
3
 
4
4
  Rake::TestTask.new(:spec) do |t|
5
5
  t.libs << 'spec'
6
- t.pattern = 'spec/**/*_spec.rb'
6
+ t.libs << 'lib'
7
+ t.pattern = ENV['DIR'] ? File.join(ENV['DIR'], '**', '*_spec.rb') : 'spec/**/*_spec.rb'
7
8
  t.verbose = false
8
9
  t.warning = false
10
+ t.loader = nil if ENV['TEST']
11
+ ENV['TEST'], ENV['LINE'] = ENV['TEST'].split(':') if ENV['TEST'] && !ENV['LINE']
12
+ t.options = ''
13
+ t.options << "--name=/#{ENV['NAME']}/ " if ENV['NAME']
14
+ t.options << "-l #{ENV['LINE']} " if ENV['LINE'] && ENV['TEST']
9
15
  end
10
16
 
11
17
  task default: :spec
data/hash_ext.gemspec CHANGED
@@ -19,11 +19,12 @@ 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.6'
22
+ spec.add_development_dependency 'bundler', '~> 1.12'
23
23
  spec.add_development_dependency 'rake', '~> 11.0'
24
24
  spec.add_development_dependency 'minitest', '~> 5.0'
25
25
  spec.add_development_dependency 'minitest-colorin', '~> 0.1'
26
- spec.add_development_dependency 'simplecov', '~> 0.12'
26
+ spec.add_development_dependency 'minitest-line', '~> 0.6'
27
+ spec.add_development_dependency 'simplecov', '~> 0.14'
27
28
  spec.add_development_dependency 'coveralls', '~> 0.8'
28
29
  spec.add_development_dependency 'pry-nav', '~> 0.2'
29
30
 
@@ -5,7 +5,7 @@ class Hash
5
5
  if value.kind_of? Hash
6
6
  self.new value
7
7
  elsif value.kind_of? ::Array
8
- Array.new value
8
+ Accessible::Array.new value
9
9
  else
10
10
  value
11
11
  end
@@ -25,7 +25,7 @@ class Hash
25
25
  end
26
26
 
27
27
  def []=(key, value)
28
- super key, self.class.make_accessible(value)
28
+ super key, Accessible.make_accessible(value)
29
29
  end
30
30
 
31
31
  private
@@ -1,3 +1,15 @@
1
1
  class Hash
2
- Indifferent = Normalized.subclass { |key| key.kind_of?(String) ? key.to_sym : key }
2
+ class Indifferent < Normalized
3
+
4
+ def initialize(hash={})
5
+ super hash
6
+ end
7
+
8
+ private
9
+
10
+ def normalize_key(key)
11
+ key.to_sym
12
+ end
13
+
14
+ end
3
15
  end
@@ -1,3 +1,3 @@
1
1
  module HashExt
2
- VERSION = '0.2.3'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.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: 2017-01-10 00:00:00.000000000 Z
11
+ date: 2018-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '1.12'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: '1.12'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +66,34 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest-line
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.6'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.6'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: simplecov
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '0.12'
89
+ version: '0.14'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '0.12'
96
+ version: '0.14'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: coveralls
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -152,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
166
  version: '0'
153
167
  requirements: []
154
168
  rubyforge_project:
155
- rubygems_version: 2.5.1
169
+ rubygems_version: 2.7.3
156
170
  signing_key:
157
171
  specification_version: 4
158
172
  summary: Hash extensions without monkey patching