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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09d8024d7376c0cf166225a45df8228dabc6ca84bbf2c70c157b0c2181989e3a'
4
- data.tar.gz: 317db6435b9298573f50637d4fd4bd1fadb854e43bca9bb46814e2044b90373f
3
+ metadata.gz: bc606f61e3a00656ba76627a911e7d9d3488054fb0d5a712855e8a692db7b1d0
4
+ data.tar.gz: 3100f94801e2b34db6051f167d0be9387ea794fbbe18257bc679ed4d9eb5773d
5
5
  SHA512:
6
- metadata.gz: d97e9e54e2bfe9a89f2ccc2b03cde0f6eafe1642848990e0ad6bdfa0bf6499c307b22a13cd07f6e58756dab6b4137729db065b8d8baadf7552a92f48c256f106
7
- data.tar.gz: 81280ea0c361386a0fd418486ecffeee64e405c27c477170bffcb421e779e67fdeaee24bb4fd7d5a9b7173f077f0a1e6c8bb5f1f7756853d4159ec52fc344f5f
6
+ metadata.gz: '08fbe59689f275585d3e55604a61e258e93c7cbe047f2f32a69e39105eeb6f0dc96490253cb9e3f8f370bef6cd4ef05b9a8e5aa8ee2838d6fa2d81754a78f5ad'
7
+ data.tar.gz: 7f99546ebec6cc7060631805b0b27aadd88d4b07c2712dc0aa79cbb2a0445f0561ed06d7735a042e42c8d2710a5ab628c95fa5708b3ffe0b706d914c74912f1e
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: git-story-workflow 0.5.1 ruby lib
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.1"
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]
@@ -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 =
@@ -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 <<
@@ -1,6 +1,6 @@
1
1
  module Git::Story
2
2
  # Git::Story version
3
- VERSION = '0.5.1'
3
+ VERSION = '0.5.2'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-story-workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank