ey-pro-cli 0.0.10 → 0.0.11
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ey_pro_cli.rb +14 -6
- data/lib/ey_pro_cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: defe6750674ddd946f92182eee60783585e8e50d
|
|
4
|
+
data.tar.gz: 968dab5bdcc881322578fc950f3dfe47769af676
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 400884f9613419bccb16c1c03296eaaee46817a1ef9971af11af12d288bb4999661bfc8322841b17cb54ec898e604d713ab9e30d52fbe5498b67945a25276c5a
|
|
7
|
+
data.tar.gz: e456158c4115f0f56ac3ec2a98956e0ac852b9967c21d737fd7f69e736a84c62158c62eafb9def4af1a5bb0bb0e21f1c56025c4569378051bd624eaaadde46ec
|
data/Gemfile.lock
CHANGED
data/lib/ey_pro_cli.rb
CHANGED
|
@@ -12,8 +12,6 @@ require File.expand_path(File.dirname(__FILE__) + '/ey_pro_cli/version')
|
|
|
12
12
|
require File.expand_path(File.dirname(__FILE__) + '/vendor/core/ey-core')
|
|
13
13
|
|
|
14
14
|
class EyProCli < Thor
|
|
15
|
-
class InvalidEnvironment < RuntimeError; end
|
|
16
|
-
|
|
17
15
|
class << self
|
|
18
16
|
attr_accessor :core_file
|
|
19
17
|
|
|
@@ -80,8 +78,18 @@ class EyProCli < Thor
|
|
|
80
78
|
|
|
81
79
|
def deploy
|
|
82
80
|
check_for_updates unless options["no-update-check"]
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
operator, environment = core_operator_and_environment_for(options)
|
|
82
|
+
unless operator.is_a?(Ey::Core::Client)
|
|
83
|
+
abort <<-EOF
|
|
84
|
+
Found account #{operator.name} but requested account #{options[:account]}.
|
|
85
|
+
Use the ID of the account instead of the name.
|
|
86
|
+
This can be retrieved by running "ey-pro accounts".
|
|
87
|
+
EOF
|
|
88
|
+
.red unless operator.name == options[:account] || operator.id == options[:account]
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
unless environment
|
|
92
|
+
abort "Unable to locate environment #{options[:environment]} in #{operator.name}".red
|
|
85
93
|
end
|
|
86
94
|
app = core_application_for(options)
|
|
87
95
|
|
|
@@ -167,8 +175,8 @@ Current Version: #{current_version}
|
|
|
167
175
|
options[:account] ? core_account_for(options) : core_client
|
|
168
176
|
end
|
|
169
177
|
|
|
170
|
-
def
|
|
171
|
-
operator(options).environments.first(name: options[:environment])
|
|
178
|
+
def core_operator_and_environment_for(options={})
|
|
179
|
+
[operator(options), operator(options).environments.first(name: options[:environment])]
|
|
172
180
|
end
|
|
173
181
|
|
|
174
182
|
def core_application_for(options={})
|
data/lib/ey_pro_cli/version.rb
CHANGED