nailed 0.0.3

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 (49) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/Gemfile +14 -0
  4. data/README.md +71 -0
  5. data/README.rdoc +64 -0
  6. data/bin/app +142 -0
  7. data/bin/nailed +90 -0
  8. data/config/products.yml +14 -0
  9. data/config/products.yml.example +65 -0
  10. data/db/database.rb +89 -0
  11. data/lib/nailed.rb +194 -0
  12. data/log/nailed.log +18 -0
  13. data/nailed.gemspec +25 -0
  14. data/public/images/favicon.ico +0 -0
  15. data/public/vendor/css/foundation.css +6031 -0
  16. data/public/vendor/css/foundation.min.css +1 -0
  17. data/public/vendor/css/morris.css +2 -0
  18. data/public/vendor/css/normalize.css +425 -0
  19. data/public/vendor/js/external/fastclick.js +9 -0
  20. data/public/vendor/js/external/jquery.js +26 -0
  21. data/public/vendor/js/external/modernizr.js +8 -0
  22. data/public/vendor/js/external/placeholder.js +2 -0
  23. data/public/vendor/js/foundation.min.js +10 -0
  24. data/public/vendor/js/foundation/foundation.abide.js +294 -0
  25. data/public/vendor/js/foundation/foundation.accordion.js +65 -0
  26. data/public/vendor/js/foundation/foundation.alert.js +43 -0
  27. data/public/vendor/js/foundation/foundation.clearing.js +558 -0
  28. data/public/vendor/js/foundation/foundation.dropdown.js +313 -0
  29. data/public/vendor/js/foundation/foundation.equalizer.js +74 -0
  30. data/public/vendor/js/foundation/foundation.interchange.js +344 -0
  31. data/public/vendor/js/foundation/foundation.joyride.js +915 -0
  32. data/public/vendor/js/foundation/foundation.js +625 -0
  33. data/public/vendor/js/foundation/foundation.magellan.js +189 -0
  34. data/public/vendor/js/foundation/foundation.offcanvas.js +139 -0
  35. data/public/vendor/js/foundation/foundation.orbit.js +472 -0
  36. data/public/vendor/js/foundation/foundation.reveal.js +443 -0
  37. data/public/vendor/js/foundation/foundation.slider.js +231 -0
  38. data/public/vendor/js/foundation/foundation.tab.js +167 -0
  39. data/public/vendor/js/foundation/foundation.tooltip.js +298 -0
  40. data/public/vendor/js/foundation/foundation.topbar.js +436 -0
  41. data/public/vendor/js/morris.min.js +7 -0
  42. data/public/vendor/js/morris/morris.js +1892 -0
  43. data/public/vendor/js/morris/raphael-min.js +11 -0
  44. data/public/vendor/js/morris/raphael.js +8117 -0
  45. data/views/bugzilla.haml +110 -0
  46. data/views/github.haml +63 -0
  47. data/views/index.haml +51 -0
  48. data/views/layout.haml +49 -0
  49. metadata +231 -0
@@ -0,0 +1,110 @@
1
+ !!!
2
+ %section.main-section
3
+ .row
4
+ %h1.title
5
+ #{@product}
6
+ .row
7
+ .large-12.columns
8
+ %h5 Bug Trends
9
+ #bug_trend
10
+ .row
11
+ %hr
12
+ %br
13
+ .row
14
+ .large-12.columns
15
+ %h5 Bug Priorities
16
+ #bug_prio
17
+ .row
18
+ %hr
19
+ %br
20
+ .row
21
+ .large-12.columns
22
+ %h5 L3 List
23
+ %ul{:id => "l3list"}
24
+ - @allopenl3bugs.each do |l3|
25
+ %li
26
+ %a{:href => "#{l3.url}", :target => "_blank", :creation_time => "#{Time.parse(l3.creation_time.to_s).to_i}", :last_change_time => "#{Time.parse(l3.last_change_time.to_s).to_i}"} #{l3.bug_id} -- #{l3.summary}
27
+ %hr
28
+ .large-12.columns
29
+ %h5 Bug List
30
+ .large-12.columns
31
+ %ul{:id => "buglist"}
32
+ - @allopenbugs.each do |ob|
33
+ %li
34
+ %a{:href => "#{ob.url}", :target => "_blank", :creation_time => "#{Time.parse(ob.creation_time.to_s).to_i}", :last_change_time => "#{Time.parse(ob.last_change_time.to_s).to_i}"} #{ob.bug_id} -- #{ob.summary}
35
+
36
+ != js :foundation
37
+ != js :morris
38
+
39
+ :javascript
40
+ $(document).foundation();
41
+ $(document).ready(function(){
42
+ var colors = ['#B39DDB','#9FA8DA','#90CAF9','#81D4FA','#80DEEA','#80CBC4','#A5D6A7','#C5E1A5','#E6EE9C','#FFF59D','#FFE082','#FFCC80','#FFAB91','#BCAAA4','#EEEEEE'].reverse();
43
+ // BugZilla
44
+ new Morris.Line({
45
+ element: 'bug_trend',
46
+ data: #{@bugtrend},
47
+ xkey: 'time',
48
+ ykeys: ['open', 'fixed'],
49
+ labels: ['Open', 'Fixed'],
50
+ resize: true,
51
+ fillOpacity: 0.5,
52
+ smooth: false,
53
+ hideHover: true,
54
+ lineColors: ["#42A5F5", "#D4E157"],
55
+ hoverCallback: function (index, options, content, row) {
56
+ return content;
57
+ }
58
+ }).on('click', function(i, row){
59
+ if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
60
+ jQuery.noop();
61
+ else
62
+ window.open("https://bugzilla.suse.com/buglist.cgi?product=#{@product}&query_format=advanced&resolution=---");
63
+ });
64
+ new Morris.Bar({
65
+ element: 'bug_prio',
66
+ data: #{@bugprio},
67
+ xkey: 'bugprio',
68
+ ykeys: ['p1', 'p2', 'p3', 'p4', 'p5'],
69
+ labels: ['P1 - Urgent', 'P2 - High', 'P3 - Medium', 'P4 - Low', 'P5 - None'],
70
+ resize: true,
71
+ stacked: true,
72
+ hideHover: true,
73
+ barColors: colors,
74
+ hoverCallback: function (index, options, content, row) {
75
+ var ret = '';
76
+ if (typeof row.p1 !== "undefined")
77
+ return row.p1;
78
+ else if (typeof row.p2 !== "undefined")
79
+ return row.p2;
80
+ else if (typeof row.p3 !== "undefined")
81
+ return row.p3;
82
+ else if (typeof row.p4 !== "undefined")
83
+ return row.p4;
84
+ else if (typeof row.p5 !== "undefined")
85
+ return row.p5;
86
+ }
87
+ }).on('click', function(i, row){
88
+ if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
89
+ jQuery.noop();
90
+ else
91
+ window.open("https://bugzilla.suse.com/buglist.cgi?order=Importance&priority="+row.bugprio+"&product=#{@product}&query_format=advanced&resolution=---");
92
+ });
93
+ $("[last_change_time]").each(function (index, value){
94
+ var one_week = 604800;
95
+ var two_weeks = 1209600;
96
+ var one_month = 2629743;
97
+ var now = Math.round((new Date()).getTime() / 1000);
98
+ var then = $(this).attr("last_change_time");
99
+ var diff = now - then;
100
+ if (diff < one_week) {
101
+ $(value).css("color","#212121").attr('title', 'last change < one week');
102
+ } else if (diff < two_weeks) {
103
+ $(value).css("color","#E57373").attr('title', 'last change < two weeks');
104
+ } else if (diff < one_month) {
105
+ $(value).css("color","#C62828").attr('title', 'last change < one month');
106
+ } else {
107
+ $(value).css("color","#D50000").attr('title', 'last change > one month');
108
+ }
109
+ });
110
+ });
data/views/github.haml ADDED
@@ -0,0 +1,63 @@
1
+ !!!
2
+ %section.main-section
3
+ .row
4
+ %h1.title
5
+ #{@repo}
6
+ .row
7
+ %span Pull Request Trend
8
+ .large-12.columns
9
+ #pull_trend
10
+ .row
11
+ %span Pull Requests
12
+ .large-12.columns
13
+ %ul
14
+ - @allpulls.each do |pull|
15
+ %li
16
+ %a{:href => "#{pull.url}", :target => "_blank", :creation_time => "#{Time.parse(pull.created_at.to_s).to_i}"} #{pull.pr_number} -- #{pull.title}
17
+
18
+ != js :foundation
19
+ != js :morris
20
+
21
+ :javascript
22
+ $(document).foundation();
23
+ $(document).ready(function(){
24
+ var colors = ['#B39DDB','#9FA8DA','#90CAF9','#81D4FA','#80DEEA','#80CBC4','#A5D6A7','#C5E1A5','#E6EE9C','#FFF59D','#FFE082','#FFCC80','#FFAB91','#BCAAA4','#EEEEEE'].reverse();
25
+ // GitHub
26
+ new Morris.Line({
27
+ element: 'pull_trend',
28
+ data: #{@pulltrend},
29
+ xkey: 'time',
30
+ ykeys: ['open'],
31
+ labels: ['Open'],
32
+ resize: true,
33
+ hideHover: true,
34
+ smooth: false,
35
+ continuousLine: true,
36
+ lineColors: ["#4CAF50"],
37
+ hoverCallback: function (index, options, content, row) {
38
+ return content;
39
+ }
40
+ }).on('click', function(i, row){
41
+ if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
42
+ jQuery.noop();
43
+ else
44
+ window.open("#{@github_url_all_pulls}");
45
+ });
46
+ $("[creation_time]").each(function (index, value){
47
+ var one_week = 604800;
48
+ var two_weeks = 1209600;
49
+ var one_month = 2629743;
50
+ var now = Math.round((new Date()).getTime() / 1000);
51
+ var then = $(this).attr("creation_time");
52
+ var diff = now - then;
53
+ if (diff < one_week) {
54
+ $(value).css("color","#212121").attr('title', 'last change < one week');
55
+ } else if (diff < two_weeks) {
56
+ $(value).css("color","#E57373").attr('title', 'last change < two weeks');
57
+ } else if (diff < one_month) {
58
+ $(value).css("color","#C62828").attr('title', 'last change < one month');
59
+ } else {
60
+ $(value).css("color","#D50000").attr('title', 'last change > one month');
61
+ }
62
+ });
63
+ });
data/views/index.haml ADDED
@@ -0,0 +1,51 @@
1
+ !!!
2
+ %section.main-section
3
+ .row
4
+ .large-12.columns
5
+ %h1.title{:align => "center"}
6
+ Open Bugs by Product
7
+ #bug_top
8
+ .large-12.columns
9
+ %h1.title{:align => "center"}
10
+ L3 Trend
11
+ #l3_trend
12
+
13
+ != js :foundation
14
+ != js :morris
15
+
16
+ :javascript
17
+ $(document).foundation();
18
+ $(document).ready(function(){
19
+ var colors = ['#B39DDB','#9FA8DA','#90CAF9','#81D4FA','#80DEEA','#80CBC4','#A5D6A7','#C5E1A5','#E6EE9C','#FFF59D','#FFE082','#FFCC80','#FFAB91','#BCAAA4','#EEEEEE'].reverse();
20
+ new Morris.Donut({
21
+ element: 'bug_top',
22
+ data: #{@bugtop},
23
+ colors: colors,
24
+ resize: true
25
+ }).on('click', function(i, row){
26
+ if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
27
+ jQuery.noop();
28
+ else
29
+ window.open("/"+row.label.replace(/ /g,'_')+"/bugzilla","_self");
30
+ });
31
+ new Morris.Line({
32
+ element: 'l3_trend',
33
+ data: #{@l3trend},
34
+ xkey: 'time',
35
+ ykeys: ['open'],
36
+ labels: ['Open'],
37
+ resize: true,
38
+ hideHover: true,
39
+ lineColors: ["#4CAF50"],
40
+ smooth: false,
41
+ continuousLine: true,
42
+ hoverCallback: function (index, options, content, row) {
43
+ return content;
44
+ }
45
+ }).on('click', function(i, row){
46
+ if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
47
+ jQuery.noop();
48
+ else
49
+ window.open("https://bugzilla.suse.com/buglist.cgi?product=#{@product_query}&status_whiteboard=openL3&status_whiteboard_type=allwordssubstr&query_format=advanced&resolution=---");
50
+ });
51
+ });
data/views/layout.haml ADDED
@@ -0,0 +1,49 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ != css :foundation, :media => 'screen'
5
+ != css :morris, :media => 'screen'
6
+ %meta{:charset => "utf-8"}
7
+ %meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"}
8
+ %title Dashboard
9
+ %link{:href => "/images/favicon.ico", :rel => "shortcut icon"}
10
+ %body
11
+ .off-canvas-wrap{:data => {'offcanvas' => true}}
12
+ .inner-wrap
13
+ -# Mobile and Desktop devices
14
+ %nav.tab-bar
15
+ %section
16
+ %a.left-off-canvas-toggle.menu-icon
17
+ %span
18
+ %section.middle.tab-bar-section
19
+ %h1.title
20
+ %a{:href => '/',:style => "color:white"} Dashboard
21
+
22
+ %aside.left-off-canvas-menu
23
+ %ul.off-canvas-list
24
+ %li
25
+ %a{:href => '/'}Home
26
+ %li
27
+ %label Bugzilla
28
+ - @products.each do |product|
29
+ %li
30
+ %a{:href => "/#{product.gsub(/ /,'_')}/bugzilla"} #{product}
31
+ %li
32
+ %label GitHub
33
+ - @github_repos.each do |repo|
34
+ %li
35
+ %a{:href => "/github/#{repo}"} #{repo}
36
+
37
+ %a.exit-off-canvas
38
+ = yield
39
+ :javascript
40
+ $(document).ready(function(){
41
+ var timer;
42
+
43
+ $(window).resize(function() {
44
+ clearTimeout(timer);
45
+ timer = setTimeout(function() {
46
+ $('.inner-wrap').css("min-height", $(window).height() + "px" );
47
+ }, 40);
48
+ }).resize();
49
+ });
metadata ADDED
@@ -0,0 +1,231 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nailed
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Maximilian Meister
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: octokit
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 3.7.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 3.7.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: trollop
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: '2.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bicho
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 0.0.8
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 0.0.8
55
+ - !ruby/object:Gem::Dependency
56
+ name: data_mapper
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.2.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 1.2.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: dm-sqlite-adapter
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 1.2.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 1.2.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: netrc
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 0.10.2
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 0.10.2
97
+ - !ruby/object:Gem::Dependency
98
+ name: sinatra-base
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '='
102
+ - !ruby/object:Gem::Version
103
+ version: 1.4.0
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 1.4.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: sinatra-assetpack
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '='
116
+ - !ruby/object:Gem::Version
117
+ version: 0.3.3
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '='
123
+ - !ruby/object:Gem::Version
124
+ version: 0.3.3
125
+ - !ruby/object:Gem::Dependency
126
+ name: haml
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '='
130
+ - !ruby/object:Gem::Version
131
+ version: 4.0.6
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '='
137
+ - !ruby/object:Gem::Version
138
+ version: 4.0.6
139
+ - !ruby/object:Gem::Dependency
140
+ name: rerun
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '='
144
+ - !ruby/object:Gem::Version
145
+ version: 0.10.0
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '='
151
+ - !ruby/object:Gem::Version
152
+ version: 0.10.0
153
+ description: Collect and visualize Product related data from Bugzilla and Github
154
+ email: mmeister@suse.de
155
+ executables:
156
+ - nailed
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - ".gitignore"
161
+ - Gemfile
162
+ - README.md
163
+ - README.rdoc
164
+ - bin/app
165
+ - bin/nailed
166
+ - config/products.yml
167
+ - config/products.yml.example
168
+ - db/database.rb
169
+ - lib/nailed.rb
170
+ - log/nailed.log
171
+ - nailed.gemspec
172
+ - public/images/favicon.ico
173
+ - public/vendor/css/foundation.css
174
+ - public/vendor/css/foundation.min.css
175
+ - public/vendor/css/morris.css
176
+ - public/vendor/css/normalize.css
177
+ - public/vendor/js/external/fastclick.js
178
+ - public/vendor/js/external/jquery.js
179
+ - public/vendor/js/external/modernizr.js
180
+ - public/vendor/js/external/placeholder.js
181
+ - public/vendor/js/foundation.min.js
182
+ - public/vendor/js/foundation/foundation.abide.js
183
+ - public/vendor/js/foundation/foundation.accordion.js
184
+ - public/vendor/js/foundation/foundation.alert.js
185
+ - public/vendor/js/foundation/foundation.clearing.js
186
+ - public/vendor/js/foundation/foundation.dropdown.js
187
+ - public/vendor/js/foundation/foundation.equalizer.js
188
+ - public/vendor/js/foundation/foundation.interchange.js
189
+ - public/vendor/js/foundation/foundation.joyride.js
190
+ - public/vendor/js/foundation/foundation.js
191
+ - public/vendor/js/foundation/foundation.magellan.js
192
+ - public/vendor/js/foundation/foundation.offcanvas.js
193
+ - public/vendor/js/foundation/foundation.orbit.js
194
+ - public/vendor/js/foundation/foundation.reveal.js
195
+ - public/vendor/js/foundation/foundation.slider.js
196
+ - public/vendor/js/foundation/foundation.tab.js
197
+ - public/vendor/js/foundation/foundation.tooltip.js
198
+ - public/vendor/js/foundation/foundation.topbar.js
199
+ - public/vendor/js/morris.min.js
200
+ - public/vendor/js/morris/morris.js
201
+ - public/vendor/js/morris/raphael-min.js
202
+ - public/vendor/js/morris/raphael.js
203
+ - views/bugzilla.haml
204
+ - views/github.haml
205
+ - views/index.haml
206
+ - views/layout.haml
207
+ homepage: http://github.com/MaximilianMeister/nailed
208
+ licenses:
209
+ - MIT
210
+ metadata: {}
211
+ post_install_message:
212
+ rdoc_options: []
213
+ require_paths:
214
+ - lib
215
+ required_ruby_version: !ruby/object:Gem::Requirement
216
+ requirements:
217
+ - - ">="
218
+ - !ruby/object:Gem::Version
219
+ version: '0'
220
+ required_rubygems_version: !ruby/object:Gem::Requirement
221
+ requirements:
222
+ - - ">="
223
+ - !ruby/object:Gem::Version
224
+ version: '0'
225
+ requirements: []
226
+ rubyforge_project:
227
+ rubygems_version: 2.2.0
228
+ signing_key:
229
+ specification_version: 4
230
+ summary: Nailed CLI and WebUI
231
+ test_files: []