hiptest-publisher 1.27.1 → 1.28.0

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
  SHA1:
3
- metadata.gz: 9e740c3f5eba60aa8f43c3334899b7887c81a603
4
- data.tar.gz: f5b7987fa90ff52688142504b644523c66e02450
3
+ metadata.gz: 905d7d68b11b34c886b2f6c252c51daab7d785bd
4
+ data.tar.gz: a73264ae0f56fe9a9bd85ce911887b5306c1222a
5
5
  SHA512:
6
- metadata.gz: 92439163d39bb339d3055c847593bade88d142b31e64ad91ceab016f354969705d2b0ae167ee71e5e72910a16a37241e2fa3423d7182fbcea5b813d43b6046c9
7
- data.tar.gz: 4b040ccd2b38f34102983a5af2834e231ef195d2ed516c17fe5b9dbe16afe98ccbff98a16239eed0448f4a2f1fcf7e2223b534da98fa1854d697794e4c041364
6
+ metadata.gz: bac231fb1c7e7b13c18993c00c038ec76e459e99e3880e37e20461aab3f414f104865fd648834cf3645fdf96e1136e217891da2202d2b422f4f9ff2972083a4f
7
+ data.tar.gz: 432a153a4322ef05ead39aca1041d241bd5f2342ce4f893013d066c1ab991549a07bfeeb9cd0c6a6c4ea4102c0ac5e959ef432787191ca84aac949fc3b904857
@@ -177,6 +177,7 @@ en:
177
177
  framework: Test framework to use
178
178
  global_failure_on_missing_reports: When there is no results file to push, report a global failure
179
179
  help: Show this message
180
+ http_proxy: 'Specify your http proxy to access Hiptest'
180
181
  keep_filenames: 'Keep the same name as in HipTest for the test files (note: may cause encoding issues)'
181
182
  keep_foldernames: 'Keep the same name as in HipTest for the folders (note: may cause encoding issues)'
182
183
  language: Target language
@@ -188,6 +188,8 @@ module Hiptest
188
188
  end
189
189
 
190
190
  def find_proxy_uri(address, port)
191
+ return URI.parse(@cli_options.http_proxy) if @cli_options.http_proxy
192
+
191
193
  URI::HTTP.new(
192
194
  "http", nil, address, port, nil, nil, nil, nil, nil
193
195
  ).find_proxy
@@ -53,7 +53,7 @@ module Hiptest
53
53
  value.is_a?(Handlebars::Tree::Block) ? value.fn(context) : value
54
54
  end
55
55
 
56
- def hh_to_string(context, value, block=nil)
56
+ def hh_to_string(context, value, block = nil)
57
57
  value = compute_block_value(context, value, block)
58
58
  "#{value.to_s}"
59
59
  end
@@ -90,18 +90,6 @@ module Hiptest
90
90
  end
91
91
  end
92
92
 
93
- def hh_unless(context, condition, block, else_block = nil)
94
- condition = !condition.empty? if condition.respond_to?(:empty?)
95
-
96
- if !condition
97
- block.fn(context)
98
- elsif else_block
99
- else_block.fn(context)
100
- else
101
- ""
102
- end
103
- end
104
-
105
93
  def hh_prepend(context, str, block)
106
94
  block.fn(context).split("\n").map do |line|
107
95
  indented = "#{str}#{line}"
@@ -156,28 +144,28 @@ module Hiptest
156
144
  end
157
145
 
158
146
  # kept for backward compatibility of customized templates
159
- def hh_escape_quotes (context, s, block=nil)
147
+ def hh_escape_quotes (context, s, block = nil)
160
148
  hh_escape_double_quotes(context, s, block)
161
149
  end
162
150
 
163
- def hh_escape_double_quotes (context, s, block=nil)
151
+ def hh_escape_double_quotes (context, s, block = nil)
164
152
  s = compute_block_value(context, s, block)
165
153
  s ? s.gsub('"', '\\"') : ""
166
154
  end
167
155
 
168
- def hh_escape_single_quotes (context, s, block=nil)
156
+ def hh_escape_single_quotes (context, s, block = nil)
169
157
  # weird \\\\, see http://stackoverflow.com/questions/7074337/why-does-stringgsub-double-content
170
158
  s = compute_block_value(context, s, block)
171
159
  s ? s.gsub('\'', "\\\\'") : ""
172
160
  end
173
161
 
174
- def hh_unescape_single_quotes (context, s, block=nil)
162
+ def hh_unescape_single_quotes (context, s, block = nil)
175
163
  # weird \\\\, see http://stackoverflow.com/questions/7074337/why-does-stringgsub-double-content
