activerecord-typedstore 1.2.1 → 1.2.2

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
- SHA256:
3
- metadata.gz: c64a99347b862a3a9b8a8dc80e69c41d7c0fe591504e2f24ff866847e519fcc2
4
- data.tar.gz: 5a1253ee1d02872cece94c24bd66b1c0bd9eaff62149d3459ad8a1a1e038fc63
2
+ SHA1:
3
+ metadata.gz: 10509c83e2d0382f0776230b371a148e542b8b2c
4
+ data.tar.gz: 022cee6d5b840251cb1e9e181dc39f343196344d
5
5
  SHA512:
6
- metadata.gz: fb8685fad1216a6c5de17fa5a440d0b6da5b4dbf6ecd6f4779159508b1995bc554972f513d72e13f0ed67628af2ca03197f920fa271cb8bb032b0d450479c370
7
- data.tar.gz: 922692983a37101df34dc6491072190ce53aa6068f1e435c86c39e9d8f6727eec6733861c26f4e330d67c3e839ea1922cfaf627292e87d1e4e2df03e124272ff
6
+ metadata.gz: 8a293be116df248d9aa5dec3ff968fc8aab884d701b5498200ec268a2177d8e376d0a5fd6f37e36e61d6a5ee73edcd0faaf1e3ddee244e7af2321dff568a79b0
7
+ data.tar.gz: 19208c08ddb608f44657059279f11fa665ed4046389092c5596a6b077f85964af916db5a756b5b12b8e7394f5c05ae1d40d9961eb0d51c6199e5b2ea6c91dfcb
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency 'activerecord', '>= 4.2'
22
22
 
23
- spec.add_development_dependency 'bundler', '~> 1.3'
23
+ spec.add_development_dependency 'bundler'
24
24
  spec.add_development_dependency 'rake', '~> 10'
25
25
  spec.add_development_dependency 'rspec', '~> 3'
26
26
  spec.add_development_dependency 'coveralls', '~> 0'
@@ -15,6 +15,9 @@ module ActiveRecord::TypedStore
15
15
  end
16
16
  end
17
17
 
18
+ delegate :with_indifferent_access, to: :to_h
19
+ delegate :slice, :except, :without, to: :with_indifferent_access
20
+
18
21
  def initialize(constructor={})
19
22
  super()
20
23
  update(defaults_hash)
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module TypedStore
3
- VERSION = '1.2.1'
3
+ VERSION = '1.2.2'
4
4
  end
5
5
  end
@@ -201,7 +201,27 @@ describe ActiveRecord::TypedStore::TypedHash do
201
201
  hash.merge!(source: '')
202
202
  expect(hash[:source]).to be == 'web'
203
203
  end
204
+
205
+ end
206
+
207
+ describe '#except' do
208
+
209
+ it 'does not set the default for ignored keys' do
210
+ hash = hash_class.new(source: 'foo')
211
+ expect(hash.except(:source)).to_not have_key(:source)
212
+ end
213
+
204
214
  end
215
+
216
+ describe '#slice' do
217
+
218
+ it 'does not set the default for ignored keys' do
219
+ hash = hash_class.new(source: 'foo')
220
+ expect(hash.slice(:not_source)).to_not have_key(:source)
221
+ end
222
+
223
+ end
224
+
205
225
  end
206
226
 
207
227
  context 'unknown columns' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-typedstore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-03 00:00:00.000000000 Z
11
+ date: 2019-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -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: '1.3'
33
+ version: '0'
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.3'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -189,7 +189,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubygems_version: 3.0.1
192
+ rubyforge_project:
193
+ rubygems_version: 2.5.1
193
194
  signing_key:
194
195
  specification_version: 4
195
196
  summary: Add type casting and full method attributes support to АctiveRecord store