groundskeeper-bitcore 0.19.0 → 0.20.1

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: e7dcfaed6f571874111c1ad58ae2bbbd584ae2d55f65310ac6440b77488f066b
4
- data.tar.gz: 48117df263a168b70c69923bed84fd3253528c799c3115f4ef951c5822ded61a
3
+ metadata.gz: 9c63f8d93bd57e38a1764d916553986fdf2fe2bccdade8033600cb861e35f10a
4
+ data.tar.gz: 7e22cb9cf55bcfa7e9ce2adc2782c1d2441163a3b61b09ad8018c14f553812e2
5
5
  SHA512:
6
- metadata.gz: aca1a48ad5c22b23d123d39a4d24c840100d9e31ea16c0694cae3cf983261526fae1157e9bcb198cd52c092466f8360e6d12337f2201d08356366a0055bbcf21
7
- data.tar.gz: b2cd407005039a60bf1b034c94f85f3b53dcd624d44a47ad5682634339a2b6dace1432091bdae3a6fd9c94586bb9af624a0628f904c90d66f54974fb97616c04
6
+ metadata.gz: e90a7e56fc9c298ca60490b75653c937110769a1f06cf4d652c4076e0d754d5ea33ddf4e687e2679400eadb4930843dfaeb1c23e8903a2aa5aadc2242d451d14
7
+ data.tar.gz: 3af293bd0c9e94dd61010c441b3b378ee8f5a4c7b93e2df1bb81d1fc641ee8e10d98eb7109cd96a7c31727810a3b87b7c26738eea965a7217e5840ae5f2fcbae
@@ -5,6 +5,7 @@ require "thor"
5
5
  module Groundskeeper
6
6
  # Bootstrap this as a Thor application.
7
7
  class Application < Thor
8
+ include Thor::Actions
8
9
  attr_reader :commands
9
10
 
10
11
  class_option :simulate, desc: "Simulate mina"
@@ -95,7 +95,7 @@ module Groundskeeper
95
95
  # rubocop:disable Metrics/MethodLength,Metrics/AbcSize
96
96
  def info(options = {})
97
97
  return unrecognized_version unless version_file.exists?
98
- return unless check_groundskeeper_version
98
+ return groundskeeper_outdated unless check_groundskeeper_version
99
99
 
100
100
  Executable.verbose = options[:verbose]
101
101
  pull_project_details
@@ -119,7 +119,7 @@ module Groundskeeper
119
119
 
120
120
  return missing_jira_credentials unless jira.credentials?
121
121
  return missing_bitbucket_credentials unless bitbucket.credentials?
122
- return unless check_groundskeeper_version
122
+ return groundskeeper_outdated unless check_groundskeeper_version
123
123
  return unrecognized_version unless version_file.rails?
124
124
 
125
125
  version_file.create_initial_version! unless version_file.exists?
@@ -143,7 +143,7 @@ module Groundskeeper
143
143
  # :nocov:
144
144
  def predeploy(options = {})
145
145
  return unrecognized_version unless version_file.exists?
146
- return unless check_groundskeeper_version
146
+ return groundskeeper_outdated unless check_groundskeeper_version
147
147
 
148
148
  Executable.verbose = options[:verbose]
149
149
  pull_project_details
@@ -160,7 +160,7 @@ module Groundskeeper
160
160
  return missing_jira_credentials unless jira.credentials?
161
161
  return missing_sentry_credentials unless sentry.credentials?
162
162
  return missing_slack_credentials unless slack.credentials?
163
- return unless check_groundskeeper_version
163
+ return groundskeeper_outdated unless check_groundskeeper_version
164
164
  return unable_to_ssh unless ssh.can_connect?
165
165
 
166
166
  Executable.verbose = options[:verbose]
@@ -204,7 +204,6 @@ module Groundskeeper
204
204
  end
205
205
  end
206
206
 
207
- # rubocop:disable Metrics/MethodLength
208
207
  def check_groundskeeper_version
209
208
  @check_groundskeeper_version ||= begin
210
209
  console.say("Groundskeeper version #{Groundskeeper::VERSION}\n\n",
@@ -213,19 +212,24 @@ module Groundskeeper
213
212
 
214
213
  return true unless SemanticVersion.new(latest_version) > VERSION
215
214
 
216
- question = <<~TEXT.squish
217
- Groundskeeper is outdated,
218
- would you like the latest version installed?
219
- TEXT
220
-
221
- response = console.ask(question, :red, limited_to: %w[yes no])
222
-
223
- return true if response == "no"
215
+ return false unless install_latest_groundskeeper?
224
216
 
225
217
  console.run("gem install groundskeeper-bitcore")
218
+
219
+ true
226
220
  end
227
221
  end
228
- # rubocop:enable Metrics/MethodLength
222
+
223
+ # :nocov:
224
+ def install_latest_groundskeeper?
225
+ question = <<~TEXT.squish
226
+ Groundskeeper is outdated,
227
+ would you like the latest version installed?
228
+ TEXT
229
+
230
+ console.ask(question, :red, limited_to: %w[yes no]) == "yes"
231
+ end
232
+ # :nocov:
229
233
 
230
234
  def announce_latest_tag
231
235
  console.say(
@@ -334,6 +338,10 @@ module Groundskeeper
334
338
  )
335
339
  end
336
340
 
341
+ def groundskeeper_outdated
342
+ console.say("Groundskeeper outdated. Install the latest version.", :red)
343
+ end
344
+
337
345
  def missing_bitbucket_credentials
338
346
  console.say(
339
347
  "Please configure your Bitbucket environment variables.",
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Groundskeeper
4
- VERSION = "0.19.0"
4
+ VERSION = "0.20.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groundskeeper-bitcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BIT Core
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - certs/ericcf.pem
12
- date: 2020-10-09 00:00:00.000000000 Z
12
+ date: 2020-12-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jira-ruby