shipit-engine 0.12.0 → 0.12.1
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/shipit.js.coffee +18 -11
- data/app/jobs/shipit/continuous_delivery_job.rb +1 -0
- data/app/models/shipit/github_status.rb +15 -0
- data/app/views/layouts/shipit.html.erb +17 -0
- data/app/views/shipit/stacks/show.html.erb +0 -1
- data/lib/shipit/version.rb +1 -1
- data/lib/tasks/cron.rake +1 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a30e953800b45a4493e91c7e8caa2ad53f3dc447
|
4
|
+
data.tar.gz: 16b5dabad1863d6982dbd8736152e37e19a3a671
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb4027d810267d4c983dd26fa0a602af2db1a5015e3371b2b02e2d8d8636d791a596517a5528df4c89b9d95cc6b638a2ee7676a14215eae60fa2cfa9b8e67d27
|
7
|
+
data.tar.gz: 10ff1beb9b067253a7814300ec69b9f7ef7e3c312d3c3b2c122183d0d90a0a97e84f8f267249dc393866fc9374986ce8b0c874d8a97d040e060c64d872ced214
|
@@ -20,19 +20,26 @@
|
|
20
20
|
$(document).on 'click', '.disabled, .btn--disabled', (event) ->
|
21
21
|
event.preventDefault()
|
22
22
|
|
23
|
-
$(document).on 'click', '.
|
23
|
+
$(document).on 'click', '.banner__dismiss', (event) ->
|
24
24
|
$(event.target).closest('.banner').addClass('hidden')
|
25
|
+
|
26
|
+
$(document).on 'click', '.enable-notifications .banner__dismiss', (event) ->
|
25
27
|
localStorage.setItem("dismissed-enable-notifications", true)
|
26
28
|
|
29
|
+
$(document).on 'click', '.github-status .banner__dismiss', (event) ->
|
30
|
+
localStorage.setItem("dismissed-github-status", true)
|
31
|
+
|
27
32
|
jQuery ->
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
$notificationNotice.
|
37
|
-
|
33
|
+
unless(localStorage.getItem("dismissed-enable-notifications"))
|
34
|
+
$notificationNotice = $('.enable-notifications')
|
35
|
+
|
36
|
+
if $.notifyCheck() == $.NOTIFY_NOT_ALLOWED
|
37
|
+
$button = $notificationNotice.find('button')
|
38
|
+
$button.on 'click', ->
|
39
|
+
$.notifyRequest()
|
40
|
+
$notificationNotice.addClass('hidden')
|
41
|
+
$notificationNotice.removeClass('hidden')
|
42
|
+
|
43
|
+
unless(localStorage.getItem("dismissed-github-status"))
|
44
|
+
$('.github-status').removeClass('hidden')
|
38
45
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Shipit
|
2
|
+
module GithubStatus
|
3
|
+
CACHE_KEY = 'github::status'.freeze
|
4
|
+
|
5
|
+
class << self
|
6
|
+
def status
|
7
|
+
Rails.cache.read(CACHE_KEY)
|
8
|
+
end
|
9
|
+
|
10
|
+
def refresh_status
|
11
|
+
Rails.cache.write(CACHE_KEY, Shipit.github_api.github_status)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -26,6 +26,23 @@
|
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
|
29
|
+
<% github_status = Shipit::GithubStatus.status
|
30
|
+
unless github_status.nil? || github_status[:status] == 'good' %>
|
31
|
+
<div class="banner github-status banner--orange hidden">
|
32
|
+
<div class="banner__inner wrapper">
|
33
|
+
<div class="banner__content">
|
34
|
+
<h2 class="banner__title">GitHub is having issues</h2>
|
35
|
+
"<i><%= github_status[:body] %></i>"
|
36
|
+
<% unless github_status[:last_updated].nil? %>
|
37
|
+
<%= time_ago_in_words(github_status[:last_updated]) %> ago
|
38
|
+
<% end %>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<a class="banner__dismiss">×</a>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
<% end %>
|
45
|
+
|
29
46
|
<header class="header">
|
30
47
|
<%= link_to "Shipit v#{Shipit::VERSION}", "https://github.com/Shopify/shipit-engine/tree/v#{Shipit::VERSION}", class: 'powered-by' %>
|
31
48
|
<div class="wrapper">
|
data/lib/shipit/version.rb
CHANGED
data/lib/tasks/cron.rake
CHANGED
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shipit-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -624,6 +624,7 @@ files:
|
|
624
624
|
- app/models/shipit/duration.rb
|
625
625
|
- app/models/shipit/ephemeral_commit_checks.rb
|
626
626
|
- app/models/shipit/github_hook.rb
|
627
|
+
- app/models/shipit/github_status.rb
|
627
628
|
- app/models/shipit/hook.rb
|
628
629
|
- app/models/shipit/membership.rb
|
629
630
|
- app/models/shipit/missing_status.rb
|