hiptest-publisher 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hiptest-publisher/handlebars_helper.rb +20 -1
- data/lib/templates/csharp/template.hbs +1 -1
- data/lib/templates/cucumber/java/actionword.hbs +1 -1
- data/lib/templates/gherkin/argument.hbs +1 -1
- data/lib/templates/gherkin/template.hbs +1 -1
- data/lib/templates/java/template.hbs +1 -1
- data/lib/templates/javascript/_module_declaration.hbs +1 -1
- data/lib/templates/javascript/_scenario.hbs +1 -1
- data/lib/templates/javascript/dataset.hbs +1 -1
- data/lib/templates/javascript/jasmine/_scenario.hbs +2 -2
- data/lib/templates/javascript/jasmine/dataset.hbs +1 -1
- data/lib/templates/javascript/jasmine/scenarios.hbs +1 -1
- data/lib/templates/javascript/jasmine/single_scenario.hbs +1 -1
- data/lib/templates/javascript/jasmine/single_test.hbs +1 -1
- data/lib/templates/javascript/jasmine/tests.hbs +1 -1
- data/lib/templates/javascript/template.hbs +1 -1
- data/lib/templates/php/template.hbs +1 -1
- data/lib/templates/python/template.hbs +1 -1
- data/lib/templates/robotframework/template.hbs +1 -1
- data/lib/templates/ruby/_scenario.hbs +2 -2
- data/lib/templates/ruby/dataset.hbs +1 -1
- data/lib/templates/ruby/template.hbs +1 -1
- data/lib/templates/specflow/actionword.hbs +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44afaaddfce3beb02f0060f1016dd37892405046
|
4
|
+
data.tar.gz: 98fde35548107107eb2910ee03f8e16d2acc7595
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7648d4f1d248c51d15ba7b52ae37a31461e1c585373dcc385eda13af2be81085ae927ba0ddcb492b74f43a3f33dbfc47e61d140303f6a8e758a9eefc7be85f8e
|
7
|
+
data.tar.gz: 17ef05fe5365c234728b806cb0be90fca26fddb26201f4accca483d00abe3999cf52f2835e04185ecf2b72d9371ffc2a0b9de4c7cbb2726900b81d89d471849b
|
@@ -82,12 +82,31 @@ module Hiptest
|
|
82
82
|
end.compact.join("\n")
|
83
83
|
end
|
84
84
|
|
85
|
+
# kept for backward compatibility of customized templates
|
85
86
|
def hh_remove_quotes (context, s, block)
|
87
|
+
hh_remove_double_quotes(context, s, block)
|
88
|
+
end
|
89
|
+
|
90
|
+
def hh_remove_double_quotes (context, s, block)
|
86
91
|
s ? s.gsub('"', '') : ""
|
87
92
|
end
|
88
93
|
|
94
|
+
def hh_remove_single_quotes (context, s, block)
|
95
|
+
s ? s.gsub('\'', '') : ""
|
96
|
+
end
|
97
|
+
|
98
|
+
# kept for backward compatibility of customized templates
|
89
99
|
def hh_escape_quotes (context, s, block)
|
90
|
-
|
100
|
+
hh_escape_double_quotes(context, s, block)
|
101
|
+
end
|
102
|
+
|
103
|
+
def hh_escape_double_quotes (context, s, block)
|
104
|
+
s ? s.gsub('"', '\\"') : ""
|
105
|
+
end
|
106
|
+
|
107
|
+
def hh_escape_single_quotes (context, s, block)
|
108
|
+
# weird \\\\, see http://stackoverflow.com/questions/7074337/why-does-stringgsub-double-content
|
109
|
+
s ? s.gsub('\'', "\\\\'") : ""
|
91
110
|
end
|
92
111
|
|
93
112
|
def hh_comment (context, commenter, block)
|
@@ -1 +1 @@
|
|
1
|
-
{{#join treated_chunks ' + '}}{{#if this.is_variable?}}{{{this.raw.children.name}}}{{else}}"{{{
|
1
|
+
{{#join treated_chunks ' + '}}{{#if this.is_variable?}}{{{this.raw.children.name}}}{{else}}"{{{ escape_double_quotes this.raw.children.value }}}"{{/if}}{{/join}}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
{{#if rendered_children.gherkin_annotation }}@Given("{{{
|
1
|
+
{{#if rendered_children.gherkin_annotation }}@Given("{{{escape_double_quotes rendered_children.gherkin_pattern }}}")
|
2
2
|
public void {{{camelize_lower rendered_children.name}}}({{{ join rendered_children.parameters ', '}}}) {{#curly}}{{#indent}}
|
3
3
|
{{{ context.call_prefix }}}.{{{camelize_lower rendered_children.name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', '}}{{{camelize_lower this}}}{{/join}}{{/if}});
|
4
4
|
{{/indent}}
|
@@ -1 +1 @@
|
|
1
|
-
{{{
|
1
|
+
{{{ remove_double_quotes rendered_children.value }}}
|
@@ -1 +1 @@
|
|
1
|
-
"{{#each treated_chunks}}{{#if this.is_variable?}}#{{#curly}}{{{this.raw.children.name}}}{{/curly}}{{else}}{{{
|
1
|
+
"{{#each treated_chunks}}{{#if this.is_variable?}}#{{#curly}}{{{this.raw.children.name}}}{{/curly}}{{else}}{{{ escape_double_quotes this.raw.children.value }}}{{/if}}{{/each}}"
|
@@ -1 +1 @@
|
|
1
|
-
{{#if variable_names}}String.format({{/if}}"{{#each treated_chunks}}{{#if this.is_variable?}}%s{{else}}{{{
|
1
|
+
{{#if variable_names}}String.format({{/if}}"{{#each treated_chunks}}{{#if this.is_variable?}}%s{{else}}{{{ escape_double_quotes this.raw.children.value }}}{{/if}}{{/each}}"{{#if variable_names}}, {{{join variable_names ', '}}}){{/if}}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
{{#if has_datasets?}}{{> item_as_function}}
|
2
|
-
{{{ rendered_children.datatable }}}{{else}}test('{{{
|
2
|
+
{{{ rendered_children.datatable }}}{{else}}test('{{{ remove_double_quotes rendered_children.name }}}{{#if rendered_children.uid}} (uid:{{{rendered_children.uid}}}){{/if}}', function () {{#curly}}
|
3
3
|
{{> body}}
|
4
4
|
{{/curly}});{{/if}}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
test('{{scenario_name}}: {{{
|
1
|
+
test('{{escape_single_quotes scenario_name}}: {{{escape_single_quotes rendered_children.name}}}{{#if rendered_children.uid}} (uid:{{{rendered_children.uid}}}){{/if}}', function () {{#curly}}
|
2
2
|
{{{ camelize_lower scenario_name }}}.apply(this, [{{{ join rendered_children.arguments ', ' }}}]);
|
3
3
|
{{/curly}});
|
@@ -1,8 +1,8 @@
|
|
1
|
-
{{#if has_datasets?}}describe('{{
|
1
|
+
{{#if has_datasets?}}describe('{{escape_single_quotes rendered_children.name}}', function () {{#curly}}{{#indent}}
|
2
2
|
{{> item_as_function}}
|
3
3
|
{{{ rendered_children.datatable }}}
|
4
4
|
{{/indent}}
|
5
5
|
{{/curly}});
|
6
|
-
{{else}}it('{{{
|
6
|
+
{{else}}it('{{{ escape_single_quotes rendered_children.name }}}{{#if rendered_children.uid}} (uid:{{{rendered_children.uid}}}){{/if}}', function () {{#curly}}
|
7
7
|
{{> body}}
|
8
8
|
{{/curly}});{{/if}}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
it('{{{
|
1
|
+
it('{{{escape_single_quotes rendered_children.name}}}{{#if rendered_children.uid}} (uid:{{{rendered_children.uid}}}){{/if}}', function () {{#curly}}
|
2
2
|
{{{ camelize_lower scenario_name }}}.apply(this, [{{{ join rendered_children.arguments ', ' }}}]);
|
3
3
|
{{/curly}});
|
@@ -1 +1 @@
|
|
1
|
-
{{#join treated_chunks ' + '}}{{#if this.is_variable?}}String({{{this.raw.children.name}}}){{else}}"{{{
|
1
|
+
{{#join treated_chunks ' + '}}{{#if this.is_variable?}}String({{{this.raw.children.name}}}){{else}}"{{{ escape_double_quotes this.raw.children.value }}}"{{/if}}{{/join}}
|
@@ -1 +1 @@
|
|
1
|
-
"{{#each treated_chunks}}{{#if this.is_variable?}}{{#curly}}${{{camelize_lower this.raw.children.name}}}{{/curly}}{{else}}{{{
|
1
|
+
"{{#each treated_chunks}}{{#if this.is_variable?}}{{#curly}}${{{camelize_lower this.raw.children.name}}}{{/curly}}{{else}}{{{ escape_double_quotes this.raw.children.value }}}{{/if}}{{/each}}"
|
@@ -1 +1 @@
|
|
1
|
-
"{{#each treated_chunks}}{{#if this.is_variable?}}%s{{else}}{{{
|
1
|
+
"{{#each treated_chunks}}{{#if this.is_variable?}}%s{{else}}{{{ escape_double_quotes this.raw.children.value }}}{{/if}}{{/each}}"{{#if variable_names}} % ({{{ join variable_names ', '}}}){{/if}}
|
@@ -1 +1 @@
|
|
1
|
-
{{#each treated_chunks}}{{#if this.is_variable?}}${{#curly}}{{{this.raw.children.name}}}{{/curly}}{{else}}{{{
|
1
|
+
{{#each treated_chunks}}{{#if this.is_variable?}}${{#curly}}{{{this.raw.children.name}}}{{/curly}}{{else}}{{{ escape_double_quotes this.raw.children.value }}}{{/if}}{{/each}}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
{{#if has_datasets?}}context "{{{
|
1
|
+
{{#if has_datasets?}}context "{{{ remove_double_quotes rendered_children.name }}}" do{{#indent}}
|
2
2
|
{{> item_as_def}}
|
3
|
-
{{{ rendered_children.datatable }}}{{/indent}}{{else}}it "{{{
|
3
|
+
{{{ rendered_children.datatable }}}{{/indent}}{{else}}it "{{{ remove_double_quotes rendered_children.name }}}{{#if rendered_children.uid}} (uid:{{{rendered_children.uid}}}){{/if}}" do
|
4
4
|
{{> body}}{{/if}}
|
5
5
|
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
it "{{{
|
1
|
+
it "{{{escape_double_quotes rendered_children.name}}}{{#if rendered_children.uid}} (uid:{{{rendered_children.uid}}}){{/if}}" do
|
2
2
|
{{{ underscore scenario_name }}}({{{ join rendered_children.arguments ', ' }}})
|
3
3
|
end
|
@@ -1 +1 @@
|
|
1
|
-
"{{#each treated_chunks}}{{#if this.is_variable?}}#{{#curly}}{{{this.raw.children.name}}}{{/curly}}{{else}}{{{
|
1
|
+
"{{#each treated_chunks}}{{#if this.is_variable?}}#{{#curly}}{{{this.raw.children.name}}}{{/curly}}{{else}}{{{ escape_double_quotes this.raw.children.value }}}{{/if}}{{/each}}"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
[Given("{{{
|
1
|
+
[Given("{{{escape_double_quotes rendered_children.gherkin_pattern }}}"), When("{{{escape_double_quotes rendered_children.gherkin_pattern }}}"), Then("{{{escape_double_quotes rendered_children.gherkin_pattern }}}")]
|
2
2
|
public void {{{ camelize_upper rendered_children.name }}}({{#if has_parameters?}}{{{join rendered_children.parameters ', '}}}{{/if}}) {{#curly}}{{#indent}}
|
3
3
|
{{{ context.call_prefix }}}.{{ camelize_upper rendered_children.name }}({{#if has_parameters?}}{{#join raw_parameter_names ', '}}{{{camelize_lower this}}}{{/join}}{{/if}});
|
4
4
|
{{/indent}}
|
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: 0.8.
|
4
|
+
version: 0.8.2
|
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: 2015-12-
|
11
|
+
date: 2015-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -566,7 +566,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
566
566
|
version: '0'
|
567
567
|
requirements: []
|
568
568
|
rubyforge_project:
|
569
|
-
rubygems_version: 2.4.
|
569
|
+
rubygems_version: 2.4.5
|
570
570
|
signing_key:
|
571
571
|
specification_version: 4
|
572
572
|
summary: Export your tests from Hiptest into executable tests.
|