bullet_train-api 1.8.0 → 1.8.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
2
  SHA256:
3
- metadata.gz: d1a7f6e82e9a4eee088e94604dd8b64e7f72d494077ec6b72bb233b5b61489ee
4
- data.tar.gz: e438c047e4e6c79e4b06eb9ef395f32fc7d8c159b538ff8c7a942e7d26fcd425
3
+ metadata.gz: dd9cc7f94adb405998d1964e365806c2535f1b6db3e1cf643e67e07f613839aa
4
+ data.tar.gz: e0f550fc3c7e6928903dbd118cf15a589590a8fb705b15d84af946dd9154ae98
5
5
  SHA512:
6
- metadata.gz: 2aa1a69f2230d83a720c3d2e2403a635a90e2bbb12f6465759e065418a4660e768ef711c9c48504d85e80bb296a55b1f81a9e24665cd0689ccafedd82b5e7cf6
7
- data.tar.gz: '009393a6395ec70027c43412e545dc5af9b96eb3eddec8abdce0ee6d3d11780e3346558e7c4298097a15fc916b7a0879e38a9be9fd92038730d14cecb3614edf'
6
+ metadata.gz: 22e61a29ef052db7707483eb4fb20dc94137c18c4079a34f4f7f0abbea584d08fde70a4f6d47a63111d51e39b25c8f2f1a761fb62c4cf561e798d38701a7e295
7
+ data.tar.gz: cfeb4789ac8e0da4c479cc40fc8529d28065921a1068f1c307b24bf273d7dad799d7da48019e269e64dbeaaa548a2b5293b7900fdd0920d0198ea18f6d7d0e0b
@@ -101,7 +101,7 @@ module Api
101
101
  end
102
102
  end
103
103
 
104
- if has_strong_parameters?("Api::#{@version.upcase}::#{model.name.pluralize}Controller".constantize)
104
+ if has_strong_parameters?("Api::#{@version.upcase}::#{model.name.pluralize}Controller")
105
105
  strong_parameter_keys = strong_parameter_keys_for(model.name, @version)
106
106
  strong_parameter_keys_for_update = strong_parameter_keys_for(model.name, @version, "update")
107
107
 
@@ -183,9 +183,11 @@ module Api
183
183
 
184
184
  private
185
185
 
186
- def has_strong_parameters?(controller)
187
- methods = controller.action_methods
188
- methods.include?("create") || methods.include?("update")
186
+ def has_strong_parameters?(controller_name)
187
+ "#{controller_name}::StrongParameters".constantize
188
+ true
189
+ rescue NameError
190
+ false
189
191
  end
190
192
 
191
193
  def update_ref_values!(hash, method_type = nil)
@@ -42,7 +42,7 @@ module FactoryBot
42
42
  template, class_name, var_name, values = _set_values("get_example", model)
43
43
 
44
44
  if method.end_with?("parameters")
45
- if has_strong_parameters?("::Api::#{version.upcase}::#{class_name.pluralize}Controller".constantize)
45
+ if has_strong_parameters?("::Api::#{version.upcase}::#{class_name.pluralize}Controller")
46
46
  strong_parameter_keys = strong_parameter_keys_for(class_name, version)
47
47
 
48
48
  output = _json_output(template, version, class_name, var_name, values)
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module Api
3
- VERSION = "1.8.0"
3
+ VERSION = "1.8.2"
4
4
  end
5
5
  end
@@ -34,6 +34,7 @@ class BulletTrain::Platform::ConnectionWorkflow
34
34
  faux_membership = team.memberships.create(
35
35
  user: faux_user,
36
36
  platform_agent: true,
37
+ user_email: faux_user.email,
37
38
  platform_agent_of: @application,
38
39
  added_by: team.memberships.find_by(user: current_user)
39
40
  )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-18 00:00:00.000000000 Z
11
+ date: 2024-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard