macros4cuke 0.3.39 → 0.3.40
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 +8 -8
- data/.rubocop.yml +5 -2
- data/.simplecov +2 -0
- data/CHANGELOG.md +5 -0
- data/Rakefile +2 -0
- data/features/step_definitions/demo_steps.rb +1 -1
- data/features/step_definitions/use_macro_steps.rb +1 -1
- data/features/support/env.rb +1 -1
- data/features/support/macro_support.rb +1 -1
- data/lib/macro_steps.rb +1 -1
- data/lib/macros4cuke.rb +1 -1
- data/lib/macros4cuke/constants.rb +2 -2
- data/lib/macros4cuke/exceptions.rb +1 -1
- data/lib/macros4cuke/macro-collection.rb +3 -3
- data/lib/macros4cuke/macro-step-support.rb +1 -1
- data/lib/macros4cuke/macro-step.rb +2 -2
- data/lib/macros4cuke/templating/engine.rb +6 -6
- data/spec/macros4cuke/macro-collection_spec.rb +1 -1
- data/spec/macros4cuke/macro-step-support_spec.rb +1 -1
- data/spec/macros4cuke/macro-step_spec.rb +1 -1
- data/spec/macros4cuke/templating/engine_spec.rb +2 -2
- data/spec/macros4cuke/templating/placeholder_spec.rb +1 -1
- data/spec/macros4cuke/templating/section_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2M3NWUxZWQxMWEzNmY5ZmJhNTg5YmU4NmZlOGU5NWE2Y2NhMmJlMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Zjc3ODczYzZmZDc5ZjZmYmU3OTVkZTAxN2QxNDNlZmVlMmQxMzZkMQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTQ0YWUwNGIwYzI3OGMxNmU1NTIyNTU3MDIwZWQxOTBkMTAwYTFhNjM4NzFk
|
10
|
+
YmJlNjJlYTE4NGM2OGViYTk3NGYzZWY5MmVmNzE2ZjhiNGZkZGRmYzNmYzRm
|
11
|
+
Y2RiMTUyOTdkYzdjNTdiOWIwYmRlNGQxODc3YmY3MmRkYTY4MzA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGYxMzg1NzM5MzNhYmIwNzcwYmQwNDhmNWYyZWMyNGRhOWNmZjcwNjUzMDYz
|
14
|
+
NWFiYTAwN2MxODUyMzkzMGJkNThmMTU2OWVlNjQ4MmZhNzExMzk3OTg3ZTE4
|
15
|
+
OGExODgwMjgzN2YwYjJiY2UxMjJkNzYyODgzNzhmY2JmNjk1MDA=
|
data/.rubocop.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
AllCops:
|
2
2
|
Excludes:
|
3
|
-
- examples/**
|
4
|
-
- spec/**
|
3
|
+
- '*/examples/**'
|
4
|
+
- '*/spec/**'
|
5
5
|
|
6
6
|
|
7
7
|
AccessControl:
|
@@ -29,6 +29,9 @@ Encoding:
|
|
29
29
|
# Avoid methods longer than 30 lines of code
|
30
30
|
MethodLength:
|
31
31
|
Max: 30
|
32
|
+
|
33
|
+
RedundantReturn:
|
34
|
+
Enabled: false
|
32
35
|
|
33
36
|
SpaceInsideBrackets:
|
34
37
|
Enabled: false
|
data/.simplecov
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
### 0.3.40 / 2013-07-24
|
2
|
+
* [CHANGE] File `.rubocop.yml`: Updated the Excludes rule
|
3
|
+
* [CHANGE] All .rb files: Added an newline at the end of each source file (to please Rubocop).
|
4
|
+
|
5
|
+
|
1
6
|
### 0.3.39 / 2013-07-24
|
2
7
|
* [CHANGE] File `demo06.feature`: Expanded the comments on the conditional section
|
3
8
|
* [CHANGE] File `README.md`: Small editorial changes in the 'A quick section' example.
|
data/Rakefile
CHANGED
@@ -38,10 +38,12 @@ RSpec::Core::RakeTask.new do |spec|
|
|
38
38
|
spec.pattern = 'spec/**/*_spec.rb'
|
39
39
|
end
|
40
40
|
|
41
|
+
|
41
42
|
# Combine RSpec and Cucumber tests
|
42
43
|
desc 'Run tests, with RSpec and Cucumber'
|
43
44
|
task :test => [:spec, :cucumber]
|
44
45
|
|
46
|
+
|
45
47
|
# Default rake task
|
46
48
|
task :default => :test
|
47
49
|
|
data/features/support/env.rb
CHANGED
data/lib/macro_steps.rb
CHANGED
data/lib/macros4cuke.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
module Macros4Cuke # Module used as a namespace
|
5
5
|
# The version number of the gem.
|
6
|
-
Version = '0.3.
|
6
|
+
Version = '0.3.40'
|
7
7
|
|
8
8
|
# Brief description of the gem.
|
9
9
|
Description = 'Macro-steps for Cucumber'
|
@@ -23,4 +23,4 @@ module Macros4Cuke # Module used as a namespace
|
|
23
23
|
end
|
24
24
|
end # module
|
25
25
|
|
26
|
-
# End of file
|
26
|
+
# End of file
|
@@ -47,8 +47,8 @@ public
|
|
47
47
|
# Multiple rows with same argument name are acceptable.
|
48
48
|
# @return [String]
|
49
49
|
def render_steps(aPhrase, rawData = nil)
|
50
|
-
|
51
|
-
macro = find_macro(aPhrase,
|
50
|
+
use_table = ! rawData.nil?
|
51
|
+
macro = find_macro(aPhrase, use_table)
|
52
52
|
raise UnknownMacroError.new(aPhrase) if macro.nil?
|
53
53
|
|
54
54
|
# Render the steps
|
@@ -83,4 +83,4 @@ end # class
|
|
83
83
|
end # module
|
84
84
|
|
85
85
|
|
86
|
-
# End of file
|
86
|
+
# End of file
|
@@ -145,7 +145,7 @@ private
|
|
145
145
|
(a_key, value) = validate_row(a_row, macro_parameters)
|
146
146
|
if macro_parameters.include? a_key
|
147
147
|
if macro_parameters[a_key].kind_of?(Array)
|
148
|
-
|
148
|
+
macro_parameters[a_key] << value
|
149
149
|
else
|
150
150
|
macro_parameters[a_key] = [macro_parameters[a_key], value]
|
151
151
|
end
|
@@ -250,4 +250,4 @@ end # class
|
|
250
250
|
|
251
251
|
end # module
|
252
252
|
|
253
|
-
# End of file
|
253
|
+
# End of file
|
@@ -27,7 +27,7 @@ class StaticText
|
|
27
27
|
@source = aSourceText
|
28
28
|
end
|
29
29
|
|
30
|
-
public
|
30
|
+
public
|
31
31
|
|
32
32
|
# Render the static text.
|
33
33
|
# This method has the same signature as the {Engine#render} method.
|
@@ -41,7 +41,7 @@ end # class
|
|
41
41
|
# Class used internally by the template engine.
|
42
42
|
# Represents an end of line that must be rendered as such.
|
43
43
|
class EOLine
|
44
|
-
public
|
44
|
+
public
|
45
45
|
# Render an end of line.
|
46
46
|
# This method has the same signature as the {Engine#render} method.
|
47
47
|
# @return [String] An end of line marker. Its exact value is OS-dependent.
|
@@ -63,7 +63,7 @@ class UnaryElement
|
|
63
63
|
@name = aVarName
|
64
64
|
end
|
65
65
|
|
66
|
-
protected
|
66
|
+
protected
|
67
67
|
|
68
68
|
# This method has the same signature as the {Engine#render} method.
|
69
69
|
# @return [Object] The actual value from the locals or context
|
@@ -88,7 +88,7 @@ end # class
|
|
88
88
|
# that is associated with it.
|
89
89
|
class Placeholder < UnaryElement
|
90
90
|
|
91
|
-
public
|
91
|
+
public
|
92
92
|
# Render the placeholder given the passed arguments.
|
93
93
|
# This method has the same signature as the {Engine#render} method.
|
94
94
|
# @return [String] The text value assigned to the placeholder.
|
@@ -130,7 +130,7 @@ class Section < UnaryElement
|
|
130
130
|
@children = []
|
131
131
|
end
|
132
132
|
|
133
|
-
public
|
133
|
+
public
|
134
134
|
# Add a child element as member of the section
|
135
135
|
def add_child(aChild)
|
136
136
|
children << aChild
|
@@ -504,4 +504,4 @@ end # module
|
|
504
504
|
|
505
505
|
end # module
|
506
506
|
|
507
|
-
# End of file
|
507
|
+
# End of file
|
@@ -250,7 +250,7 @@ SNIPPET
|
|
250
250
|
|
251
251
|
it 'should know the variable(s) it contains' do
|
252
252
|
# Case using the sample template
|
253
|
-
expect(subject.variables).to be == [
|
253
|
+
expect(subject.variables).to be == %w[userid password]
|
254
254
|
|
255
255
|
# Case of an empty source template text
|
256
256
|
instance = Engine.new ''
|
@@ -355,4 +355,4 @@ end # module
|
|
355
355
|
|
356
356
|
end # module
|
357
357
|
|
358
|
-
# End of file
|
358
|
+
# End of file
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: macros4cuke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.40
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitri Geshef
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|