176
164
  s = compute_block_value(context, s, block)
177
165
  s ? s.gsub("\\'", "'") : ""
178
166
  end
179
167
 
180
- def hh_escape_backslashes_and_double_quotes (context, s, block=nil)
168
+ def hh_escape_backslashes_and_double_quotes (context, s, block = nil)
181
169
  s = compute_block_value(context, s, block)
182
170
 
183
171
  if s
@@ -228,15 +216,15 @@ module Hiptest
228
216
  "{#{block.fn(context)}}"
229
217
  end
230
218
 
231
- def hh_open_curly (context, block)
219
+ def hh_open_curly (context, block, else_block = nil)
232
220
  "{"
233
221
  end
234
222
 
235
- def hh_close_curly (context, block)
223
+ def hh_close_curly (context, block, else_block = nil)
236
224
  "}"
237
225
  end
238
226
 
239
- def hh_tab (context, block)
227
+ def hh_tab (context, block, else_block = nil)
240
228
  "\t"
241
229
  end
242
230
 
@@ -253,7 +241,7 @@ module Hiptest
253
241
  name
254
242
  end
255
243
 
256
- def hh_strip_regexp_delimiters(context, regexp, block=nil)
244
+ def hh_strip_regexp_delimiters(context, regexp, block = nil)
257
245
  regexp = compute_block_value(context, regexp, block)
258
246
  return regexp.gsub(/(^\^)|(\$$)/, '')
259
247
  end
@@ -271,7 +259,7 @@ module Hiptest
271
259
  return block.fn(context).gsub(str, replacement)
272
260
  end
273
261
 
274
- def hh_debug(context, block)
262
+ def hh_debug(context, block, _)
275
263
  require 'pry'
276
264
  binding.pry
277
265
  ""
@@ -236,6 +236,7 @@ class OptionsParser
236
236
  Option.new(nil, 'split-scenarios', false, nil, I18n.t('options.split_scenarios'), :split_scenarios),
237
237
  Option.new(nil, 'leafless-export', false, nil, I18n.t('options.leafless_export'), :leafless_export),
238
238
  Option.new('s', 'site=SITE', 'https://app.hiptest.com', String, I18n.t('options.site'), :site),
239
+ Option.new(nil, 'http-proxy=PROXY_URL', nil, String, I18n.t('options.http_proxy'), :http_proxy),
239
240
  Option.new('p', 'push=FILE.TAP', '', String, I18n.t('options.push'), :push),
240
241
  Option.new(nil, 'global-failure-on-missing-reports', false, nil, I18n.t('options.global_failure_on_missing_reports'), :global_failure_on_missing_reports),
241
242
  Option.new(nil, 'push-format=tap', 'tap', String, I18n.t('options.push_format'), :push_format),
@@ -243,7 +244,7 @@ class OptionsParser
243
244
  Option.new(nil, 'sort=[id,order,alpha]', 'order', String, I18n.t('options.sort'), :sort),
244
245
  Option.new(nil, '[no-]uids', true, nil, I18n.t('options.uids'), :uids),
245
246
  Option.new(nil, '[no-]parent-folder-tags', true, nil, I18n.t('options.parent_folder_tags'), :parent_folder_tags),
246
- Option.new(nil, 'parameter-delimiter', '"', String, I18n.t('options.parameter_delimiter'), :parameter_delimiter),
247
+ Option.new(nil, 'parameter-delimiter=DELIMITER', '"', String, I18n.t('options.parameter_delimiter'), :parameter_delimiter),
247
248
  Option.new(nil, 'with-dataset-names', false, nil, I18n.t('options.with_dataset_names'), :with_dataset_names),
248
249
  Option.new(nil, 'keep-filenames', false, nil, I18n.t('options.keep_filenames'), :keep_filenames),
249
250
  Option.new(nil, 'keep-foldernames', false, nil, I18n.t('options.keep_foldernames'), :keep_foldernames),
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiptest-publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.27.1
4
+ version: 1.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - HipTest R&D
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-29 00:00:00.000000000 Z
11
+ date: 2019-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -116,14 +116,14 @@ dependencies:
116
116
  requirements:
117
117
  - - "~>"
118
118
  - !ruby/object:Gem::Version
119
- version: '0.1'
119
+ version: '0.2'
120
120
  type: :runtime
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - "~>"
125
125
  - !ruby/object:Gem::Version
126
- version: '0.1'
126
+ version: '0.2'
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: ruby_version
129
129
  requirement: !ruby/object:Gem::Requirement