cuporter 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -3
- data/lib/cuporter/cli/options.rb +2 -3
- data/lib/cuporter/document.rb +1 -1
- data/lib/cuporter/extensions/nokogiri.rb +28 -1
- data/lib/cuporter/node/node_base.rb +2 -2
- data/lib/cuporter/tag_nodes_parser.rb +2 -2
- metadata +10 -10
data/Rakefile
CHANGED
@@ -65,7 +65,7 @@ namespace :cuporter do
|
|
65
65
|
|
66
66
|
spec = Gem::Specification.new do |s|
|
67
67
|
s.name = 'cuporter'
|
68
|
-
s.version = '0.3.
|
68
|
+
s.version = '0.3.7'
|
69
69
|
s.rubyforge_project = s.name
|
70
70
|
|
71
71
|
s.platform = Gem::Platform::RUBY
|
@@ -77,8 +77,8 @@ namespace :cuporter do
|
|
77
77
|
s.author = "Tim Camper"
|
78
78
|
s.email = 'twcamper@thoughtworks.com'
|
79
79
|
s.homepage = 'http://github.com/twcamper/cuporter'
|
80
|
-
s.required_ruby_version = '>= 1.8.
|
81
|
-
s.add_dependency('nokogiri', '>= 1.4.
|
80
|
+
s.required_ruby_version = '>= 1.8.6'
|
81
|
+
s.add_dependency('nokogiri', '>= 1.4.1')
|
82
82
|
s.default_executable = "cuporter"
|
83
83
|
s.executables = [s.default_executable]
|
84
84
|
|
data/lib/cuporter/cli/options.rb
CHANGED
@@ -99,11 +99,10 @@ module Cuporter
|
|
99
99
|
otherwise, the html will link to the files under 'cuporter/public' in
|
100
100
|
your gempath.
|
101
101
|
}) do |a|
|
102
|
-
@options[:assets_dir] =
|
102
|
+
@options[:assets_dir] = a
|
103
103
|
end
|
104
104
|
|
105
|
-
opts.on("-l", "--link-assets", %Q{Do not inline CSS and js in <style/> and <script/> tags, but link to
|
106
|
-
external files instead.
|
105
|
+
opts.on("-l", "--link-assets", %Q{Do not inline CSS and js in <style/> and <script/> tags, but link to external files instead.
|
107
106
|
Default: 'false' for the tag and feature views, not optional for the
|
108
107
|
tree view, which requires external gifs.
|
109
108
|
}) do |l|
|
data/lib/cuporter/document.rb
CHANGED
@@ -18,7 +18,7 @@ module Cuporter
|
|
18
18
|
project_assets = File.expand_path( "public", File.dirname(__FILE__) + "../../../")
|
19
19
|
|
20
20
|
# we count on the dirs being created by the option parser
|
21
|
-
if
|
21
|
+
if link_assets
|
22
22
|
FileUtils.cp_r("#{project_assets}/.", assets_dir)
|
23
23
|
doc.assets_dir = assets_dir
|
24
24
|
else
|
@@ -4,6 +4,22 @@ Nokogiri::XML::Node.class_eval do
|
|
4
4
|
# so our mixed-in versions get used.
|
5
5
|
remove_method :<=>
|
6
6
|
include(Cuporter::Node::BaseMethods)
|
7
|
+
|
8
|
+
# Nokogiri 1.4.1 backwards compatability
|
9
|
+
unless instance_methods.include?("children=")
|
10
|
+
|
11
|
+
# defined in 1.4.4
|
12
|
+
def children=(node_or_tags)
|
13
|
+
children.unlink
|
14
|
+
if node_or_tags.is_a?(Nokogiri::XML::NodeSet)
|
15
|
+
node_or_tags.each { |n| add_child_node n }
|
16
|
+
else
|
17
|
+
add_child_node node_or_tags
|
18
|
+
end
|
19
|
+
node_or_tags
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
7
23
|
end
|
8
24
|
|
9
25
|
module NodeSetExtensions
|
@@ -38,4 +54,15 @@ module DocumentExtensions
|
|
38
54
|
root.at(:body) << s
|
39
55
|
end
|
40
56
|
end
|
41
|
-
Nokogiri::XML::Document.
|
57
|
+
Nokogiri::XML::Document.class_eval do
|
58
|
+
|
59
|
+
# Nokogiri 1.4.1 backwards compatability
|
60
|
+
unless instance_methods.include?("create_cdata")
|
61
|
+
# defined in 1.4.4
|
62
|
+
def create_cdata(text)
|
63
|
+
Nokogiri::XML::CDATA.new(self, text.to_s)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
include(DocumentExtensions)
|
68
|
+
end
|
@@ -67,14 +67,14 @@ module Cuporter
|
|
67
67
|
|
68
68
|
def to_text
|
69
69
|
s = Cuporter::Formatters::Text.build_line(self)
|
70
|
-
s += children.map {|n| n.to_text}.
|
70
|
+
s += children.map {|n| n.to_text}.join
|
71
71
|
s
|
72
72
|
end
|
73
73
|
alias :to_pretty :to_text
|
74
74
|
|
75
75
|
def to_csv
|
76
76
|
s = Cuporter::Formatters::Csv.build_line(self)
|
77
|
-
s += children.map {|n| n.to_csv}.
|
77
|
+
s += children.map {|n| n.to_csv}.join
|
78
78
|
s
|
79
79
|
end
|
80
80
|
|
@@ -13,7 +13,7 @@ module Cuporter
|
|
13
13
|
s = {:cuke_name => sub_expression, :tags => @current_tags}
|
14
14
|
|
15
15
|
(@feature[:tags] | s[:tags]).each do |tag|
|
16
|
-
next unless @filter.pass?
|
16
|
+
next unless @filter.pass?([tag])
|
17
17
|
add_scenario(tag, @feature, s)
|
18
18
|
end
|
19
19
|
end
|
@@ -36,7 +36,7 @@ module Cuporter
|
|
36
36
|
e = {:cuke_name => sub_expression}
|
37
37
|
|
38
38
|
context_tags.each do |tag|
|
39
|
-
next unless @filter.pass?
|
39
|
+
next unless @filter.pass?([tag])
|
40
40
|
add_example(tag, @feature, @scenario_outline, @example_set, e)
|
41
41
|
end
|
42
42
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 7
|
10
|
+
version: 0.3.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tim Camper
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-05-
|
18
|
+
date: 2011-05-31 00:00:00 -04:00
|
19
19
|
default_executable: cuporter
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -26,12 +26,12 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 5
|
30
30
|
segments:
|
31
31
|
- 1
|
32
32
|
- 4
|
33
|
-
-
|
34
|
-
version: 1.4.
|
33
|
+
- 1
|
34
|
+
version: 1.4.1
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
37
|
description: Scrapes Cucumber *.feature files to build reports on tag usage and test inventory
|
@@ -119,12 +119,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
119
|
requirements:
|
120
120
|
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
hash:
|
122
|
+
hash: 59
|
123
123
|
segments:
|
124
124
|
- 1
|
125
125
|
- 8
|
126
|
-
-
|
127
|
-
version: 1.8.
|
126
|
+
- 6
|
127
|
+
version: 1.8.6
|
128
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|