stepdown-patched 0.6.3.1patched

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. data/.bundle/config +1 -0
  2. data/.gitignore +7 -0
  3. data/.rspec +1 -0
  4. data/Gemfile +12 -0
  5. data/Gemfile.lock +31 -0
  6. data/History.txt +50 -0
  7. data/README.rdoc +28 -0
  8. data/Rakefile +14 -0
  9. data/bin/stepdown +23 -0
  10. data/lib/stepdown/analyzer.rb +74 -0
  11. data/lib/stepdown/feature_parser.rb +60 -0
  12. data/lib/stepdown/graph.rb +75 -0
  13. data/lib/stepdown/html_reporter.rb +37 -0
  14. data/lib/stepdown/options.rb +68 -0
  15. data/lib/stepdown/reporter.rb +23 -0
  16. data/lib/stepdown/scenario.rb +26 -0
  17. data/lib/stepdown/statistics.rb +162 -0
  18. data/lib/stepdown/step.rb +22 -0
  19. data/lib/stepdown/step_collection.rb +36 -0
  20. data/lib/stepdown/step_group.rb +45 -0
  21. data/lib/stepdown/step_instance.rb +63 -0
  22. data/lib/stepdown/step_usage.rb +15 -0
  23. data/lib/stepdown/text_reporter.rb +39 -0
  24. data/lib/stepdown/version.rb +3 -0
  25. data/lib/stepdown/yaml_writer.rb +14 -0
  26. data/lib/stepdown.rb +17 -0
  27. data/public/bluff-min.js +1 -0
  28. data/public/excanvas.js +35 -0
  29. data/public/jquery-1.6.1.min.js +18 -0
  30. data/public/js-class.js +1 -0
  31. data/public/step_down.js +41 -0
  32. data/public/stepdown.css +24 -0
  33. data/spec/fixtures/20110611.yml +5 -0
  34. data/spec/fixtures/20110612.yml +5 -0
  35. data/spec/lib/stepdown/analyzer_spec.rb +70 -0
  36. data/spec/lib/stepdown/feature_parser_spec.rb +93 -0
  37. data/spec/lib/stepdown/graph_spec.rb +82 -0
  38. data/spec/lib/stepdown/options_spec.rb +98 -0
  39. data/spec/lib/stepdown/scenario_spec.rb +40 -0
  40. data/spec/lib/stepdown/statistics_spec.rb +239 -0
  41. data/spec/lib/stepdown/step_collection_spec.rb +78 -0
  42. data/spec/lib/stepdown/step_group_spec.rb +43 -0
  43. data/spec/lib/stepdown/step_instance_spec.rb +85 -0
  44. data/spec/spec_helper.rb +4 -0
  45. data/stepdown.gemspec +30 -0
  46. data/templates/_empty.html.erb +5 -0
  47. data/templates/_grouping.html.erb +31 -0
  48. data/templates/_unused.html.erb +5 -0
  49. data/templates/_usages.html.erb +8 -0
  50. data/templates/index.html.erb +218 -0
  51. data/templates/style.sass +25 -0
  52. metadata +183 -0
