explicit-parameters 0.1.0 → 0.1.1

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: 9a6880bad37cdfc35abc3a08ffd8591df594dfa4
4
- data.tar.gz: 4377837d9757eae083a2a20f41ff925066a39f11
3
+ metadata.gz: 8b8678ec793b3a6c362be9da00a31ce5f03d60b7
4
+ data.tar.gz: f8b1c8d883db57b5203881eb598f50eddc361a77
5
5
  SHA512:
6
- metadata.gz: 49b1ac6b9514b4d25351ef8028eec8e24a4468332b6457ddb540c0d46f3171e73a5d7a02fb60e1a8432bb6927eda3e4595c6078a2fa70b983213ae3480de9cb1
7
- data.tar.gz: 8e4c49b64a93ef0e0a28d133ac749f15d48024c1c92eb2b128d73c9bdbfc87f29c7dd885ab9ec4645400a8e6f957f634d0dc4920b91e6eb5992308cf49385e56
6
+ metadata.gz: d6e21cb9325fd96891449fd4a9e22a121adfee90d01e7950ea8c5b5c260c46c789321119c625c05f6f929947c892701e5c8dee814ca5eecbf1c602315bbd47ec
7
+ data.tar.gz: c8cb01c64d716c8467cd2ff01c5b2d2ee5914e85e1ad4cd0d85aa800da31180ce2828b03509fc3e80b834d10eb52515cf8718e8de3b163b635d59700b33a9b34
@@ -94,7 +94,7 @@ module ExplicitParameters
94
94
  super.except(*missing_attributes)
95
95
  end
96
96
 
97
- delegate :each, :stringify_keys, to: :to_hash
97
+ delegate :each, :stringify_keys, :reject, :select, to: :to_hash
98
98
  delegate :[], to: :@original_attributes
99
99
 
100
100
  private
@@ -1,3 +1,3 @@
1
1
  module ExplicitParameters
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -41,6 +41,9 @@ RSpec.describe ExplicitParameters::Parameters do
41
41
  expect(params.stringify_keys.keys).to be == %w(id name)
42
42
  end
43
43
 
44
+ it '#reject returns a hash' do
45
+ expect(params.reject { false }).to be == {id: 42, name: 'George'}
46
+ end
44
47
 
45
48
  it 'allows access to raw parameters when accessed like a Hash' do
46
49
  expect(params[:id]).to be == '42'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: explicit-parameters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-24 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack