houston-core 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +20 -22
- data/README.md +1 -1
- data/app/adapters/houston/adapters/version_control/git_adapter/repo.rb +6 -3
- data/app/assets/javascripts/app/boot.coffee +9 -0
- data/app/assets/javascripts/app/infinite_scroll.coffee +6 -3
- data/app/assets/javascripts/app/models/ticket.coffee +1 -1
- data/app/assets/javascripts/core/app.coffee +4 -1
- data/app/assets/javascripts/core/core_ext/array.coffee +11 -0
- data/app/assets/javascripts/core/core_ext/date.coffee +8 -0
- data/app/assets/javascripts/core/handlebars_helpers.coffee +12 -8
- data/app/assets/javascripts/vendor.js +2 -2
- data/app/assets/stylesheets/application/mobile.scss +96 -0
- data/app/assets/stylesheets/application/test.scss +58 -0
- data/app/assets/stylesheets/application/test_run.scss +14 -5
- data/app/assets/stylesheets/application/timeline.scss +2 -4
- data/app/concerns/commit_synchronizer.rb +38 -2
- data/app/controllers/application_controller.rb +3 -0
- data/app/controllers/hooks_controller.rb +18 -0
- data/app/controllers/project_tests_controller.rb +46 -0
- data/app/helpers/commit_helper.rb +7 -0
- data/app/helpers/test_run_helper.rb +16 -0
- data/app/models/commit.rb +4 -0
- data/app/models/github/pull_request.rb +7 -7
- data/app/models/milestone.rb +1 -1
- data/app/models/run_tests_on_post_receive.rb +2 -0
- data/app/models/test.rb +4 -0
- data/app/models/test_result.rb +1 -1
- data/app/models/test_run.rb +25 -2
- data/app/views/layouts/_mobile_navigation.html.erb +100 -0
- data/app/views/layouts/application.html.erb +20 -10
- data/app/views/layouts/dashboard.html.erb +1 -1
- data/app/views/layouts/minimal.html.erb +1 -1
- data/app/views/layouts/naked_dashboard.html.erb +1 -1
- data/app/views/project_notification/test_run.html.erb +97 -120
- data/app/views/project_tests/_commits.html.erb +14 -0
- data/app/views/project_tests/index.html.erb +39 -0
- data/app/views/projects/_form.html.erb +6 -2
- data/config/application.rb +1 -2
- data/config/routes.rb +2 -0
- data/db/migrate/20151108221505_convert_pull_request_labels_to_array.rb +22 -0
- data/db/migrate/20151108223154_sync_body_also_for_pull_requests.rb +5 -0
- data/db/migrate/20151108233510_add_props_to_pull_requests.rb +5 -0
- data/db/structure.sql +10 -1
- data/houston.gemspec +4 -5
- data/lib/houston/version.rb +1 -1
- data/test/integration/web_hook_test.rb +7 -1
- data/test/unit/concerns/commit_synchronizer_test.rb +13 -0
- data/test/unit/models/pull_request_test.rb +17 -0
- data/vendor/assets/javascripts/showdown.js +2489 -0
- data/vendor/assets/javascripts/slideout.js +493 -0
- metadata +25 -29
- data/lib/tasks/config.rake +0 -255
- data/vendor/assets/javascripts/Markdown.Converter.js +0 -1412
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6aef236606e7963c5b5c25f937547b1e018785ef
|
4
|
+
data.tar.gz: 90fe22a11402775168fdecf5371238b2622987dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a71ad9e5148b88bf6fe5b23d69f05c1bf28b04ab50c442368e9b24bc133a2a6f1c5aa63aebd9182de8477b503ac1f1f776df3b0b1a37ad83986be63f1975bc1a
|
7
|
+
data.tar.gz: 0a8029b5aa27cb157ee31cad0843b5a613b3103816ead338d6b43e48689c746f9564c68ab241802342385b108de6ec541d821d9e7f72dc6e2480d844f8212d79
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
houston-core (0.5.
|
4
|
+
houston-core (0.5.5)
|
5
5
|
activerecord-import
|
6
6
|
activerecord-pluck_in_batches
|
7
7
|
addressable
|
8
|
-
backbone-rails (~> 1.0.0)
|
9
8
|
boblail-unfuddle
|
9
|
+
browser
|
10
10
|
bundler
|
11
11
|
cancan (~> 1.6.10)
|
12
12
|
codeclimate-test-reporter (= 0.4.1)
|
@@ -20,7 +20,7 @@ PATH
|
|
20
20
|
faraday-raise-errors (~> 0.2.0)
|
21
21
|
gemoji (~> 2.1.0)
|
22
22
|
googlecharts (~> 1.6.12)
|
23
|
-
handlebars_assets (~> 0.
|
23
|
+
handlebars_assets (~> 0.21.0)
|
24
24
|
houston-devise_ldap_authenticatable
|
25
25
|
houston-oauth-plugin
|
26
26
|
houston-vestal_versions
|
@@ -29,7 +29,7 @@ PATH
|
|
29
29
|
nested_editor_for
|
30
30
|
nokogiri (~> 1.6.6.2)
|
31
31
|
octokit (~> 4.1.0)
|
32
|
-
oj (~> 2.
|
32
|
+
oj (~> 2.13)
|
33
33
|
openxml-xlsx
|
34
34
|
pg (~> 0.18.3)
|
35
35
|
pg_search (~> 1.0.5)
|
@@ -39,12 +39,11 @@ PATH
|
|
39
39
|
rails (~> 4.1.13)
|
40
40
|
redcarpet (~> 3.3.2)
|
41
41
|
rufus-scheduler (~> 3.1.7)
|
42
|
-
rugged (~> 0.23.
|
42
|
+
rugged (~> 0.23.3)
|
43
43
|
sass-rails (~> 4.0.0)
|
44
44
|
simplecov (~> 0.9.1)
|
45
45
|
sprockets (~> 2.8)
|
46
46
|
strongbox (~> 0.7.2)
|
47
|
-
sugar-rails
|
48
47
|
thor
|
49
48
|
thread_safe (~> 0.3.5)
|
50
49
|
uglifier (>= 1.3.0)
|
@@ -86,8 +85,6 @@ GEM
|
|
86
85
|
addressable (2.3.8)
|
87
86
|
ansi (1.5.0)
|
88
87
|
arel (5.0.1.20140414130214)
|
89
|
-
backbone-rails (1.0.0.1)
|
90
|
-
rails (>= 3.0.0)
|
91
88
|
bcrypt (3.1.10)
|
92
89
|
bcrypt-ruby (3.1.5)
|
93
90
|
bcrypt (>= 3.1.3)
|
@@ -95,6 +92,7 @@ GEM
|
|
95
92
|
activesupport
|
96
93
|
builder
|
97
94
|
faraday (~> 0.8.8)
|
95
|
+
browser (1.0.1)
|
98
96
|
builder (3.2.2)
|
99
97
|
cancan (1.6.10)
|
100
98
|
capybara (2.5.0)
|
@@ -160,11 +158,11 @@ GEM
|
|
160
158
|
faraday
|
161
159
|
gemoji (2.1.0)
|
162
160
|
googlecharts (1.6.12)
|
163
|
-
handlebars_assets (0.
|
164
|
-
execjs (
|
165
|
-
multi_json
|
166
|
-
sprockets (>= 2.0.
|
167
|
-
tilt
|
161
|
+
handlebars_assets (0.21.0)
|
162
|
+
execjs (~> 2.0)
|
163
|
+
multi_json (~> 1.0)
|
164
|
+
sprockets (>= 2.0.0, < 4.0)
|
165
|
+
tilt (~> 1.2)
|
168
166
|
hashdiff (0.2.2)
|
169
167
|
highline (1.6.21)
|
170
168
|
hike (1.2.3)
|
@@ -185,7 +183,7 @@ GEM
|
|
185
183
|
domain_name (~> 0.5)
|
186
184
|
i18n (0.7.0)
|
187
185
|
json (1.8.3)
|
188
|
-
jwt (1.5.
|
186
|
+
jwt (1.5.2)
|
189
187
|
launchy (2.4.3)
|
190
188
|
addressable (~> 2.3)
|
191
189
|
libv8 (3.16.14.13)
|
@@ -207,9 +205,9 @@ GEM
|
|
207
205
|
multipart-post (1.2.0)
|
208
206
|
neat-rails (0.1.0)
|
209
207
|
nested_editor_for (0.1.0)
|
210
|
-
net-ldap (0.
|
208
|
+
net-ldap (0.12.0)
|
211
209
|
net-ssh (2.9.2)
|
212
|
-
netrc (0.
|
210
|
+
netrc (0.11.0)
|
213
211
|
nokogiri (1.6.6.2)
|
214
212
|
mini_portile (~> 0.6.0)
|
215
213
|
oauth (0.4.7)
|
@@ -221,14 +219,16 @@ GEM
|
|
221
219
|
rack (~> 1.2)
|
222
220
|
octokit (4.1.1)
|
223
221
|
sawyer (~> 0.6.0, >= 0.5.3)
|
224
|
-
oj (2.
|
225
|
-
open_xml_package (0.
|
222
|
+
oj (2.13.0)
|
223
|
+
open_xml_package (0.2.0.beta1)
|
226
224
|
nokogiri
|
225
|
+
ox
|
227
226
|
rubyzip (~> 1.1.0)
|
228
|
-
openxml-xlsx (0.1.
|
227
|
+
openxml-xlsx (0.1.2)
|
229
228
|
nokogiri
|
230
|
-
open_xml_package (= 0.
|
229
|
+
open_xml_package (= 0.2.0.beta1)
|
231
230
|
orm_adapter (0.5.0)
|
231
|
+
ox (2.2.2)
|
232
232
|
pg (0.18.3)
|
233
233
|
pg_search (1.0.5)
|
234
234
|
activerecord (>= 3.1)
|
@@ -305,8 +305,6 @@ GEM
|
|
305
305
|
sprockets (>= 2.8, < 4.0)
|
306
306
|
strongbox (0.7.2)
|
307
307
|
activerecord
|
308
|
-
sugar-rails (1.4.1)
|
309
|
-
railties (>= 3.0.0)
|
310
308
|
test_after_commit (0.4.1)
|
311
309
|
activerecord (>= 3.2)
|
312
310
|
therubyracer (0.12.2)
|
data/README.md
CHANGED
@@ -23,7 +23,7 @@ Houston is also extensible through **[Modules](https://github.com/houston/housto
|
|
23
23
|
To use Houston, you must have
|
24
24
|
|
25
25
|
- [Ruby 2.0+](https://www.ruby-lang.org/en/downloads)
|
26
|
-
- [Postgres 9.
|
26
|
+
- [Postgres 9.4+](http://www.postgresql.org/download)
|
27
27
|
|
28
28
|
##### Hello World
|
29
29
|
|
@@ -236,10 +236,13 @@ module Houston
|
|
236
236
|
push_shas.each { |sha| walker.push(sha) }
|
237
237
|
hide_shas.each { |sha| walker.hide(sha) }
|
238
238
|
|
239
|
-
|
240
|
-
|
241
|
-
|
239
|
+
results = []
|
240
|
+
walker.each_with_index do |commit, i|
|
241
|
+
release if i > 0 && i % 200 == 0
|
242
|
+
results.push yield commit
|
243
|
+
break if options[:limit] && (i + 1) >= options[:limit]
|
242
244
|
end
|
245
|
+
results
|
243
246
|
|
244
247
|
ensure
|
245
248
|
release
|
@@ -20,3 +20,12 @@ $ ->
|
|
20
20
|
project = $link.attr('data-project')
|
21
21
|
$context = $link.closest('#tickets')
|
22
22
|
e.preventDefault() if App.showTicket(number, project, $context: $context)
|
23
|
+
|
24
|
+
isMobile = $('html').hasClass('mobile')
|
25
|
+
|
26
|
+
if isMobile
|
27
|
+
slideout = new Slideout
|
28
|
+
panel: document.getElementById('body')
|
29
|
+
menu: document.getElementById('slideout_menu')
|
30
|
+
padding: 172
|
31
|
+
tolerance: 70
|
@@ -12,7 +12,7 @@ class @InfiniteScroll
|
|
12
12
|
@$window.scroll _.bind(@onScroll, @)
|
13
13
|
|
14
14
|
onScroll: ->
|
15
|
-
return if @$el.hasClass('loading')
|
15
|
+
return if @$el.hasClass('loading') or @$el.hasClass('done')
|
16
16
|
return unless @$el.is(':visible')
|
17
17
|
return unless @$window.scrollTop() >= (@$document.height() - @$window.height() - @offset)
|
18
18
|
|
@@ -23,9 +23,12 @@ class @InfiniteScroll
|
|
23
23
|
return unless xhr
|
24
24
|
|
25
25
|
@$el.addClass('loading')
|
26
|
-
xhr.done (html)=>
|
26
|
+
xhr.done (html, status, e)=>
|
27
27
|
@$el.removeClass('loading')
|
28
|
-
|
28
|
+
if e.status is 204
|
29
|
+
@$el.addClass('done')
|
30
|
+
else
|
31
|
+
@$el.append(html)
|
29
32
|
@success() if @success
|
30
33
|
xhr.fail =>
|
31
34
|
@$el.removeClass('loading')
|
@@ -31,7 +31,7 @@ class window.Ticket extends Backbone.Model
|
|
31
31
|
@commitsCollection ||= new Commits(@get('commits'), ticket: @)
|
32
32
|
|
33
33
|
activityStream: ->
|
34
|
-
@testingNotes().models.concat(@commits().models)
|
34
|
+
_.sortBy @testingNotes().models.concat(@commits().models), (item)-> item.get('createdAt')
|
35
35
|
|
36
36
|
|
37
37
|
parse: (ticket)->
|
@@ -26,7 +26,10 @@ window.App =
|
|
26
26
|
|
27
27
|
mdown: (markdown)->
|
28
28
|
return '' unless markdown
|
29
|
-
converter = new
|
29
|
+
converter = new showdown.Converter
|
30
|
+
literalMidWordUnderscores: true
|
31
|
+
strikethrough: true
|
32
|
+
ghCodeBlocks: true
|
30
33
|
html = converter.makeHtml(markdown)
|
31
34
|
App.emojify(html)
|
32
35
|
|
@@ -1,3 +1,7 @@
|
|
1
|
+
toDate = (timestamp)->
|
2
|
+
return timestamp if _.isDate(timestamp)
|
3
|
+
new Date(timestamp)
|
4
|
+
|
1
5
|
Handlebars.registerHelper 'formatDuration', (seconds)->
|
2
6
|
if seconds < Duration.HOUR
|
3
7
|
minutes = Math.floor(seconds / Duration.MINUTE)
|
@@ -14,25 +18,25 @@ Handlebars.registerHelper 'formatDuration', (seconds)->
|
|
14
18
|
|
15
19
|
Handlebars.registerHelper 'formatDate', (timestamp)->
|
16
20
|
format = d3.time.format('%a %b %-d')
|
17
|
-
format
|
21
|
+
format toDate(timestamp)
|
18
22
|
|
19
23
|
Handlebars.registerHelper 'formatDateWithYear', (timestamp)->
|
20
24
|
return "" unless timestamp
|
21
25
|
format = d3.time.format('%b %-d <span class="year">%Y</span>')
|
22
|
-
format
|
26
|
+
format toDate(timestamp)
|
23
27
|
|
24
28
|
Handlebars.registerHelper 'formatDateWithYear2', (timestamp)->
|
25
29
|
return "" unless timestamp
|
26
30
|
format = d3.time.format('%b %-d, %Y')
|
27
|
-
format
|
31
|
+
format toDate(timestamp)
|
28
32
|
|
29
33
|
Handlebars.registerHelper 'formatTime', (timestamp)->
|
30
34
|
format = d3.time.format('%a %b %-d, %Y %-I:%M%p')
|
31
|
-
format
|
35
|
+
format toDate(timestamp)
|
32
36
|
.replace(/[AP]M/, (str)-> str.toLowerCase()[0])
|
33
37
|
|
34
38
|
Handlebars.registerHelper 'formatTimeAgo', (timestamp)->
|
35
|
-
$.timeago
|
39
|
+
$.timeago toDate(timestamp)
|
36
40
|
|
37
41
|
Handlebars.registerHelper 'markdown', (markdown)-> App.mdown(markdown)
|
38
42
|
|
@@ -121,11 +125,11 @@ Handlebars.registerHelper 'timelineDate', (date)->
|
|
121
125
|
<span class="year">%Y</span>
|
122
126
|
</div>
|
123
127
|
"""
|
124
|
-
format
|
128
|
+
format toDate(date)
|
125
129
|
|
126
130
|
Handlebars.registerHelper 'timelineTime', (time)->
|
127
131
|
format = d3.time.format('<span class="timeline-event-time">%-I:%M%p</span>')
|
128
|
-
format
|
132
|
+
format toDate(time)
|
129
133
|
.replace(/[AP]M/, (str)-> str.toLowerCase()[0])
|
130
134
|
|
131
135
|
Handlebars.registerHelper 'timelineDateAfterGap', (date)->
|
@@ -137,7 +141,7 @@ Handlebars.registerHelper 'timeline', (events, options)->
|
|
137
141
|
if events.length > 0
|
138
142
|
html = '<div class="timeline">'
|
139
143
|
for event in events
|
140
|
-
date = App.truncateDate(
|
144
|
+
date = App.truncateDate(toDate(event.date || event.time))
|
141
145
|
html += Handlebars.helpers.timelineDateRange(lastDate, date)
|
142
146
|
html += options.fn(event)
|
143
147
|
lastDate = date
|
@@ -18,9 +18,9 @@
|
|
18
18
|
//= require jquery.timeago.js
|
19
19
|
//= require mousetrap
|
20
20
|
//= require nested_editor_for
|
21
|
-
//= require
|
22
|
-
//= require Markdown.Converter
|
21
|
+
//= require showdown
|
23
22
|
//= require md5
|
24
23
|
//= require neat
|
25
24
|
//= require alertify
|
26
25
|
//= require dropzone
|
26
|
+
//= require slideout
|
@@ -1,3 +1,99 @@
|
|
1
1
|
@media only screen and (max-width: 600px) {
|
2
2
|
#keyboard_shortcuts_button { display: none; }
|
3
3
|
}
|
4
|
+
|
5
|
+
html.mobile {
|
6
|
+
min-height: 100%;
|
7
|
+
|
8
|
+
body {
|
9
|
+
width: 100%;
|
10
|
+
height: 100%;
|
11
|
+
padding-top: 36px;
|
12
|
+
}
|
13
|
+
|
14
|
+
.project-banner {
|
15
|
+
top: 0;
|
16
|
+
}
|
17
|
+
|
18
|
+
.project-banner small {
|
19
|
+
display: block;
|
20
|
+
}
|
21
|
+
|
22
|
+
.project-navbar {
|
23
|
+
height: auto;
|
24
|
+
position: static;
|
25
|
+
padding: 0;
|
26
|
+
overflow: visible;
|
27
|
+
}
|
28
|
+
|
29
|
+
.project-navbar .nav > li {
|
30
|
+
float: none;
|
31
|
+
}
|
32
|
+
|
33
|
+
.nav .nav-label {
|
34
|
+
display: inline;
|
35
|
+
vertical-align: text-bottom;
|
36
|
+
}
|
37
|
+
|
38
|
+
#body {
|
39
|
+
background: white;
|
40
|
+
}
|
41
|
+
|
42
|
+
.navbar .nav {
|
43
|
+
margin: 0;
|
44
|
+
}
|
45
|
+
|
46
|
+
.slideout-menu {
|
47
|
+
position: fixed;
|
48
|
+
left: 0;
|
49
|
+
top: 36px;
|
50
|
+
bottom: 0;
|
51
|
+
right: 0;
|
52
|
+
z-index: 0;
|
53
|
+
width: 172px;
|
54
|
+
overflow-y: auto;
|
55
|
+
-webkit-overflow-scrolling: touch;
|
56
|
+
display: none;
|
57
|
+
background: #333;
|
58
|
+
padding: 20px 0 0 0;
|
59
|
+
|
60
|
+
.nav {
|
61
|
+
background: #333;
|
62
|
+
padding: 0;
|
63
|
+
margin: 0 0 0 6px;
|
64
|
+
}
|
65
|
+
|
66
|
+
.nav > li.current-project > a {
|
67
|
+
color: white;
|
68
|
+
}
|
69
|
+
|
70
|
+
.nav > li > a,
|
71
|
+
.nav > li.current {
|
72
|
+
padding: 5px 15px;
|
73
|
+
color: #999;
|
74
|
+
.nav-icon svg * { fill: #999; }
|
75
|
+
}
|
76
|
+
|
77
|
+
.nav > li.current {
|
78
|
+
background: #666;
|
79
|
+
color: white;
|
80
|
+
.nav-icon svg * { fill: white; }
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
.slideout-panel {
|
85
|
+
position: relative;
|
86
|
+
z-index: 1;
|
87
|
+
}
|
88
|
+
|
89
|
+
&.slideout-open,
|
90
|
+
&.slideout-open body,
|
91
|
+
&.slideout-open .slideout-panel {
|
92
|
+
overflow: hidden;
|
93
|
+
height: 100%;
|
94
|
+
}
|
95
|
+
|
96
|
+
&.slideout-open .slideout-menu {
|
97
|
+
display: block;
|
98
|
+
}
|
99
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
.project-test-history {
|
2
|
+
h3 {
|
3
|
+
font-weight: 200;
|
4
|
+
line-height: 1em;
|
5
|
+
margin: 0.66em 0 0;
|
6
|
+
}
|
7
|
+
h3 b { color: #777; }
|
8
|
+
|
9
|
+
max-width: 860px;
|
10
|
+
padding-right: 60px;
|
11
|
+
margin: 0 auto;
|
12
|
+
|
13
|
+
.project-test-totals {
|
14
|
+
margin: 1em 0 2em;
|
15
|
+
dd, dt { display: inline-block; }
|
16
|
+
dd { font-weight: 600; margin: 0 0.33em 0 0; }
|
17
|
+
dt { font-weight: 400; margin: 0 0.66em 0 0; }
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
.timeline .timeline-event.project-test-commit {
|
22
|
+
padding-left: 45px;
|
23
|
+
text-indent: -25px;
|
24
|
+
padding-right: 100px;
|
25
|
+
}
|
26
|
+
|
27
|
+
.project-test-commit {
|
28
|
+
.project-test-commit-author {
|
29
|
+
display: inline-block;
|
30
|
+
text-indent: 0;
|
31
|
+
padding: 0;
|
32
|
+
margin: 0;
|
33
|
+
vertical-align: top;
|
34
|
+
}
|
35
|
+
|
36
|
+
.project-test-commit-message {
|
37
|
+
position: relative;
|
38
|
+
top: 2px;
|
39
|
+
}
|
40
|
+
|
41
|
+
.project-test-status {
|
42
|
+
position: absolute;
|
43
|
+
display: inline-block;
|
44
|
+
right: 0;
|
45
|
+
padding: 2px 4px;
|
46
|
+
text-indent: 0;
|
47
|
+
text-align: right;
|
48
|
+
text-transform: uppercase;
|
49
|
+
font-weight: 500 !important;
|
50
|
+
|
51
|
+
&.project-test-status-untested { color: #ddd; }
|
52
|
+
&.project-test-status-pending { color: #888; }
|
53
|
+
&.project-test-status-aborted { color: #ddd; }
|
54
|
+
&.project-test-status-unknown { color: #888; }
|
55
|
+
&.project-test-status-pass { color: #5db64c; }
|
56
|
+
&.project-test-status-fail { color: #e24e32; }
|
57
|
+
}
|
58
|
+
}
|