shapeup-cli 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6447a0d1f215f3783af0c866c6fb17d8cc1e68730255d1e8e1702ce622fd514a
4
- data.tar.gz: 3cf15b4881fd01dec7fae24260ec46979c2292b518cc8bca7acc775b6be966a0
3
+ metadata.gz: 22d9ef55510661ad0f2d548a0357114f8237e9b5566d20f520a51ad9a2f5746e
4
+ data.tar.gz: 484179fcc9f4e9bc4e2202998a607b6dc77c82367349d17dfe4fbd09af271326
5
5
  SHA512:
6
- metadata.gz: 778fe7a8e86453e69ca8c79cfce6020b287f5304356a2cee23555d4c215eb88f6d6257bb43ca63cf302c42daf30f792243f7ba6d5a4420b7c6008ae2a9d05118
7
- data.tar.gz: 4fd556546a7bc427fa488c43500b4f48a8c86cff85512ea1d9363af6fc2fa892c091f67b032a803a0d04e9dc84522cc43ba67507ea2766cae048157482116b62
6
+ metadata.gz: 37e5a48898edc5529727b0453a227160e0da6ea5ccb2f936deb7ede8ee7013575104e644f0123538ada478ccc48c53e60976422efa32e6a00e1f22ac737c2203
7
+ data.tar.gz: 2c15f6eadbb18f4626cc95d261227d3a3498f7b617da76f8b2dae5a0f59a48511e7eb1557873bc4649749361faef8de10cc7c880b79215a4a57d0539e4a6ccc8
@@ -202,8 +202,14 @@ module ShapeupCli
202
202
  end
203
203
 
204
204
  def connector_running_for?(handle)
205
- commands = IO.popen([ "pgrep", "-lf", "shapeup connect" ], err: File::NULL, &:readlines)
206
- commands.any? { |command| command.match?(/--as @?#{Regexp.escape(handle)}\b/) || !command.include?("--as") }
205
+ connector_commands.any? do |command|
206
+ named = command[/--(?:as|profile)[ =]@?([\w.-]+)/, 1] || command[/SHAPEUP_PROFILE=([\w.-]+)/, 1]
207
+ named.nil? || named == handle
208
+ end
209
+ end
210
+
211
+ def connector_commands
212
+ IO.popen([ "pgrep", "-lf", "shapeup.* connect" ], err: File::NULL, &:readlines)
207
213
  end
208
214
 
209
215
  def pass(name, message) = Check.new(name: name, status: :pass, message: message)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ShapeupCli
4
- VERSION = "0.12.0"
4
+ VERSION = "0.12.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shapeup-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ShapeUp