forest_liana 5.3.1 → 5.3.2

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: 4ce31e8e9d92594427c53bfd5b2b6827218a225921fbeec7a371404fcbbf67bc
4
- data.tar.gz: 4baa01b9c4583493f697123ec8517ad191ceeec5ee7923058f70fd33255a2026
3
+ metadata.gz: 8ec0228713b3a5f0f943dcd9901d9d866ce2d5df36b452faaa8f163aed2b17aa
4
+ data.tar.gz: 152af3bfde151e934042b8629c28c77a1fe1ea0a648fd41857fec5cbe9179e03
5
5
  SHA512:
6
- metadata.gz: 423933e1177d38264ea7b351a66a86c8dd7d4d435c15fdd23f4399ae9cde8bf9604405dea94051038467b8853fa70e24e7d8e73cfb79ad124056c196f8b12ad0
7
- data.tar.gz: f9b955b3a70e2a1a576d5be1635a9257b72c2938929dd6b21d009a9de8f705a24a0f194f19f829703d73d1d9e0d47117fd9d71da8e55c997613834521a136313
6
+ metadata.gz: 7062153dfd912d67d91893d27d89d48f7aeba6a1de21ab442a91e1dc51d0f30369c406b700ed7b9f25fd4d69039172a118894af96f29be713e90543eadb66a18
7
+ data.tar.gz: 40ed811e8dda8166ee0573377f195ba4e8ee70c2446ffcaad8c4901bf372e0442ae419252fb30e4242f65231433b3e9b7afbedb587c297dfe445c72bfdf237b3
@@ -86,8 +86,7 @@ module ForestLiana
86
86
  formatted_fields = context[:fields].clone # clone for following test on is_same_data_structure
87
87
 
88
88
  # Call the user-defined change hook.
89
- field_name = params[:fields].select { |field| field[:value] != field[:previousValue] }[0][:field]
90
- result = action.hooks[:change][field_name].(context)
89
+ result = action.hooks[:change][params[:changedField]].(context)
91
90
 
92
91
  handle_result(result, formatted_fields, action)
93
92
  end
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "5.3.1"
2
+ VERSION = "5.3.2"
3
3
  end
@@ -109,7 +109,7 @@ describe 'Requesting Actions routes', :type => :request do
109
109
 
110
110
  describe 'call /change' do
111
111
  updated_foo = foo.clone.merge({:previousValue => nil, :value => 'bar'})
112
- params = {recordIds: [1], fields: [updated_foo], collectionName: 'Island'}
112
+ params = {recordIds: [1], fields: [updated_foo], collectionName: 'Island', changedField: 'foo'}
113
113
 
114
114
  it 'should respond 200' do
115
115
  post '/forest/actions/my_action/hooks/change', JSON.dump(params), 'CONTENT_TYPE' => 'application/json'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.1
4
+ version: 5.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda