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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- M2M1ZDM1NzZiMWZiZDY2ODVjNjhmOGNjMWM1ZmM1ODg4OTU4ZjFhYw==
4
+ N2M3NWUxZWQxMWEzNmY5ZmJhNTg5YmU4NmZlOGU5NWE2Y2NhMmJlMQ==
5
5
  data.tar.gz: !binary |-
6
- NmRmMGE2MzM4OGZiMjliOGRlNDA2ZWUxNTBiZDAzMTg0ZTdhMjU2NQ==
6
+ Zjc3ODczYzZmZDc5ZjZmYmU3OTVkZTAxN2QxNDNlZmVlMmQxMzZkMQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- N2I3ZDlmNzVjYjhlN2U1YjdkODc1YmYzMTI3NmI3NTQ2YTkzYmM1NzU5Njdj
10
- MDNkZTM0YWFmODc2ZTJlMmY4MjJlYjA3NjZlYzFiZjZkMmE0ZTZjZTk5NzA2
11
- MjFlNWVkNGU0MTIzNWM0MjRiN2Q5NjVlZDYzZjU1ZmZmNTZlNjg=
9
+ ZTQ0YWUwNGIwYzI3OGMxNmU1NTIyNTU3MDIwZWQxOTBkMTAwYTFhNjM4NzFk
10
+ YmJlNjJlYTE4NGM2OGViYTk3NGYzZWY5MmVmNzE2ZjhiNGZkZGRmYzNmYzRm
11
+ Y2RiMTUyOTdkYzdjNTdiOWIwYmRlNGQxODc3YmY3MmRkYTY4MzA=
12
12
  data.tar.gz: !binary |-
13
- NjQwNmJhZjI2NmMxYjI3YTY5NDBjM2JhOGM3NWMwOTU5ZGFlNGZiYTVlZGFh
14
- NGM4MWI5MGE0OGZhYzA3MWI1ZmE3Y2FmZmI3OTI1YWViM2Q1YWFlMjNhZDc5
15
- NTg4MmViMTcwMzRlZmFkYmNlMzNjMGY0MTNiZWY3MzE5YzI5NTQ=
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
@@ -1,4 +1,6 @@
1
1
  # .simplecov
2
+ require 'coveralls'
3
+
2
4
  SimpleCov.start do
3
5
  # Remove all files that match /spec/ in their path
4
6
  add_filter "/spec/"
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
 
@@ -38,4 +38,4 @@ SNIPPET
38
38
  end
39
39
 
40
40
 
41
- # End of file
41
+ # End of file
@@ -7,4 +7,4 @@
7
7
  # in their Cucumber scenarios.
8
8
  require 'macros4cuke/../macro_steps'
9
9
 
10
- # End of file
10
+ # End of file
@@ -42,4 +42,4 @@ end # module
42
42
  # making our world object an instance of the TracingWorld class
43
43
  World { DemoMacros4Cuke::TracingWorld.new }
44
44
 
45
- # End of file
45
+ # End of file
@@ -13,4 +13,4 @@ require 'macros4cuke'
13
13
  World(Macros4Cuke::MacroStepSupport)
14
14
 
15
15
 
16
- # End of file
16
+ # End of file
data/lib/macro_steps.rb CHANGED
@@ -50,4 +50,4 @@ When(/^I \[([^\]]+)\]:$/) do |macro_phrase, table_argument|
50
50
  end
51
51
 
52
52
 
53
- # End of file
53
+ # End of file
data/lib/macros4cuke.rb CHANGED
@@ -5,4 +5,4 @@
5
5
  require_relative './macros4cuke/constants'
6
6
  require_relative './macros4cuke/macro-step-support'
7
7
 
8
- # End of file
8
+ # End of file
@@ -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.39'
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
@@ -101,4 +101,4 @@ end # class
101
101
 
102
102
  end # module
103
103
 
104
- # End of file
104
+ # 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
- useTable = ! rawData.nil?
51
- macro = find_macro(aPhrase, useTable)
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
@@ -57,4 +57,4 @@ end # module
57
57
  end # module
58
58
 
59
59
 
60
- # End of file
60
+ # 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
- macro_parameters[a_key] << value
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
@@ -65,4 +65,4 @@ end # describe
65
65
  end # module
66
66
 
67
67
 
68
- # End of file
68
+ # End of file
@@ -90,4 +90,4 @@ end # describe
90
90
  end # module
91
91
 
92
92
 
93
- # End of file
93
+ # End of file
@@ -151,4 +151,4 @@ end # describe
151
151
 
152
152
  end # module
153
153
 
154
- # End of file
154
+ # 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 == ['userid', 'password']
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
@@ -67,4 +67,4 @@ end # module
67
67
 
68
68
  end # module
69
69
 
70
- # End of file
70
+ # End of file
@@ -161,4 +161,4 @@ end # module
161
161
 
162
162
  end # module
163
163
 
164
- # End of file
164
+ # End of file
data/spec/spec_helper.rb CHANGED
@@ -15,4 +15,4 @@ RSpec.configure do |config|
15
15
  end
16
16
 
17
17
 
18
- # End of file
18
+ # End of file
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.39
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-07-24 00:00:00.000000000 Z
11
+ date: 2013-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber