cuporter 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +5 -2
- data/Rakefile +10 -1
- data/lib/cuporter.rb +0 -1
- data/lib/cuporter/cli/options.rb +1 -1
- data/lib/cuporter/document.rb +1 -0
- data/lib/cuporter/extensions/nokogiri.rb +1 -6
- data/lib/cuporter/node.rb +3 -0
- data/lib/cuporter/node/node_base.rb +0 -3
- data/lib/cuporter/node/types.rb +1 -0
- metadata +4 -4
data/README.textile
CHANGED
@@ -31,8 +31,11 @@ See the help output below.
|
|
31
31
|
|
32
32
|
---------
|
33
33
|
|
34
|
-
h3. Example
|
34
|
+
h3. Example Report Output
|
35
35
|
|
36
|
+
h4. html samples
|
37
|
+
|
38
|
+
See "http://twcamper.github.com/cuporter/":http://twcamper.github.com/cuporter/
|
36
39
|
|
37
40
|
h4. xml of single test
|
38
41
|
|
@@ -122,7 +125,7 @@ h4. help
|
|
122
125
|
-i, --input-dir DIR Root directory of *.feature files.
|
123
126
|
Default: "features"
|
124
127
|
|
125
|
-
Used to build the glob pattern '[--
|
128
|
+
Used to build the glob pattern '[--input-dir]/**/*.feature', which is really most likely
|
126
129
|
"features/**/*.features" and finds all feature files anywhere under "features" or
|
127
130
|
your custom root supplied with this option.
|
128
131
|
Overridden by "--file-input'.
|
data/Rakefile
CHANGED
@@ -5,6 +5,7 @@ require 'rake/rdoctask'
|
|
5
5
|
require 'rake/gempackagetask'
|
6
6
|
|
7
7
|
task :default do
|
8
|
+
Rake::Task["cuporter:load_test:safe_nokogiri"].invoke # MUST RUN THIS FIRST
|
8
9
|
Rake.application.tasks_in_scope(["cuporter:test"]).each do |t|
|
9
10
|
t.invoke
|
10
11
|
end
|
@@ -23,6 +24,14 @@ namespace :cuporter do
|
|
23
24
|
puts RedCloth.new(File.read("README.textile")).to_html
|
24
25
|
end
|
25
26
|
|
27
|
+
namespace :load_test do
|
28
|
+
desc "RUN ME FIRST: I depend on cuporter NOT having run"
|
29
|
+
RSpec::Core::RakeTask.new(:safe_nokogiri) do |t|
|
30
|
+
t.pattern = "spec/cuporter/load_time/safe_nokogiri_spec.rb"
|
31
|
+
t.rspec_opts = ["--color" , "--format" , "doc" ]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
26
35
|
namespace :test do
|
27
36
|
desc "unit specs"
|
28
37
|
RSpec::Core::RakeTask.new(:unit) do |t|
|
@@ -56,7 +65,7 @@ namespace :cuporter do
|
|
56
65
|
|
57
66
|
spec = Gem::Specification.new do |s|
|
58
67
|
s.name = 'cuporter'
|
59
|
-
s.version = '0.3.
|
68
|
+
s.version = '0.3.5'
|
60
69
|
s.rubyforge_project = s.name
|
61
70
|
|
62
71
|
s.platform = Gem::Platform::RUBY
|
data/lib/cuporter.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# Copyright 2010 ThoughtWorks, Inc. Licensed under the MIT License
|
2
2
|
$LOAD_PATH.unshift( File.expand_path("#{File.dirname(__FILE__)}"))
|
3
3
|
$LOAD_PATH.unshift( File.expand_path("#{File.dirname(__FILE__)}/.."))
|
4
|
-
require 'cuporter/extensions/nokogiri'
|
5
4
|
require 'cuporter/extensions/string'
|
6
5
|
require 'cuporter/cli/options'
|
7
6
|
require 'cuporter/cli/filter_args_builder'
|
data/lib/cuporter/cli/options.rb
CHANGED
@@ -49,7 +49,7 @@ module Cuporter
|
|
49
49
|
opts.on("-i", "--input-dir DIR", %Q{Root directory of *.feature files.
|
50
50
|
Default: "features"
|
51
51
|
|
52
|
-
Used to build the glob pattern '[--
|
52
|
+
Used to build the glob pattern '[--input-dir]/**/*.feature', which is really most likely
|
53
53
|
"features/**/*.features" and finds all feature files anywhere under "features" or
|
54
54
|
your custom root supplied with this option.
|
55
55
|
Overridden by "--file-input'.
|
data/lib/cuporter/document.rb
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
# Copyright 2010 ThoughtWorks, Inc. Licensed under the MIT License
|
2
|
-
require 'rubygems'
|
3
|
-
require 'nokogiri'
|
4
2
|
Nokogiri::XML::Node.class_eval do
|
5
3
|
# undefine the spaceship (comparison operator used by sort)
|
6
4
|
# so our mixed-in versions get used.
|
7
5
|
remove_method :<=>
|
6
|
+
include(Cuporter::Node::BaseMethods)
|
8
7
|
end
|
9
8
|
|
10
9
|
module NodeSetExtensions
|
@@ -28,10 +27,6 @@ Nokogiri::XML::NodeSet.send(:include, NodeSetExtensions)
|
|
28
27
|
|
29
28
|
module DocumentExtensions
|
30
29
|
|
31
|
-
def to_html(options = {})
|
32
|
-
to_xml(options)
|
33
|
-
end
|
34
|
-
|
35
30
|
def add_report(report_node)
|
36
31
|
root.at(:body) << report_node
|
37
32
|
end
|
data/lib/cuporter/node.rb
CHANGED
@@ -79,8 +79,6 @@ module Cuporter
|
|
79
79
|
end
|
80
80
|
|
81
81
|
end
|
82
|
-
# this will vary when json comes
|
83
|
-
NodeBase = Nokogiri::XML::Node
|
84
82
|
|
85
83
|
# common methods for building either html or xml nodes
|
86
84
|
module InitializeNode
|
@@ -111,4 +109,3 @@ module Cuporter
|
|
111
109
|
end
|
112
110
|
|
113
111
|
Cuporter::Node.send(:extend, Cuporter::Node::InitializeNode)
|
114
|
-
Cuporter::Node::NodeBase.send(:include, Cuporter::Node::BaseMethods)
|
data/lib/cuporter/node/types.rb
CHANGED
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: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 5
|
10
|
+
version: 0.3.5
|
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-04-
|
18
|
+
date: 2011-04-29 00:00:00 -04:00
|
19
19
|
default_executable: cuporter
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|