stepdown 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -1
- data/.travis.yml +4 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/History.txt +5 -0
- data/lib/stepdown/html_reporter.rb +9 -17
- data/lib/stepdown/statistics.rb +4 -4
- data/lib/stepdown/step_collection.rb +3 -1
- data/lib/stepdown/version.rb +1 -1
- data/public/stepdown.css +24 -0
- data/spec/lib/stepdown/statistics_spec.rb +9 -2
- data/spec/lib/stepdown/step_collection_spec.rb +15 -0
- data/stepdown.gemspec +1 -1
- data/templates/_empty.html.erb +5 -0
- data/templates/_grouping.html.erb +31 -0
- data/templates/_unused.html.erb +5 -0
- data/templates/_usages.html.erb +8 -0
- data/templates/index.html.erb +218 -0
- metadata +69 -110
- data/templates/_empty.html.haml +0 -3
- data/templates/_grouping.html.haml +0 -19
- data/templates/_unused.html.haml +0 -3
- data/templates/_usages.html.haml +0 -6
- data/templates/index.html.haml +0 -155
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -4,7 +4,6 @@ GEM
|
|
4
4
|
diff-lcs (1.1.2)
|
5
5
|
gherkin (2.4.6)
|
6
6
|
json (>= 1.4.6)
|
7
|
-
haml (3.1.2)
|
8
7
|
json (1.5.3)
|
9
8
|
rake (0.9.2)
|
10
9
|
rcov (0.9.10)
|
@@ -16,6 +15,7 @@ GEM
|
|
16
15
|
rspec-expectations (2.5.0)
|
17
16
|
diff-lcs (~> 1.1.2)
|
18
17
|
rspec-mocks (2.5.0)
|
18
|
+
sass (3.1.7)
|
19
19
|
|
20
20
|
PLATFORMS
|
21
21
|
ruby
|
@@ -23,7 +23,7 @@ PLATFORMS
|
|
23
23
|
DEPENDENCIES
|
24
24
|
bundler (> 1.0)
|
25
25
|
gherkin (> 2.3)
|
26
|
-
haml (> 2.0.0)
|
27
26
|
rake
|
28
27
|
rcov (~> 0.9.9)
|
29
28
|
rspec (~> 2.5.0)
|
29
|
+
sass (~> 3.1.0)
|
data/History.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== 0.6.4 2011-10-06
|
2
|
+
* remove HAML, SASS requirement
|
3
|
+
* fix broken steps on 1.9.2
|
4
|
+
* fix errors with < 10 items for a statistic
|
5
|
+
|
1
6
|
== 0.6.3 2011-08-16
|
2
7
|
* update dependant gems, be less restrictive on versions
|
3
8
|
* adjust statistics interface to improve metric_fu integration
|
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
require 'stepdown/reporter'
|
3
|
-
require '
|
4
|
-
require 'sass'
|
3
|
+
require 'erb'
|
5
4
|
|
6
5
|
module Stepdown
|
7
6
|
class HTMLReporter < Reporter
|
@@ -9,34 +8,27 @@ module Stepdown
|
|
9
8
|
def output_overview()
|
10
9
|
puts "Generating report..." unless Stepdown.quiet
|
11
10
|
FileUtils.mkdir_p(Stepdown.output_directory)
|
12
|
-
copy_files
|
11
|
+
copy_files()
|
13
12
|
|
14
|
-
["index", "
|
15
|
-
|
16
|
-
template = File.open(File.expand_path(File.dirname(__FILE__)) + '/../../templates/style.sass').read
|
17
|
-
sass_engine = Sass::Engine.new(template)
|
18
|
-
|
19
|
-
out = File.new(Stepdown.output_directory + '/style.css', 'w+')
|
20
|
-
out.puts sass_engine.render
|
21
|
-
|
22
|
-
out.close
|
13
|
+
["index", "_empty", "_unused", "_grouping", "_usages"].each { |template| write_html_from_erb(template) }
|
23
14
|
|
24
15
|
puts "\nReport output to #{Stepdown.output_directory}/index.html" unless Stepdown.quiet
|
25
16
|
end
|
26
17
|
|
27
18
|
protected
|
28
19
|
|
29
|
-
def
|
30
|
-
file = File.open(File.expand_path(File.dirname(__FILE__)) + "/../../templates/#{template}.html.
|
31
|
-
|
20
|
+
def write_html_from_erb(template)
|
21
|
+
file = File.open(File.expand_path(File.dirname(__FILE__)) + "/../../templates/#{template}.html.erb")
|
22
|
+
erb = ERB.new(file.read())
|
32
23
|
|
24
|
+
file.close
|
33
25
|
out = File.new(Stepdown.output_directory + "/#{template}.html",'w+')
|
34
|
-
out.puts
|
26
|
+
out.puts erb.result(binding())
|
35
27
|
out.close
|
36
28
|
end
|
37
29
|
|
38
30
|
def copy_files
|
39
|
-
['step_down.js', 'jquery-1.6.1.min.js', 'bluff-min.js', 'excanvas.js', 'js-class.js'].each do |file|
|
31
|
+
['step_down.js', 'jquery-1.6.1.min.js', 'bluff-min.js', 'excanvas.js', 'js-class.js', 'stepdown.css'].each do |file|
|
40
32
|
src = File.expand_path("#{File.dirname(__FILE__)}/../../public/#{file}")
|
41
33
|
FileUtils.cp(src, File.join(Stepdown.output_directory, "#{file}"))
|
42
34
|
end
|
data/lib/stepdown/statistics.rb
CHANGED
@@ -27,7 +27,7 @@ module Stepdown
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def groupings_rest
|
30
|
-
groupings[10..groupings.length]
|
30
|
+
groupings[10..groupings.length] || []
|
31
31
|
end
|
32
32
|
|
33
33
|
def groupings_top(limit = 10)
|
@@ -98,7 +98,7 @@ module Stepdown
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def usages_rest
|
101
|
-
usages[10..usages.length]
|
101
|
+
usages[10..usages.length] || []
|
102
102
|
end
|
103
103
|
|
104
104
|
def step_usages
|
@@ -110,7 +110,7 @@ module Stepdown
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def unused_rest
|
113
|
-
unused[10..unused.length]
|
113
|
+
unused[10..unused.length] || []
|
114
114
|
end
|
115
115
|
|
116
116
|
def unused_top(limit = 10)
|
@@ -145,7 +145,7 @@ module Stepdown
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def empty_rest
|
148
|
-
empty[10..empty.length]
|
148
|
+
empty[10..empty.length] || []
|
149
149
|
end
|
150
150
|
|
151
151
|
def empty_top(limit = 10)
|
@@ -6,6 +6,7 @@ module Stepdown
|
|
6
6
|
|
7
7
|
def initialize
|
8
8
|
@steps = {}
|
9
|
+
@addition_order = []
|
9
10
|
end
|
10
11
|
|
11
12
|
def add_step(id, regex)
|
@@ -14,6 +15,7 @@ module Stepdown
|
|
14
15
|
else
|
15
16
|
@steps[id] = Stepdown::Step.new(id, regex)
|
16
17
|
@steps[id].count = 1
|
18
|
+
@addition_order << id
|
17
19
|
end
|
18
20
|
end
|
19
21
|
|
@@ -22,7 +24,7 @@ module Stepdown
|
|
22
24
|
end
|
23
25
|
|
24
26
|
def each
|
25
|
-
@
|
27
|
+
@addition_order.each{|id| yield @steps[id] }
|
26
28
|
end
|
27
29
|
|
28
30
|
def [](id)
|
data/lib/stepdown/version.rb
CHANGED
data/public/stepdown.css
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
body {
|
2
|
+
font-family: verdana, helvetica, arial;
|
3
|
+
font-size: 12px; }
|
4
|
+
|
5
|
+
#page_container {
|
6
|
+
width: 900px;
|
7
|
+
margin: auto; }
|
8
|
+
#page_container table {
|
9
|
+
border: 1px solid #cccccc;
|
10
|
+
border-spacing: 0; }
|
11
|
+
#page_container table th {
|
12
|
+
border: 1px solid #999999;
|
13
|
+
text-align: left;
|
14
|
+
padding: 3px;
|
15
|
+
background-color: #999999; }
|
16
|
+
#page_container table td {
|
17
|
+
padding: 3px;
|
18
|
+
border: 1px solid #cccccc;
|
19
|
+
vertical-align: top; }
|
20
|
+
|
21
|
+
#navigation ul {
|
22
|
+
padding: 0; }
|
23
|
+
#navigation li {
|
24
|
+
display: inline; }
|
@@ -76,9 +76,9 @@ describe Stepdown::Statistics do
|
|
76
76
|
|
77
77
|
reporter.groupings[0].step_collection.should =~ [@s1,@s2,@s3,@s4,@s5]
|
78
78
|
reporter.groupings[1].step_collection.should =~ [@s1,@s2,@s3,@s4,@s5]
|
79
|
-
reporter.groupings[2].step_collection.should =~ [@s1,@s2,@
|
79
|
+
reporter.groupings[2].step_collection.should =~ [@s1,@s2,@s3,@s4]
|
80
80
|
reporter.groupings[3].step_collection.should =~ [@s1,@s2,@s3,@s4]
|
81
|
-
reporter.groupings[4].step_collection.should =~ [@s1,@s2,@
|
81
|
+
reporter.groupings[4].step_collection.should =~ [@s1,@s2,@s5]
|
82
82
|
|
83
83
|
end
|
84
84
|
|
@@ -234,6 +234,13 @@ describe Stepdown::Statistics do
|
|
234
234
|
end
|
235
235
|
end
|
236
236
|
|
237
|
+
methods.each do |method|
|
238
|
+
it "should not break if there are not enough elements for a requested collection" do
|
239
|
+
@stats.stub!(method.to_sym).and_return([])
|
240
|
+
@stats.send("#{method}_rest".to_sym).should be_empty
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
237
244
|
end
|
238
245
|
|
239
246
|
end
|
@@ -75,4 +75,19 @@ describe Stepdown::StepCollection do
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
+
describe "returning steps" do
|
79
|
+
it "should return elements in the order that they are added" do
|
80
|
+
|
81
|
+
@collection = Stepdown::StepCollection.new
|
82
|
+
|
83
|
+
ids = [100, 42, 60]
|
84
|
+
@collection.add_step(100, /step 1/)
|
85
|
+
@collection.add_step(42, /step 2/)
|
86
|
+
@collection.add_step(60, /step 3/)
|
87
|
+
|
88
|
+
@collection.each_with_index{|step, i| step.id.should == ids[i] }
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
|
78
93
|
end
|
data/stepdown.gemspec
CHANGED
@@ -15,10 +15,10 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.required_rubygems_version = ">= 1.3.6"
|
16
16
|
s.rubyforge_project = "stepdown"
|
17
17
|
|
18
|
-
s.add_dependency('haml', '> 2.0')
|
19
18
|
s.add_dependency('gherkin', '> 2.3')
|
20
19
|
s.add_dependency('bundler', '> 1.0')
|
21
20
|
s.add_development_dependency('rspec', "~> 2.5.0")
|
21
|
+
s.add_development_dependency('sass', "~> 3.1.0")
|
22
22
|
s.add_development_dependency('rake')
|
23
23
|
|
24
24
|
s.files = `git ls-files`.split("\n")
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<% groupings_rest.each_with_index do |grouping, i|
|
2
|
+
next if grouping.use_count == 0 %>
|
3
|
+
<tr>
|
4
|
+
<td>
|
5
|
+
<%= grouping.regex.inspect %>
|
6
|
+
<br />
|
7
|
+
<a href='#' class='g<%= i %>'>Show associated steps</a>
|
8
|
+
</td>
|
9
|
+
<td>
|
10
|
+
<%= grouping.use_count %>
|
11
|
+
</td>
|
12
|
+
</tr>
|
13
|
+
<tr class='g<%= i %>' style='display: none;'>
|
14
|
+
<td colspan='2'>
|
15
|
+
<table>
|
16
|
+
<tr>
|
17
|
+
<th> Association count</th>
|
18
|
+
<th> Step</th>
|
19
|
+
</tr>
|
20
|
+
<tbody>
|
21
|
+
<% grouping.step_collection.each do |step| %>
|
22
|
+
<tr>
|
23
|
+
<td><%= step.count %></td>
|
24
|
+
<td><%= CGI.escapeHTML step.regex.inspect %></td>
|
25
|
+
</tr>
|
26
|
+
<% end %>
|
27
|
+
</tbody>
|
28
|
+
</table>
|
29
|
+
</td>
|
30
|
+
</tr>
|
31
|
+
<% end %>
|
@@ -0,0 +1,218 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<title> Stepdown - Cucumber feature analysis</title>
|
6
|
+
<link type='text/css' rel='stylesheet' href='stepdown.css'></link>
|
7
|
+
<script src='jquery-1.6.1.min.js'></script>
|
8
|
+
<script src='js-class.js'></script>
|
9
|
+
<script src='bluff-min.js'></script>
|
10
|
+
<script src='excanvas.js'></script>
|
11
|
+
<script src='step_down.js'></script>
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
<div id='page_container'>
|
15
|
+
<div id='header'>
|
16
|
+
<h1> Cucumber analysis</h1>
|
17
|
+
</div>
|
18
|
+
<div id='navigation'>
|
19
|
+
<ul>
|
20
|
+
<li>
|
21
|
+
<a href='#overview'> Overview</a>
|
22
|
+
</li>
|
23
|
+
<li>
|
24
|
+
<a href='#trend'> Trend</a>
|
25
|
+
</li>
|
26
|
+
<li>
|
27
|
+
<a href='#usage'> Step usage</a>
|
28
|
+
</li>
|
29
|
+
<li>
|
30
|
+
<a href='#unused'> Unused steps</a>
|
31
|
+
</li>
|
32
|
+
<li>
|
33
|
+
<a href='#empty'> Empty scenarios</a>
|
34
|
+
</li>
|
35
|
+
<li>
|
36
|
+
<a href='#grouping'> Step grouping</a>
|
37
|
+
</li>
|
38
|
+
</ul>
|
39
|
+
</div>
|
40
|
+
<div id='content'>
|
41
|
+
<h2>
|
42
|
+
<a name='overview'> Overview</a>
|
43
|
+
</h2>
|
44
|
+
<table>
|
45
|
+
<tbody>
|
46
|
+
<tr>
|
47
|
+
<th> Stat</th>
|
48
|
+
<th> Result</th>
|
49
|
+
</tr>
|
50
|
+
<tr>
|
51
|
+
<td> Total number of scenarios</td>
|
52
|
+
<td><%= total_scenarios %></td>
|
53
|
+
</tr>
|
54
|
+
<tr>
|
55
|
+
<td> Total number of steps</td>
|
56
|
+
<td><%= total_steps %></td>
|
57
|
+
</tr>
|
58
|
+
<tr>
|
59
|
+
<td> Unused steps</td>
|
60
|
+
<td><%= unused_step_count %></td>
|
61
|
+
</tr>
|
62
|
+
<tr>
|
63
|
+
<td> Steps per scenario</td>
|
64
|
+
<td><%= steps_per_scenario %></td>
|
65
|
+
</tr>
|
66
|
+
<tr>
|
67
|
+
<td> Unique steps per scenario</td>
|
68
|
+
<td><%= unique_steps %></td>
|
69
|
+
</tr>
|
70
|
+
</tbody>
|
71
|
+
</table>
|
72
|
+
<h2>
|
73
|
+
<a name='trend'> Trend</a>
|
74
|
+
</h2>
|
75
|
+
<div>
|
76
|
+
<canvas id='graph'></canvas>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<h2>
|
80
|
+
<a name='usage'> Step usages</a>
|
81
|
+
</h2>
|
82
|
+
<div>
|
83
|
+
Filter
|
84
|
+
<br />
|
85
|
+
Usage
|
86
|
+
<select id='use_filter'>
|
87
|
+
<option> All
|
88
|
+
<option value='20'> >20</option>
|
89
|
+
<option value='<50'> >50</option>
|
90
|
+
<option value='<75'> >75</option>
|
91
|
+
<option value='<100'> >100</option>
|
92
|
+
<option value='<200'> >200</option>
|
93
|
+
<option value='<300'> >300</option>
|
94
|
+
</select>
|
95
|
+
Scenarios
|
96
|
+
Usage
|
97
|
+
<select id='scenario_filter'>
|
98
|
+
<option> All
|
99
|
+
<option value='<10'> >10</option>
|
100
|
+
<option value='<20'> >20</option>
|
101
|
+
<option value='<50'> >50</option>
|
102
|
+
<option value='<75'> >75</option>
|
103
|
+
<option value='<100'> >100</option>
|
104
|
+
<option value='<200'> >200</option>
|
105
|
+
<option value='<300'> >300</option>
|
106
|
+
</select>
|
107
|
+
</div>
|
108
|
+
<table id='usages'>
|
109
|
+
<tbody>
|
110
|
+
<tr>
|
111
|
+
<th> Step</th>
|
112
|
+
<th> Total usage</th>
|
113
|
+
<th> Scenarios</th>
|
114
|
+
<th> Use per scenario</th>
|
115
|
+
</tr>
|
116
|
+
|
117
|
+
<% usages_top(10).each do |use| %>
|
118
|
+
<tr>
|
119
|
+
<td><%= use.step.regex.inspect %></td>
|
120
|
+
<td><%= use.total_usage %></td>
|
121
|
+
<td><%= use.number_scenarios %></td>
|
122
|
+
<td><%= use.use_scenario %></td>
|
123
|
+
</tr>
|
124
|
+
<% end %>
|
125
|
+
<tr>
|
126
|
+
<td colspan='4'>
|
127
|
+
<a href="#" class="more" partial='usages'>See all</a>
|
128
|
+
</td>
|
129
|
+
</tr>
|
130
|
+
</tbody>
|
131
|
+
</table>
|
132
|
+
|
133
|
+
<h2>
|
134
|
+
<a name='unused'> Unused steps</a>
|
135
|
+
</h2>
|
136
|
+
<table id='unused'>
|
137
|
+
<tbody>
|
138
|
+
<th> Step</th>
|
139
|
+
|
140
|
+
<% unused_top(10).each do |use| %>
|
141
|
+
<tr>
|
142
|
+
<td><%= use.step.regex.inspect %></td>
|
143
|
+
</tr>
|
144
|
+
<% end %>
|
145
|
+
<tr>
|
146
|
+
<td colspan='4'>
|
147
|
+
<a href="#" class="more" partial='unused'>See all</a>
|
148
|
+
</td>
|
149
|
+
</tr>
|
150
|
+
</tbody>
|
151
|
+
</table>
|
152
|
+
<h2>
|
153
|
+
<a name='empty'> Empty scenarios</a>
|
154
|
+
</h2>
|
155
|
+
<table id='empty'>
|
156
|
+
<tbody>
|
157
|
+
<th> Scenarios</th>
|
158
|
+
|
159
|
+
<% empty_top(10).each do |scen| %>
|
160
|
+
<tr>
|
161
|
+
<td><%= scen.name %></td>
|
162
|
+
</tr>
|
163
|
+
<% end %>
|
164
|
+
<tr>
|
165
|
+
<td colspan='4'>
|
166
|
+
<a href="#" class="more" partial='empty'>See all</a>
|
167
|
+
</td>
|
168
|
+
</tr>
|
169
|
+
</tbody>
|
170
|
+
</table>
|
171
|
+
<h2>
|
172
|
+
<a name='grouping'> Step grouping</a>
|
173
|
+
</h2>
|
174
|
+
<table id='grouping'>
|
175
|
+
<tbody>
|
176
|
+
<th> Step</th>
|
177
|
+
<th> Total step associations</th>
|
178
|
+
|
179
|
+
<% groupings_top(10).each_with_index do |grouping, i|
|
180
|
+
next if grouping.use_count == 0 %>
|
181
|
+
<tr>
|
182
|
+
<td>
|
183
|
+
<%= grouping.regex.inspect %>
|
184
|
+
<br />
|
185
|
+
<a href='#' class="g<%=i %>">Show associated steps</a>
|
186
|
+
</td>
|
187
|
+
<td><%= grouping.use_count %></td>
|
188
|
+
</tr>
|
189
|
+
<tr class="g<%= i %>" style="display: none;">
|
190
|
+
<td colspan='2'>
|
191
|
+
<table>
|
192
|
+
<tr>
|
193
|
+
<th> Association count</th>
|
194
|
+
<th> Step</th>
|
195
|
+
</tr>
|
196
|
+
<tbody>
|
197
|
+
<% grouping.step_collection.each do |step| %>
|
198
|
+
<tr>
|
199
|
+
<td><%= step.count %></td>
|
200
|
+
<td><%= CGI.escapeHTML(step.regex.inspect) %></td>
|
201
|
+
</tr>
|
202
|
+
<% end %>
|
203
|
+
</tbody>
|
204
|
+
</table>
|
205
|
+
</td>
|
206
|
+
</tr>
|
207
|
+
<% end %>
|
208
|
+
<tr>
|
209
|
+
<td colspan="4">
|
210
|
+
<a href="#" class="more" partial='grouping'>See all</a>
|
211
|
+
</td>
|
212
|
+
</tr>
|
213
|
+
</tbody>
|
214
|
+
</table>
|
215
|
+
<script src='stepdown.js'></script>
|
216
|
+
</body>
|
217
|
+
</html>
|
218
|
+
|
metadata
CHANGED
@@ -1,110 +1,83 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: stepdown
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.4
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 6
|
9
|
-
- 3
|
10
|
-
version: 0.6.3
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Sean Caffery
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
name: haml
|
23
|
-
prerelease: false
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ">"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
|
-
segments:
|
31
|
-
- 2
|
32
|
-
- 0
|
33
|
-
version: "2.0"
|
34
|
-
type: :runtime
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-11-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
37
15
|
name: gherkin
|
38
|
-
|
39
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &81592020 !ruby/object:Gem::Requirement
|
40
17
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
45
|
-
segments:
|
46
|
-
- 2
|
47
|
-
- 3
|
48
|
-
version: "2.3"
|
18
|
+
requirements:
|
19
|
+
- - ! '>'
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.3'
|
49
22
|
type: :runtime
|
50
|
-
version_requirements: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: bundler
|
53
23
|
prerelease: false
|
54
|
-
|
24
|
+
version_requirements: *81592020
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: bundler
|
27
|
+
requirement: &81591770 !ruby/object:Gem::Requirement
|
55
28
|
none: false
|
56
|
-
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
segments:
|
61
|
-
- 1
|
62
|
-
- 0
|
63
|
-
version: "1.0"
|
29
|
+
requirements:
|
30
|
+
- - ! '>'
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.0'
|
64
33
|
type: :runtime
|
65
|
-
version_requirements: *id003
|
66
|
-
- !ruby/object:Gem::Dependency
|
67
|
-
name: rspec
|
68
34
|
prerelease: false
|
69
|
-
|
35
|
+
version_requirements: *81591770
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
requirement: &81591500 !ruby/object:Gem::Requirement
|
70
39
|
none: false
|
71
|
-
requirements:
|
40
|
+
requirements:
|
72
41
|
- - ~>
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
hash: 27
|
75
|
-
segments:
|
76
|
-
- 2
|
77
|
-
- 5
|
78
|
-
- 0
|
42
|
+
- !ruby/object:Gem::Version
|
79
43
|
version: 2.5.0
|
80
44
|
type: :development
|
81
|
-
version_requirements: *id004
|
82
|
-
- !ruby/object:Gem::Dependency
|
83
|
-
name: rake
|
84
45
|
prerelease: false
|
85
|
-
|
46
|
+
version_requirements: *81591500
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: sass
|
49
|
+
requirement: &81590960 !ruby/object:Gem::Requirement
|
86
50
|
none: false
|
87
|
-
requirements:
|
88
|
-
- -
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
|
91
|
-
segments:
|
92
|
-
- 0
|
93
|
-
version: "0"
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.1.0
|
94
55
|
type: :development
|
95
|
-
|
96
|
-
|
97
|
-
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *81590960
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rake
|
60
|
+
requirement: &81590440 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *81590440
|
69
|
+
description: Stepdown allows you to see where your most used Cucumber steps are, your
|
70
|
+
unused steps and how they are clustered
|
71
|
+
email:
|
98
72
|
- sean@lineonpoint.com
|
99
|
-
executables:
|
73
|
+
executables:
|
100
74
|
- stepdown
|
101
75
|
extensions: []
|
102
|
-
|
103
76
|
extra_rdoc_files: []
|
104
|
-
|
105
|
-
files:
|
77
|
+
files:
|
106
78
|
- .gitignore
|
107
79
|
- .rspec
|
80
|
+
- .travis.yml
|
108
81
|
- Gemfile
|
109
82
|
- Gemfile.lock
|
110
83
|
- History.txt
|
@@ -133,6 +106,7 @@ files:
|
|
133
106
|
- public/jquery-1.6.1.min.js
|
134
107
|
- public/js-class.js
|
135
108
|
- public/step_down.js
|
109
|
+
- public/stepdown.css
|
136
110
|
- spec/fixtures/20110611.yml
|
137
111
|
- spec/fixtures/20110612.yml
|
138
112
|
- spec/lib/stepdown/analyzer_spec.rb
|
@@ -146,49 +120,34 @@ files:
|
|
146
120
|
- spec/lib/stepdown/step_instance_spec.rb
|
147
121
|
- spec/spec_helper.rb
|
148
122
|
- stepdown.gemspec
|
149
|
-
- templates/_empty.html.
|
150
|
-
- templates/_grouping.html.
|
151
|
-
- templates/_unused.html.
|
152
|
-
- templates/_usages.html.
|
153
|
-
- templates/index.html.
|
123
|
+
- templates/_empty.html.erb
|
124
|
+
- templates/_grouping.html.erb
|
125
|
+
- templates/_unused.html.erb
|
126
|
+
- templates/_usages.html.erb
|
127
|
+
- templates/index.html.erb
|
154
128
|
- templates/style.sass
|
155
|
-
has_rdoc: true
|
156
129
|
homepage: http://stepdown.lineonpoint.com
|
157
130
|
licenses: []
|
158
|
-
|
159
131
|
post_install_message:
|
160
132
|
rdoc_options: []
|
161
|
-
|
162
|
-
require_paths:
|
133
|
+
require_paths:
|
163
134
|
- lib
|
164
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
135
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
165
136
|
none: false
|
166
|
-
requirements:
|
167
|
-
- -
|
168
|
-
- !ruby/object:Gem::Version
|
169
|
-
hash: 57
|
170
|
-
segments:
|
171
|
-
- 1
|
172
|
-
- 8
|
173
|
-
- 7
|
137
|
+
requirements:
|
138
|
+
- - ! '>='
|
139
|
+
- !ruby/object:Gem::Version
|
174
140
|
version: 1.8.7
|
175
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
142
|
none: false
|
177
|
-
requirements:
|
178
|
-
- -
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
hash: 23
|
181
|
-
segments:
|
182
|
-
- 1
|
183
|
-
- 3
|
184
|
-
- 6
|
143
|
+
requirements:
|
144
|
+
- - ! '>='
|
145
|
+
- !ruby/object:Gem::Version
|
185
146
|
version: 1.3.6
|
186
147
|
requirements: []
|
187
|
-
|
188
148
|
rubyforge_project: stepdown
|
189
|
-
rubygems_version: 1.
|
149
|
+
rubygems_version: 1.8.11
|
190
150
|
signing_key:
|
191
151
|
specification_version: 3
|
192
152
|
summary: Static analysis tool for Cucumber features
|
193
153
|
test_files: []
|
194
|
-
|
data/templates/_empty.html.haml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
- groupings_rest.each_with_index do |grouping, i|
|
2
|
-
- next if grouping.use_count == 0
|
3
|
-
%tr
|
4
|
-
%td
|
5
|
-
= grouping.regex.inspect
|
6
|
-
%br
|
7
|
-
%a{:href => '#', :class => "g#{i}"}Show associated steps
|
8
|
-
%td= grouping.use_count
|
9
|
-
%tr{:class => "g#{i}", :style => "display: none;"}
|
10
|
-
%td{:colspan => 2}
|
11
|
-
%table
|
12
|
-
%tr
|
13
|
-
%th Association count
|
14
|
-
%th Step
|
15
|
-
%tbody
|
16
|
-
- grouping.step_collection.each do |step|
|
17
|
-
%tr
|
18
|
-
%td= step.count
|
19
|
-
%td= CGI.escapeHTML step.regex.inspect
|
data/templates/_unused.html.haml
DELETED
data/templates/_usages.html.haml
DELETED
data/templates/index.html.haml
DELETED
@@ -1,155 +0,0 @@
|
|
1
|
-
!!! strict
|
2
|
-
|
3
|
-
%html
|
4
|
-
%head
|
5
|
-
%title Step down - Cucumber analysis
|
6
|
-
%link{:type => 'text/css', :rel => 'stylesheet', :href => 'style.css'}
|
7
|
-
%script{:src => 'jquery-1.6.1.min.js'}
|
8
|
-
%script{:src => 'js-class.js'}
|
9
|
-
%script{:src => 'bluff-min.js'}
|
10
|
-
%script{:src => 'excanvas.js'}
|
11
|
-
%script{:src => 'step_down.js'}
|
12
|
-
%body
|
13
|
-
#page_container
|
14
|
-
#header
|
15
|
-
%h1 Cucumber analysis
|
16
|
-
#navigation
|
17
|
-
%ul
|
18
|
-
%li
|
19
|
-
%a{:href => '#overview'} Overview
|
20
|
-
%li
|
21
|
-
%a{:href => '#trend'} Trend
|
22
|
-
%li
|
23
|
-
%a{:href => '#usage'} Step usage
|
24
|
-
%li
|
25
|
-
%a{:href => '#unused'} Unused steps
|
26
|
-
%li
|
27
|
-
%a{:href => '#empty'} Empty scenarios
|
28
|
-
%li
|
29
|
-
%a{:href => '#grouping'} Step grouping
|
30
|
-
#content
|
31
|
-
%h2
|
32
|
-
%a{:name => 'overview'} Overview
|
33
|
-
%table
|
34
|
-
%tbody
|
35
|
-
%tr
|
36
|
-
%th Stat
|
37
|
-
%th Result
|
38
|
-
%tr
|
39
|
-
%td Total number of scenarios
|
40
|
-
%td= total_scenarios
|
41
|
-
%tr
|
42
|
-
%td Total number of steps
|
43
|
-
%td= total_steps
|
44
|
-
%tr
|
45
|
-
%td Unused steps
|
46
|
-
%td= unused_step_count
|
47
|
-
%tr
|
48
|
-
%td Steps per scenario
|
49
|
-
%td= steps_per_scenario
|
50
|
-
%tr
|
51
|
-
%td Unique steps per scenario
|
52
|
-
%td= unique_steps
|
53
|
-
|
54
|
-
%h2
|
55
|
-
%a{:name => 'trend'} Trend
|
56
|
-
%div
|
57
|
-
%canvas#graph
|
58
|
-
|
59
|
-
%h2
|
60
|
-
%a{:name => 'usage'} Step usages
|
61
|
-
%div
|
62
|
-
Filter
|
63
|
-
%br
|
64
|
-
Usage
|
65
|
-
%select#use_filter
|
66
|
-
%option All
|
67
|
-
%option{:value => "<20"} >20
|
68
|
-
%option{:value => "<50"} >50
|
69
|
-
%option{:value => "<75"} >75
|
70
|
-
%option{:value => "<100"} >100
|
71
|
-
%option{:value => "<200"} >200
|
72
|
-
%option{:value => "<300"} >300
|
73
|
-
|
74
|
-
Scenarios
|
75
|
-
Usage
|
76
|
-
%select#scenario_filter
|
77
|
-
%option All
|
78
|
-
%option{:value => "<10"} >10
|
79
|
-
%option{:value => "<20"} >20
|
80
|
-
%option{:value => "<50"} >50
|
81
|
-
%option{:value => "<75"} >75
|
82
|
-
%option{:value => "<100"} >100
|
83
|
-
%option{:value => "<200"} >200
|
84
|
-
%option{:value => "<300"} >300
|
85
|
-
%table#usages
|
86
|
-
%tbody
|
87
|
-
%th Step
|
88
|
-
%th Total usage
|
89
|
-
%th Scenarios
|
90
|
-
%th Use per scenario
|
91
|
-
|
92
|
-
- usages_top(10).each do |use|
|
93
|
-
%tr
|
94
|
-
%td= use.step.regex.inspect
|
95
|
-
%td= use.total_usage
|
96
|
-
%td= use.number_scenarios
|
97
|
-
%td= use.use_scenario
|
98
|
-
%tr
|
99
|
-
%td{:colspan => "4"}
|
100
|
-
%a{:href => "#", :class => "more", :partial => 'usages'}See all
|
101
|
-
|
102
|
-
%h2
|
103
|
-
%a{:name => 'unused'} Unused steps
|
104
|
-
%table#unused
|
105
|
-
%tbody
|
106
|
-
%th Step
|
107
|
-
|
108
|
-
- unused_top(10).each do |use|
|
109
|
-
%tr
|
110
|
-
%td= use.step.regex.inspect
|
111
|
-
%tr
|
112
|
-
%td{:colspan => "4"}
|
113
|
-
%a{:href => "#", :class => "more", :partial => 'unused'}See all
|
114
|
-
%h2
|
115
|
-
%a{:name => 'empty'} Empty scenarios
|
116
|
-
%table#empty
|
117
|
-
%tbody
|
118
|
-
%th Scenarios
|
119
|
-
|
120
|
-
- empty_top(10).each do |scen|
|
121
|
-
%tr
|
122
|
-
%td= scen.name
|
123
|
-
%tr
|
124
|
-
%td{:colspan => "4"}
|
125
|
-
%a{:href => "#", :class => "more", :partial => 'empty'}See all
|
126
|
-
%h2
|
127
|
-
%a{:name => 'grouping'} Step grouping
|
128
|
-
%table#grouping
|
129
|
-
%tbody
|
130
|
-
%th Step
|
131
|
-
%th Total step associations
|
132
|
-
|
133
|
-
- groupings_top(10).each_with_index do |grouping, i|
|
134
|
-
- next if grouping.use_count == 0
|
135
|
-
%tr
|
136
|
-
%td
|
137
|
-
= grouping.regex.inspect
|
138
|
-
%br
|
139
|
-
%a{:href => '#', :class => "g#{i}"}Show associated steps
|
140
|
-
%td= grouping.use_count
|
141
|
-
%tr{:class => "g#{i}", :style => "display: none;"}
|
142
|
-
%td{:colspan => 2}
|
143
|
-
%table
|
144
|
-
%tr
|
145
|
-
%th Association count
|
146
|
-
%th Step
|
147
|
-
%tbody
|
148
|
-
- grouping.step_collection.each do |step|
|
149
|
-
%tr
|
150
|
-
%td= step.count
|
151
|
-
%td= CGI.escapeHTML step.regex.inspect
|
152
|
-
%tr
|
153
|
-
%td{:colspan => "4"}
|
154
|
-
%a{:href => "#", :class => "more", :partial => 'grouping'}See all
|
155
|
-
%script{:src => 'stepdown.js'}
|