guard-cucumber 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/guard/cucumber.rb +3 -3
- data/lib/guard/cucumber/focuser.rb +5 -5
- data/lib/guard/cucumber/version.rb +1 -1
- metadata +2 -2
data/lib/guard/cucumber.rb
CHANGED
@@ -130,13 +130,13 @@ module Guard
|
|
130
130
|
# @return [Hash] the new options
|
131
131
|
#
|
132
132
|
def change_format(format)
|
133
|
-
cli_parts = @options[:cli].split(
|
133
|
+
cli_parts = @options[:cli].split(' ')
|
134
134
|
cli_parts.each_with_index do |part, index|
|
135
|
-
if part ==
|
135
|
+
if part == '--format' && cli_parts[index + 2] != '--out'
|
136
136
|
cli_parts[index + 1] = format
|
137
137
|
end
|
138
138
|
end
|
139
|
-
@options.merge(:cli => cli_parts.join(
|
139
|
+
@options.merge(:cli => cli_parts.join(' '))
|
140
140
|
end
|
141
141
|
|
142
142
|
end
|
@@ -51,14 +51,14 @@ module Guard
|
|
51
51
|
# @return [Array<Integer>] the line numbers that include the focus tag in path
|
52
52
|
#
|
53
53
|
def scan_path_for_focus_tag(path, focus_tag)
|
54
|
-
|
54
|
+
return [] if File.directory?(path) || path.include?(':')
|
55
55
|
|
56
|
-
|
56
|
+
line_numbers = []
|
57
57
|
|
58
|
-
File.open(path, 'r') do |
|
59
|
-
while (line =
|
58
|
+
File.open(path, 'r') do |file|
|
59
|
+
while (line = file.gets)
|
60
60
|
if line.include?(focus_tag)
|
61
|
-
line_numbers <<
|
61
|
+
line_numbers << file.lineno
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|