sneaql 0.0.26-java → 0.0.27-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/sneaql.rb +17 -5
  3. metadata +21 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 8749e131def59a341ad2ee9614bd93be47a964b89cf799021f62fd55e1db24ed
4
- data.tar.gz: 860f7042d8e88abff0ba2b10d29517f317705fcba0ab88778303bed96782ca7e
2
+ SHA1:
3
+ metadata.gz: d0fe87ede61b01c13de85779ba9e61d437b50cc7
4
+ data.tar.gz: d3da3a3514b84aeffb4fcae571c9833fbf3ad120
5
5
  SHA512:
6
- metadata.gz: ef290d276d9fc476655e56da5334f6b9e1a47d51cdd01c482f66e7ab67841ebb419c6f89aa02b57edbeb823c57f02a0c3a3b93c49cb6fa695b301f0a3e987447
7
- data.tar.gz: 86bf58355134e6b3003264ccc22444f6b9fba33196d79ef3a16852329db81425611256bc6b06d3962a3d44eca84421f5485036b95cb8b2708d192854e0b56b0a
6
+ metadata.gz: 220eaea8147da9562ebb61a56124c2c10ff589d4bf5faab702b8b4165f06b0960d70ae571395154e637de7ccbfc8ad67bad85286f4c3d0bfb4474f1d20d747a3
7
+ data.tar.gz: 6b6a6d02f202f08c8c877b940a0895a88b4a776c5455290316475a313818d674f556d30b93db7d872de3dbf6910d3c172b4417522837d009017d34c356977e26
data/lib/sneaql.rb CHANGED
@@ -217,8 +217,10 @@ module Sneaql
217
217
  # not rollback automatically unless that is the default RDBMS
218
218
  # behavior for a connection that closes before a commit.
219
219
  def iterate_steps_and_statements
220
+ # each step is a file full of statements
220
221
  @parsed_steps.each_with_index do |this_step, i|
221
222
  # raise any lingering errors not handled in previous step
223
+ # on_error tag must exist in the same step file that raised the error
222
224
  raise @exception_manager.pending_error if @exception_manager.pending_error != nil
223
225
  # set this so that other processes can poll the state
224
226
  @current_step = this_step[:step_number]
@@ -227,7 +229,7 @@ module Sneaql
227
229
  # set this so that other processes can poll the state
228
230
  @current_statement = stmt_index + 1
229
231
 
230
- # log the pending error
232
+ # log the pending error if there is one
231
233
  @exception_manager.output_pending_error
232
234
 
233
235
  # log some useful info
@@ -240,7 +242,9 @@ module Sneaql
240
242
 
241
243
  # evaluate any variable references in the arguments
242
244
  if this_cmd[:arguments]
243
- this_cmd[:arguments].map! { |a| @expression_handler.evaluate_expression(a) }
245
+ this_cmd[:arguments].map! do |a|
246
+ @expression_handler.evaluate_expression(a)
247
+ end
244
248
  end
245
249
 
246
250
  begin
@@ -277,16 +281,24 @@ module Sneaql
277
281
  raise @exception_manager.pending_error
278
282
  end
279
283
  end
280
-
284
+
285
+ # this is where exit_step_if is handled
281
286
  rescue Sneaql::Exceptions::SQLTestStepExitCondition => e
282
287
  @logger.info e.message
283
288
  break
284
289
  end
285
290
  end
286
291
  end
287
- rescue Sneaql::Exceptions::SQLTestStepExitCondition, Sneaql::Exceptions::SQLTestExitCondition
288
- @logger.info("SQLTest Exception Handled, continuing")
292
+ # exit_if conditions are handled here
293
+ # this will exit the transform because we are outside of the loop above
294
+ # note that the exit code will still be 0, allowing for graceful exit.
295
+ # it might make sense to provide another tag error_if which will raise
296
+ # a non-0 exit code for incident tracking.
297
+ rescue Sneaql::Exceptions::SQLTestExitCondition
298
+ @logger.info("exit_if condition is met... exiting sneaql")
299
+ # any other errors are handled here with detailed logging
289
300
  rescue => e
301
+ @logger.error("exiting sneaql due to an unhandled exception...")
290
302
  @logger.error(e.message)
291
303
  e.backtrace.each { |r| @logger.error(r) }
292
304
  raise e
metadata CHANGED
@@ -1,58 +1,59 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sneaql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.26
4
+ version: 0.0.27
5
5
  platform: java
6
6
  authors:
7
7
  - jeremy winters
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-05 00:00:00.000000000 Z
11
+ date: 2018-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: logger
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
19
  version: '1.2'
19
- name: logger
20
- prerelease: false
21
20
  type: :runtime
21
+ prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
+ name: minitest
28
29
  requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - "~>"
31
32
  - !ruby/object:Gem::Version
32
33
  version: '5.9'
33
- name: minitest
34
- prerelease: false
35
34
  type: :development
35
+ prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.9'
41
41
  - !ruby/object:Gem::Dependency
42
+ name: git
42
43
  requirement: !ruby/object:Gem::Requirement
43
44
  requirements:
44
45
  - - "~>"
45
46
  - !ruby/object:Gem::Version
46
47
  version: '1.3'
47
- name: git
48
- prerelease: false
49
48
  type: :runtime
49
+ prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
+ name: jdbc_helpers
56
57
  requirement: !ruby/object:Gem::Requirement
57
58
  requirements:
58
59
  - - "~>"
@@ -61,9 +62,8 @@ dependencies:
61
62
  - - ">="
62
63
  - !ruby/object:Gem::Version
63
64
  version: 0.0.2
64
- name: jdbc_helpers
65
- prerelease: false
66
65
  type: :runtime
66
+ prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - "~>"
@@ -73,6 +73,7 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: 0.0.2
75
75
  - !ruby/object:Gem::Dependency
76
+ name: zip
76
77
  requirement: !ruby/object:Gem::Requirement
77
78
  requirements:
78
79
  - - "~>"
@@ -81,9 +82,8 @@ dependencies:
81
82
  - - "~>"
82
83
  - !ruby/object:Gem::Version
83
84
  version: 2.0.2
84
- name: zip
85
- prerelease: false
86
85
  type: :runtime
86
+ prerelease: false
87
87
  version_requirements: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - "~>"
@@ -93,28 +93,28 @@ dependencies:
93
93
  - !ruby/object:Gem::Version
94
94
  version: 2.0.2
95
95
  - !ruby/object:Gem::Dependency
96
+ name: thor
96
97
  requirement: !ruby/object:Gem::Requirement
97
98
  requirements:
98
99
  - - "~>"
99
100
  - !ruby/object:Gem::Version
100
101
  version: '0.19'
101
- name: thor
102
- prerelease: false
103
102
  type: :runtime
103
+ prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - "~>"
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0.19'
109
109
  - !ruby/object:Gem::Dependency
110
+ name: dotenv
110
111
  requirement: !ruby/object:Gem::Requirement
111
112
  requirements:
112
113
  - - "~>"
113
114
  - !ruby/object:Gem::Version
114
115
  version: '2.1'
115
- name: dotenv
116
- prerelease: false
117
116
  type: :runtime
117
+ prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - "~>"
@@ -143,7 +143,7 @@ homepage: https://www.full360.com
143
143
  licenses:
144
144
  - MIT
145
145
  metadata: {}
146
- post_install_message:
146
+ post_install_message:
147
147
  rdoc_options: []
148
148
  require_paths:
149
149
  - lib
@@ -158,9 +158,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  requirements: []
161
- rubyforge_project:
162
- rubygems_version: 2.6.13
163
- signing_key:
161
+ rubyforge_project:
162
+ rubygems_version: 2.6.11
163
+ signing_key:
164
164
  specification_version: 4
165
165
  summary: sneaql language core
166
166
  test_files: []