git-story-workflow 0.3.5 → 0.4.0

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
- SHA1:
3
- metadata.gz: afbc0ec1026b7efc6444cac3bfe109237e4bed31
4
- data.tar.gz: 30c494fc6cbf366f7d8a00ee0a7e3c3532d3e6cb
2
+ SHA256:
3
+ metadata.gz: a975fdfb1bf6f4abff364ef434a902affe80e4e203da8d179cf7c1ac7caf874a
4
+ data.tar.gz: d985c7b4edd4b010d5b00083478d2e21ca05ec6a8ee0a8b087e2c47088632e96
5
5
  SHA512:
6
- metadata.gz: f4764c0e9dddfab11351794a7fb71f7e1bd5916e67c8ef37be38bd0ebceed372e1cc2d0ce8fa97b425a0f8c981e2cf5b3da7b9e821215f4f89bae430435911da
7
- data.tar.gz: 6f041023d6cdf3b186850f71ed74775dd19ba997aa751a3ca3589761ba9d5759abe05bffd953e0ec9f70b165e8d641a194710b559eebd92d06d53cc204ef9f9f
6
+ metadata.gz: 5263dcc37e6c621a2b340d07ae62417aa0f209fad066f2861a3be6ac9cae945c4f1d93e545cc6db9ec5610b954f1e7a2a6be26c91c5eaf6020be74649e0cd3e1
7
+ data.tar.gz: ae8b8f9a4f94dda45d8db31826a12cae0ce66471b3920d7b78b87d98555a0193c351f40508cd3a19795a48a67de1d72be36c51b6be3cf5d854a4df8b2448aa78
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5
1
+ 0.4.0
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: git-story-workflow 0.3.5 ruby lib
2
+ # stub: git-story-workflow 0.4.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "git-story-workflow".freeze
6
- s.version = "0.3.5"
6
+ s.version = "0.4.0"
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]
10
10
  s.authors = ["Florian Frank".freeze]
11
- s.date = "2018-02-12"
11
+ s.date = "2018-06-29"
12
12
  s.description = "Gem abstracting a git workflow\u2026".freeze
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.executables = ["git-story".freeze]
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.homepage = "http://flori.github.com/git-story-workflow".freeze
18
18
  s.licenses = ["Apache-2.0".freeze]
19
19
  s.rdoc_options = ["--title".freeze, "Git-story-workflow".freeze, "--main".freeze, "README.md".freeze]
20
- s.rubygems_version = "2.6.14".freeze
20
+ s.rubygems_version = "2.7.6".freeze
21
21
  s.summary = "Gem abstracting a git workflow".freeze
22
22
  s.test_files = ["spec/git/story/app_spec.rb".freeze, "spec/spec_helper.rb".freeze]
23
23
 
data/lib/git/story/app.rb CHANGED
@@ -6,7 +6,6 @@ class Git::Story::App
6
6
  include Term::ANSIColor
7
7
  end
8
8
 
9
- include Tins::GO
10
9
  include Git::Story::Utils
11
10
  extend Git::Story::Utils
12
11
  include ComplexConfig::Provider::Shortcuts
@@ -92,20 +91,30 @@ class Git::Story::App
92
91
  end
93
92
  end
94
93
 
95
- command doc: '[BRANCH] display build status of branch'
96
- def build_status(branch = current(check: false))
94
+ command doc: '[BRANCH] display test status of branch'
95
+ def test_status(branch = current(check: false))
97
96
  auth_token = complex_config.story.semaphore_auth_token
98
- project = complex_config.story.semaphore_project
97
+ project = complex_config.story.semaphore_test_project
99
98
  url = "https://semaphoreci.com/api/v1/projects/#{project}/#{branch}/status?auth_token=#{auth_token}"
100
99
  Git::Story::SemaphoreResponse.get(url, debug: @debug)
101
100
  rescue => e
102
101
  "Getting #{url.inspect} => #{e.class}: #{e}".red
103
102
  end
104
103
 
104
+ command doc: '[BRANCH] display docker build status of branch'
105
+ def docker_status
106
+ auth_token = complex_config.story.semaphore_auth_token
107
+ project = complex_config.story.semaphore_docker_project
108
+ url = "https://semaphoreci.com/api/v1/projects/#{project}/docker/status?auth_token=#{auth_token}"
109
+ Git::Story::SemaphoreResponse.get(url, debug: @debug)
110
+ rescue => e
111
+ "Getting #{url.inspect} => #{e.class}: #{e}".red
112
+ end
113
+
105
114
  command doc: '[SERVER] display deploy status of branch'
106
115
  def deploy_status(server = complex_config.story.semaphore_default_server)
107
116
  auth_token = complex_config.story.semaphore_auth_token
108
- project = complex_config.story.semaphore_project
117
+ project = complex_config.story.semaphore_docker_project
109
118
  url = "https://semaphoreci.com/api/v1/projects/#{project}/servers/#{server}?auth_token=#{auth_token}"
110
119
  server = Git::Story::SemaphoreResponse.get(url, debug: @debug)
111
120
  deploys = server.deploys
@@ -120,13 +129,28 @@ class Git::Story::App
120
129
  Branch: #{server.branch_name&.color('#ff5f00')}
121
130
  Semaphore: #{server.server_url}
122
131
  Strategy: #{server.strategy}
123
- Upcoming: #{upcoming}
124
- Current: #{current}
132
+ Upcoming:
133
+ #{upcoming}
134
+ Current:
135
+ #{current}
125
136
  end
126
137
  rescue => e
127
138
  "Getting #{url.inspect} => #{e.class}: #{e}".red
128
139
  end
129
140
 
141
+ command doc: '[BRANCH] display build status for branch'
142
+ def build_status(branch = current(check: false))
143
+ [
144
+ "Test Status".bold,
145
+ test_status(branch) || 'n/a',
146
+ "Docker Status".bold,
147
+ docker_status || 'n/a',
148
+ "Deploy Status".bold,
149
+ deploy_status || 'n/a',
150
+ ] * "\n\n"
151
+ end
152
+
153
+
130
154
  command doc: '[STORY_ID] fetch status of current story'
131
155
  def status(story_id = current(check: true)&.[](/_(\d+)\z/, 1)&.to_i)
132
156
  if story = fetch_story(story_id)
@@ -1,6 +1,6 @@
1
1
  module Git::Story
2
2
  # Git::Story version
3
- VERSION = '0.3.5'
3
+ VERSION = '0.4.0'
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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-story-workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-12 00:00:00.000000000 Z
11
+ date: 2018-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  requirements: []
194
194
  rubyforge_project:
195
- rubygems_version: 2.6.14
195
+ rubygems_version: 2.7.6
196
196
  signing_key:
197
197
  specification_version: 4
198
198
  summary: Gem abstracting a git workflow