auto_strong_parameters 0.0.2 → 0.0.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
  SHA256:
3
- metadata.gz: 1b7680411c579ad85825c31e55cb9e0e22fe2b6968a1ac47a9f4c2c5f06cd8b4
4
- data.tar.gz: 3aaeb488a04aa4b2e8a38a85b5fc253e2ef9ed0d5e6711a1a9624b56de069e85
3
+ metadata.gz: 8d888930c9a1649b83470cc64c9c3d4d9477c9d520c3ac262bb9741b72b63f92
4
+ data.tar.gz: 4dfb6bc178a3b498c35288cf79f75c944e42ffe55a72a8f2603eb7d9f420d212
5
5
  SHA512:
6
- metadata.gz: ae5976a91ea2a2941ce5ebd71aa997042b37103a1fa01735a3211f725fe34a098e6098b67261170bd0309ba0a977ad9539d916c54499a1341200b6e5b072b496
7
- data.tar.gz: 9e5c0ab8ce1774f750d6000d43b77c84a563764a0d0706df359ac11a3fed5beb5b00b488377abe4a2bd6372273f491493778ad781c149ef9e77b9a6093470c58
6
+ metadata.gz: b7f3f4a17050f13d2310d0ac4909e6b570223f96bc3147860f389a464c454eb1738557f53d2b7d303b41c6071e28e5e294f21aab9b7b38ae8a750c1f2a600cac
7
+ data.tar.gz: 5fb38548e76beb1e9e88ac03b0cdcba3b5b819db598f54f08bcaca3665588c22fecff1fcb9450dd3ad346acd5032f1c5b6eb05669fac916d1600b344aad9a695
@@ -3,12 +3,12 @@
3
3
  module AutoStrongParameters
4
4
  module AutoPermit
5
5
  def auto_permit!(key)
6
- shape = asp_auto_permitted_params(key)
6
+ shape = asp_auto_permitted_params
7
7
 
8
8
  require(key).permit(shape[key])
9
9
  end
10
10
 
11
- def asp_auto_permitted_params(key)
11
+ def asp_auto_permitted_params
12
12
  if sig = self[AutoStrongParameters.asp_message_key]
13
13
  AutoStrongParameters.verifier.verify(sig) rescue {}
14
14
  else
@@ -1,3 +1,3 @@
1
1
  module AutoStrongParameters
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -50,7 +50,7 @@ class AutoPermitTest < ActionController::TestCase
50
50
  end
51
51
 
52
52
  def test_auto_permit
53
- post :auto_permit, **process_args(user: user_params.merge(message_key => signature))
53
+ post :auto_permit, **process_args(user: user_params, message_key => signature)
54
54
  assert_response :ok
55
55
  j = ActiveSupport::JSON.decode(response.body)
56
56
 
@@ -61,7 +61,7 @@ class AutoPermitTest < ActionController::TestCase
61
61
  end
62
62
 
63
63
  def test_auto_permit_incorrect_signature
64
- post :auto_permit, **process_args(user: user_params.merge(message_key => 'abc123'))
64
+ post :auto_permit, **process_args(user: user_params, message_key => 'abc123')
65
65
  assert_response :ok
66
66
  j = ActiveSupport::JSON.decode(response.body)
67
67
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_strong_parameters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drew Ulmer