trophonius 1.4.2 → 1.4.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: b5cfb56042719c5acb4e4005f9faa66a0f748e7929226a10bcc2993a531f0d14
4
- data.tar.gz: a735cdd0c6af4547795fda4a06fbaacd9e006d295f538b7a18da620585ccb309
3
+ metadata.gz: 9d92b08e8204f1d2647b419cd5457f0aa756072526f528f868148f9bbcbd4316
4
+ data.tar.gz: 70df9b9746b4a07d34ab9a9cda2cc837cc5c6f9c359701da51f1958ee2425fb2
5
5
  SHA512:
6
- metadata.gz: 16a5eaaf5690005ff1830edcde19d9a91f7bf7eeaee8f379c123eb4ce1ffcc0bd607d1314f14525387da742744f80fc028882f85f1d3dcba42c9f4ff696f91b8
7
- data.tar.gz: 1a22f058592aa168c601ca5419fa8beb6a0c277367a0e797228083e6d80aff79bec7dad65eb9c578cb89834ca2bfdf85b6047829eef0b3d8c38fe93f97770f52
6
+ metadata.gz: d49725b94357cd94c4286ece7b2f2039899067ca4171685a8dd199daaa71a73a7ec2c1d8efe1a07eaa475232e0a08b7fe2d9d289ca932d269f1f5c1b2d422068
7
+ data.tar.gz: bb80ab56647654628ae70753b7f92600ad1aa79a9ecf00fa97db33fe009c870daa77807f00d4882d7b9341bb51cbcedb405e2887ed48009f8f9f3e3b16ef759e
data/lib/trophonius.rb CHANGED
@@ -3,6 +3,7 @@ require 'trophonius_model'
3
3
  require 'trophonius_config'
4
4
  require 'trophonius_date'
5
5
  require 'trophonius_time'
6
+ require 'trophonius_date_time'
6
7
 
7
8
  module Trophonius # :nodoc:
8
9
  def self.configuration
@@ -3,5 +3,9 @@ class Date
3
3
  self.strftime('%m/%d/%Y')
4
4
  end
5
5
 
6
+ def self.from_fm(fm_date)
7
+ Date.strptime(fm_date, '%m/%d/%Y')
8
+ end
9
+
6
10
  alias convert_to_fm to_fm
7
11
  end
@@ -217,17 +217,17 @@ module Trophonius
217
217
 
218
218
  if @post_request_script.present?
219
219
  body.merge!(script: @post_request_script)
220
- body.merge!('script.param' => @post_request_script_param) if @post_request_script_param.present?
220
+ body.merge!('script.param' => @post_request_scriptparam) if @post_request_scriptparam.present?
221
221
  end
222
222
 
223
223
  if @prerequest_script.present?
224
224
  body.merge!(script: @prerequest_script)
225
- body.merge!('script.param' => @prerequest_script_param) if @prerequest_script_param.present?
225
+ body.merge!('script.prerequest.param' => @prerequest_scriptparam) if @prerequest_scriptparam.present?
226
226
  end
227
227
 
228
228
  if @presort_script.present?
229
229
  body.merge!(script: @presort_script)
230
- body.merge!('script.param' => @presort_script_param) if @presort_script_param.present?
230
+ body.merge!('script.presort.param' => @presort_scriptparam) if @presort_scriptparam.present?
231
231
  end
232
232
 
233
233
  if @portal_limits
@@ -150,6 +150,12 @@ module Trophonius
150
150
  else
151
151
  super
152
152
  end
153
+ rescue NameError => e
154
+ if e.message.include?('constant')
155
+ Error.throw_error('102', e.message.split(' ')[-1], layout_name)
156
+ else
157
+ raise e
158
+ end
153
159
  end
154
160
 
155
161
  ##
@@ -91,7 +91,7 @@ module Trophonius
91
91
  )
92
92
 
93
93
  token = setup_connection
94
- result = make_request(url, "Bearer #{token}", 'get', '{}')
94
+ result = make_request(url, "#{token}", 'get', '{}')
95
95
  ret_val = ''
96
96
 
97
97
  if result['messages'][0]['code'] != '0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trophonius
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kempen Automatisering