git-story-workflow 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/git-story-workflow.gemspec +2 -2
- data/lib/git/story/app.rb +5 -5
- data/lib/git/story/semaphore.rb +20 -0
- data/lib/git/story/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc606f61e3a00656ba76627a911e7d9d3488054fb0d5a712855e8a692db7b1d0
|
4
|
+
data.tar.gz: 3100f94801e2b34db6051f167d0be9387ea794fbbe18257bc679ed4d9eb5773d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08fbe59689f275585d3e55604a61e258e93c7cbe047f2f32a69e39105eeb6f0dc96490253cb9e3f8f370bef6cd4ef05b9a8e5aa8ee2838d6fa2d81754a78f5ad'
|
7
|
+
data.tar.gz: 7f99546ebec6cc7060631805b0b27aadd88d4b07c2712dc0aa79cbb2a0445f0561ed06d7735a042e42c8d2710a5ab628c95fa5708b3ffe0b706d914c74912f1e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.2
|
data/git-story-workflow.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: git-story-workflow 0.5.
|
2
|
+
# stub: git-story-workflow 0.5.2 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "git-story-workflow".freeze
|
6
|
-
s.version = "0.5.
|
6
|
+
s.version = "0.5.2"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
data/lib/git/story/app.rb
CHANGED
@@ -94,7 +94,7 @@ class Git::Story::App
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
command doc: '[BRANCH] display test status of branch'
|
97
|
+
command doc: '[BRANCH] display test status of branch, -n SECONDS refreshes'
|
98
98
|
def test_status(branch = current(check: false))
|
99
99
|
url = nil
|
100
100
|
watch do
|
@@ -107,7 +107,7 @@ class Git::Story::App
|
|
107
107
|
"Getting #{url.inspect} => #{e.class}: #{e}".red
|
108
108
|
end
|
109
109
|
|
110
|
-
command doc: '[BRANCH] display docker build status of branch'
|
110
|
+
command doc: '[BRANCH] display docker build status of branch, -n SECONDS refreshes'
|
111
111
|
def docker_status
|
112
112
|
url = nil
|
113
113
|
watch do
|
@@ -120,7 +120,7 @@ class Git::Story::App
|
|
120
120
|
"Getting #{url.inspect} => #{e.class}: #{e}".red
|
121
121
|
end
|
122
122
|
|
123
|
-
command doc: '[SERVER] display deploy status of branch'
|
123
|
+
command doc: '[SERVER] display deploy status of branch, -n SECONDS refreshes'
|
124
124
|
def deploy_status(server = complex_config.story.semaphore_default_server)
|
125
125
|
url = nil
|
126
126
|
watch do
|
@@ -150,7 +150,7 @@ class Git::Story::App
|
|
150
150
|
"Getting #{url.inspect} => #{e.class}: #{e}".red
|
151
151
|
end
|
152
152
|
|
153
|
-
command doc: '[BRANCH] display build status for branch'
|
153
|
+
command doc: '[BRANCH] display build status for branch, -n SECONDS refreshes'
|
154
154
|
def build_status(branch = current(check: false))
|
155
155
|
watch do
|
156
156
|
[
|
@@ -165,7 +165,7 @@ class Git::Story::App
|
|
165
165
|
end
|
166
166
|
|
167
167
|
|
168
|
-
command doc: '[STORY_ID] fetch status of current story'
|
168
|
+
command doc: '[STORY_ID] fetch status of current story, -n SECONDS refreshes'
|
169
169
|
def status(story_id = current(check: true)&.[](/_(\d+)\z/, 1)&.to_i)
|
170
170
|
if story = fetch_story(story_id)
|
171
171
|
color_state =
|
data/lib/git/story/semaphore.rb
CHANGED
@@ -86,6 +86,25 @@ class Git::Story::SemaphoreResponse < JSON::GenericObject
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
+
def infobar_style
|
90
|
+
case
|
91
|
+
when passed?, pending?
|
92
|
+
{
|
93
|
+
done_fg_color: '#005f00',
|
94
|
+
done_bg_color: '#00d700',
|
95
|
+
todo_fg_color: '#00d700',
|
96
|
+
todo_bg_color: '#005f00',
|
97
|
+
}
|
98
|
+
else
|
99
|
+
{
|
100
|
+
done_fg_color: '#5f0000',
|
101
|
+
done_bg_color: '#d70000',
|
102
|
+
todo_fg_color: '#d70000',
|
103
|
+
todo_bg_color: '#5f0000',
|
104
|
+
}
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
89
108
|
def to_s
|
90
109
|
r = case
|
91
110
|
when pending? && building?
|
@@ -110,6 +129,7 @@ class Git::Story::SemaphoreResponse < JSON::GenericObject
|
|
110
129
|
current: duration_seconds,
|
111
130
|
total: total_seconds,
|
112
131
|
message: ' %l %c/%t seconds ',
|
132
|
+
style: infobar_style,
|
113
133
|
output: r
|
114
134
|
).update
|
115
135
|
r <<
|
data/lib/git/story/version.rb
CHANGED