@@ -0,0 +1,4 @@
1
+ $:.unshift(File.dirname(__FILE__) + '/../lib')
2
+ $:.unshift(File.dirname(__FILE__) + '/../lib/stepdown')
3
+
4
+ require 'rspec'
data/stepdown.gemspec ADDED
@@ -0,0 +1,30 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+ require "stepdown/version"
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "stepdown-patched"
6
+ s.version = Stepdown::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.required_ruby_version = '>= 1.8.7'
9
+ s.authors = ["Sean Caffery"]
10
+ s.email = ["sean@lineonpoint.com"]
11
+ s.summary = "Static analysis tool for Cucumber features (patched)"
12
+ s.homepage = "http://stepdown.lineonpoint.com"
13
+ s.description = "Stepdown allows you to see where your most used Cucumber steps are, your unused steps and how they are clustered. This is a clone of the original gem with a patch"
14
+
15
+ s.required_rubygems_version = ">= 1.3.6"
16
+ s.rubyforge_project = "stepdown-patched"
17
+
18
+ s.add_dependency('haml', '> 2.0')
19
+ s.add_dependency('gherkin', '> 2.3')
20
+ s.add_dependency('bundler', '> 1.0')
21
+ s.add_development_dependency('rspec', "~> 2.5.0")
22
+ s.add_development_dependency('sass', "~> 3.1.0")
23
+ s.add_development_dependency('rake')
24
+
25
+ s.files = `git ls-files`.split("\n")
26
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
27
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
28
+ s.require_paths = ["lib"]
29
+ s.default_executable = "stepdown"
30
+ end
@@ -0,0 +1,5 @@
1
+ <% empty_rest.each do |scen| %>
2
+ <tr>
3
+ <td><%= scen.name %></td>
4
+ </tr>
5
+ <% end %>
@@ -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,5 @@
1
+ <% empty_rest.each do |scen| %>
2
+ <tr>
3
+ <td><%= scen.name %></td>
4
+ </tr>
5
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <% usages_rest.each do |use| %>
2
+ <tr>
3
+ <td><%= use.step.regex.inspect %></td>
4
+ <td><%= use.total_usage %></td>
5
+ <td><%= use.number_scenarios %></td>
6
+ <td><%= use.use_scenario %></td>
7
+ </tr>
8
+ <% 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
+
@@ -0,0 +1,25 @@
1
+
2
+ body
3
+ :font-family verdana, helvetica, arial
4
+ :font-size 12px
5
+
6
+ #page_container
7
+ :width 900px
8
+ :margin auto
9
+ table
10
+ :border 1px solid #cccccc
11
+ :border-spacing 0
12
+ th
13
+ :border 1px solid #999999
14
+ :text-align left
15
+ :padding 3px
16
+ :background-color #999999
17
+ td
18
+ :padding 3px
19
+ :border 1px solid #cccccc
20
+ :vertical-align top
21
+ #navigation
22
+ ul
23
+ :padding 0
24
+ li
25
+ :display inline
metadata ADDED
@@ -0,0 +1,183 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: stepdown-patched
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: 7
5
+ version: 0.6.3.1patched
6
+ platform: ruby
7
+ authors:
8
+ - Sean Caffery
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-10-20 00:00:00 +05:30
14
+ default_executable: stepdown
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: haml
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">"
23
+ - !ruby/object:Gem::Version
24
+ version: "2.0"
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: gherkin
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ">"
34
+ - !ruby/object:Gem::Version
35
+ version: "2.3"
36
+ type: :runtime
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: bundler
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">"
45
+ - !ruby/object:Gem::Version
46
+ version: "1.0"
47
+ type: :runtime
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: rspec
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ~>
56
+ - !ruby/object:Gem::Version
57
+ version: 2.5.0
58
+ type: :development
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: sass
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 3.1.0
69
+ type: :development
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
72
+ name: rake
73
+ prerelease: false
74
+ requirement: &id006 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: "0"
80
+ type: :development
81
+ version_requirements: *id006
82
+ description: Stepdown allows you to see where your most used Cucumber steps are, your unused steps and how they are clustered. This is a clone of the original gem with a patch
83
+ email:
84
+ - sean@lineonpoint.com
85
+ executables:
86
+ - stepdown
87
+ extensions: []
88
+
89
+ extra_rdoc_files: []
90
+
91
+ files:
92
+ - .bundle/config
93
+ - .gitignore
94
+ - .rspec
95
+ - Gemfile
96
+ - Gemfile.lock
97
+ - History.txt
98
+ - README.rdoc
99
+ - Rakefile
100
+ - bin/stepdown
101
+ - lib/stepdown.rb
102
+ - lib/stepdown/analyzer.rb
103
+ - lib/stepdown/feature_parser.rb
104
+ - lib/stepdown/graph.rb
105
+ - lib/stepdown/html_reporter.rb
106
+ - lib/stepdown/options.rb
107
+ - lib/stepdown/reporter.rb
108
+ - lib/stepdown/scenario.rb
109
+ - lib/stepdown/statistics.rb
110
+ - lib/stepdown/step.rb
111
+ - lib/stepdown/step_collection.rb
112
+ - lib/stepdown/step_group.rb
113
+ - lib/stepdown/step_instance.rb
114
+ - lib/stepdown/step_usage.rb
115
+ - lib/stepdown/text_reporter.rb
116
+ - lib/stepdown/version.rb
117
+ - lib/stepdown/yaml_writer.rb
118
+ - public/bluff-min.js
119
+ - public/excanvas.js
120
+ - public/jquery-1.6.1.min.js
121
+ - public/js-class.js
122
+ - public/step_down.js
123
+ - public/stepdown.css
124
+ - spec/fixtures/20110611.yml
125
+ - spec/fixtures/20110612.yml
126
+ - spec/lib/stepdown/analyzer_spec.rb
127
+ - spec/lib/stepdown/feature_parser_spec.rb
128
+ - spec/lib/stepdown/graph_spec.rb
129
+ - spec/lib/stepdown/options_spec.rb
130
+ - spec/lib/stepdown/scenario_spec.rb
131
+ - spec/lib/stepdown/statistics_spec.rb
132
+ - spec/lib/stepdown/step_collection_spec.rb
133
+ - spec/lib/stepdown/step_group_spec.rb
134
+ - spec/lib/stepdown/step_instance_spec.rb
135
+ - spec/spec_helper.rb
136
+ - stepdown.gemspec
137
+ - templates/_empty.html.erb
138
+ - templates/_grouping.html.erb
139
+ - templates/_unused.html.erb
140
+ - templates/_usages.html.erb
141
+ - templates/index.html.erb
142
+ - templates/style.sass
143
+ has_rdoc: true
144
+ homepage: http://stepdown.lineonpoint.com
145
+ licenses: []
146
+
147
+ post_install_message:
148
+ rdoc_options: []
149
+
150
+ require_paths:
151
+ - lib
152
+ required_ruby_version: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ version: 1.8.7
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
159
+ none: false
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: 1.3.6
164
+ requirements: []
165
+
166
+ rubyforge_project: stepdown-patched
167
+ rubygems_version: 1.6.2
168
+ signing_key:
169
+ specification_version: 3
170
+ summary: Static analysis tool for Cucumber features (patched)
171
+ test_files:
172
+ - spec/fixtures/20110611.yml
173
+ - spec/fixtures/20110612.yml
174
+ - spec/lib/stepdown/analyzer_spec.rb
175
+ - spec/lib/stepdown/feature_parser_spec.rb
176
+ - spec/lib/stepdown/graph_spec.rb
177
+ - spec/lib/stepdown/options_spec.rb
178
+ - spec/lib/stepdown/scenario_spec.rb
179
+ - spec/lib/stepdown/statistics_spec.rb
180
+ - spec/lib/stepdown/step_collection_spec.rb
181
+ - spec/lib/stepdown/step_group_spec.rb
182
+ - spec/lib/stepdown/step_instance_spec.rb
183
+ - spec/spec_helper.rb