auto_strong_parameters 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b7680411c579ad85825c31e55cb9e0e22fe2b6968a1ac47a9f4c2c5f06cd8b4
4
- data.tar.gz: 3aaeb488a04aa4b2e8a38a85b5fc253e2ef9ed0d5e6711a1a9624b56de069e85
3
+ metadata.gz: dddcaa6e82b8ee32c7c48e829645a716a51298ebdc0e354951782454e6c50a7e
4
+ data.tar.gz: df7e2c4d6ac02ae237d5d432269be80e5f9182b583216201909dfc99b724e3dc
5
5
  SHA512:
6
- metadata.gz: ae5976a91ea2a2941ce5ebd71aa997042b37103a1fa01735a3211f725fe34a098e6098b67261170bd0309ba0a977ad9539d916c54499a1341200b6e5b072b496
7
- data.tar.gz: 9e5c0ab8ce1774f750d6000d43b77c84a563764a0d0706df359ac11a3fed5beb5b00b488377abe4a2bd6372273f491493778ad781c149ef9e77b9a6093470c58
6
+ metadata.gz: b311a61ef84324b1cd74e98bafcfa9e11a0b0493baa1e03bc388907cf31f7c06bf079d073349a63167a9936deb5bb6d6e6996c20f4c39ed6b21d2956a850510f
7
+ data.tar.gz: 9dde9aa41c0af04cbb757429acbf98b3826c981c8d6162468665c2863bcebb6606eac066b384eb72b82566447bee69a407ca6287e80a04410448234f06000236
@@ -14,7 +14,7 @@ module AutoStrongParameters::AutoFormParams
14
14
  search_field telephone_field date_field time_field datetime_field
15
15
  month_field week_field url_field email_field number_field range_field
16
16
  file_field password_field text_area text_field radio_button phone_field
17
- select
17
+ select collection_select trix_editor
18
18
  )
19
19
 
20
20
  TRACKED_FIELDS.each do |name|
@@ -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.4"
3
3
  end
@@ -71,7 +71,7 @@ module AutoStrongParameters
71
71
  end
72
72
  end
73
73
 
74
- # Rails' message_verifier exists with a stable API in all versions of Rails
74
+ # Rails' MessageVerifier exists with a stable API in all versions of Rails
75
75
  # since 4.2.
76
76
  def self.verifier
77
77
  @verifier ||= ActiveSupport::MessageVerifier.new(secret, serializer: JSON)
@@ -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,14 +1,14 @@
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drew Ulmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-21 00:00:00.000000000 Z
11
+ date: 2023-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails