cuketagger 1.3 → 1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,7 @@ module CukeTagger
18
18
  case arg
19
19
  when /^-v|--version$/
20
20
  puts CukeTagger::Version
21
- when /^(.+?\.feature)(:\d+)?$/
21
+ when /^(.+?\.feature)((:\d+)*)$/
22
22
  add_feature($1, $2.to_s)
23
23
  when /^(add|remove):(.+?)$/
24
24
  alterations << [$1.to_sym, $2]
@@ -91,9 +91,20 @@ module CukeTagger
91
91
  [feature.file, line]
92
92
  end
93
93
 
94
- def add_feature(path, line)
94
+ def add_feature(path, lines)
95
95
  ff = Cucumber::FeatureFile.new(path).parse({}, {})
96
- features_to_change << [path, line[1,line.length].to_i]
96
+
97
+ lines = lines.split(":")
98
+ lines.delete("")
99
+
100
+ if lines.empty?
101
+ features_to_change << [path, 0]
102
+ else
103
+ lines.each do |line|
104
+ features_to_change << [path, Integer(line)]
105
+ end
106
+ end
107
+
97
108
  features.add_feature ff
98
109
  end
99
110
 
@@ -1,3 +1,3 @@
1
1
  module CukeTagger
2
- Version = "1.3"
2
+ Version = "1.4"
3
3
  end
metadata CHANGED
@@ -1,11 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuketagger
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 3
8
- version: "1.3"
4
+ prerelease:
5
+ version: "1.4"
9
6
  platform: ruby
10
7
  authors:
11
8
  - Jari
@@ -14,7 +11,7 @@ autorequire:
14
11
  bindir: bin
15
12
  cert_chain: []
16
13
 
17
- date: 2011-01-08 00:00:00 +01:00
14
+ date: 2011-02-01 00:00:00 +01:00
18
15
  default_executable:
19
16
  dependencies:
20
17
  - !ruby/object:Gem::Dependency
@@ -25,10 +22,6 @@ dependencies:
25
22
  requirements:
26
23
  - - ">="
27
24
  - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 9
31
- - 2
32
25
  version: 0.9.2
33
26
  type: :runtime
34
27
  version_requirements: *id001
@@ -49,7 +42,7 @@ files:
49
42
  - lib/cuketagger/version.rb
50
43
  - lib/cuketagger.rb
51
44
  - bin/cuketagger
52
- has_rdoc: false
45
+ has_rdoc: true
53
46
  homepage: http://cukes.info
54
47
  licenses: []
55
48
 
@@ -63,21 +56,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
56
  requirements:
64
57
  - - ">="
65
58
  - !ruby/object:Gem::Version
66
- segments:
67
- - 0
68
59
  version: "0"
69
60
  required_rubygems_version: !ruby/object:Gem::Requirement
70
61
  none: false
71
62
  requirements:
72
63
  - - ">="
73
64
  - !ruby/object:Gem::Version
74
- segments:
75
- - 0
76
65
  version: "0"
77
66
  requirements: []
78
67
 
79
68
  rubyforge_project:
80
- rubygems_version: 1.3.7
69
+ rubygems_version: 1.5.0
81
70
  signing_key:
82
71
  specification_version: 3
83
72
  summary: batch tagging of cucumber features and scenarios