sneaql 0.0.16-java → 0.0.18-java

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/sneaql +3 -1
  3. data/lib/sneaql_lib/base.rb +40 -0
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a88464715cbbb4c6efbadb8191725f3aeb3e7fa
4
- data.tar.gz: a06d84d005827d7e072b1f582fc98debed7b0cf5
3
+ metadata.gz: e6f876ef0efb100ba0e3a2e286249ea6054b380e
4
+ data.tar.gz: 90b65966024221b4ec1186e74c43c8c712cb5859
5
5
  SHA512:
6
- metadata.gz: f42467e68a8c13215d3c36e2940ae51601a767ec253814a04180697fbdb94ab96086b65306e92442af35137c7a79cffe6b7da0b091f2dc7436ead25dd9d03f3f
7
- data.tar.gz: 0b54cda35436015a39e72f328539b18f7c9373de8f0c888db6717a22fb365a6b45fd3e46fdba8d89e2cd1709ea2eacec9f74416e3c599eb46ab7abca7b219f9f
6
+ metadata.gz: 2f572ee51306a8dd1e5ca1dca37639a4634a465ab0943867e483a000025674d467f50b41a67989f077b7f86ec21671f6d946e246b4ec47444c90050b1be4093f
7
+ data.tar.gz: 4ed167d74274ca96c3840892adb865c00b793224379c7abef6aac5a9b2e8a976345385c400a5ee934fce8e0b09237f238cb7c560ebb62c6086b0f6314a86432d
data/bin/sneaql CHANGED
@@ -138,8 +138,9 @@ the above will execute the transform in the current directory. note that sneaql
138
138
  end
139
139
 
140
140
  configure_logging_format()
141
- require_sneaql_extensions() if ENV['SNEAQL_EXTENSIONS']
142
141
 
142
+ logger.info("SneaQL version #{Gem.loaded_specs['sneaql'].version.to_s}")
143
+ require_sneaql_extensions() if ENV['SNEAQL_EXTENSIONS']
143
144
  logger.debug("available sneaql resources: #{Sneaql::Core.class_map}")
144
145
 
145
146
  begin
@@ -252,6 +253,7 @@ the above will execute the transform in the current directory. note that sneaql
252
253
  end
253
254
 
254
255
  configure_logging_format()
256
+ logger.info("SneaQL version #{Gem.loaded_specs['sneaql'].version.to_s}")
255
257
  require_sneaql_extensions() if ENV['SNEAQL_EXTENSIONS']
256
258
 
257
259
  logger.debug("available sneaql resources: #{Sneaql::Core.class_map}")
@@ -117,6 +117,10 @@ module Sneaql
117
117
  end
118
118
  @logger.debug("arg validation results: #{valid}")
119
119
  !valid.include?(false)
120
+ rescue => e
121
+ @logger.error(e.message)
122
+ e.backtrace { |r| @logger.error(r) }
123
+ raise e
120
124
  end
121
125
 
122
126
  # validates that the value is a valid variable name
@@ -124,6 +128,10 @@ module Sneaql
124
128
  # @return [Boolean]
125
129
  def valid_variable?(a)
126
130
  @expression_handler.valid_session_variable_name?(a.to_s.strip)
131
+ rescue => e
132
+ @logger.error(e.message)
133
+ e.backtrace { |r| @logger.error(r) }
134
+ raise e
127
135
  end
128
136
 
129
137
  # validates that the value is a valid expression
@@ -131,6 +139,10 @@ module Sneaql
131
139
  # @return [Boolean]
132
140
  def valid_expression?(a)
133
141
  @expression_handler.valid_expression_reference?(a.to_s.strip)
142
+ rescue => e
143
+ @logger.error(e.message)
144
+ e.backtrace { |r| @logger.error(r) }
145
+ raise e
134
146
  end
135
147
 
136
148
  # validates that the value is a valid operator
@@ -138,6 +150,10 @@ module Sneaql
138
150
  # @return [Boolean]
139
151
  def valid_operator?(a)
140
152
  @expression_handler.valid_operators.include?(a.to_s.strip)
153
+ rescue => e
154
+ @logger.error(e.message)
155
+ e.backtrace { |r| @logger.error(r) }
156
+ raise e
141
157
  end
142
158
 
143
159
  # validates that the value is a valid recordset name
@@ -145,6 +161,10 @@ module Sneaql
145
161
  # @return [Boolean]
146
162
  def valid_recordset?(a)
147
163
  @recordset_manager.valid_recordset_name?(a.to_s.strip)
164
+ rescue => e
165
+ @logger.error(e.message)
166
+ e.backtrace { |r| @logger.error(r) }
167
+ raise e
148
168
  end
149
169
 
150
170
  # note that this is not a ruby symbol, but a sneaql symbol
@@ -155,6 +175,10 @@ module Sneaql
155
175
  def valid_symbol?(a)
156
176
  return true if a.match(/^\w+$/)
157
177
  false
178
+ rescue => e
179
+ @logger.error(e.message)
180
+ e.backtrace { |r| @logger.error(r) }
181
+ raise e
158
182
  end
159
183
 
160
184
  private
@@ -185,6 +209,10 @@ module Sneaql
185
209
 
186
210
  # perform the actual actions of managing the repo
187
211
  manage_repo
212
+ rescue => e
213
+ @logger.error(e.message)
214
+ e.backtrace { |r| @logger.error(r) }
215
+ raise e
188
216
  end
189
217
 
190
218
  # method to drop and rebuild the specified directory
@@ -194,6 +222,10 @@ module Sneaql
194
222
  @logger.info("dropping and recreating repo directory #{directory}")
195
223
  FileUtils.remove_dir(directory) if Dir.exist?(directory)
196
224
  FileUtils.mkdir_p(directory)
225
+ rescue => e
226
+ @logger.error(e.message)
227
+ e.backtrace { |r| @logger.error(r) }
228
+ raise e
197
229
  end
198
230
 
199
231
  # override in your implementation
@@ -211,6 +243,10 @@ module Sneaql
211
243
  zip_file.extract(f, f_path) unless File.exist?(f_path)
212
244
  end
213
245
  end
246
+ rescue => e
247
+ @logger.error(e.message)
248
+ e.backtrace { |r| @logger.error(r) }
249
+ raise e
214
250
  end
215
251
  end
216
252
 
@@ -225,6 +261,10 @@ module Sneaql
225
261
  @logger = logger ? logger : Logger.new(STDOUT)
226
262
  @params = params
227
263
  manage_steps
264
+ rescue => e
265
+ @logger.error(e.message)
266
+ e.backtrace { |r| @logger.error(r) }
267
+ raise e
228
268
  end
229
269
 
230
270
  # override with a method that will override steps with an array of
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sneaql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.18
5
5
  platform: java
6
6
  authors:
7
7
  - jeremy winters
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-09 00:00:00.000000000 Z
11
+ date: 2017-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement