gclouder 0.2.1 → 0.2.2
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/lib/gclouder/gcloud.rb +8 -2
- data/lib/gclouder/resources/functions/function.rb +1 -3
- data/lib/gclouder/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e039f368665196da73655cf8e51becef1bba3d7
|
4
|
+
data.tar.gz: c631c92978983f3719396d71bb2a38d6d94c25bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3c2607bdcad5b3dd679f1ac292344611f2191ff2e5490e238fecfd7bf0422efc8cae3e03be0b995d42aa1a34a397758c527ae4c8cb3c0e69abe97a5ee0f5a82
|
7
|
+
data.tar.gz: e2aae91b8db4cefc1f042b4a6055cfb81614b9b622804b899b7667280634b7ef27a3d2684e1b35b91f8765ad1af88eaf90f9db419529bf5db53efb1b488cd7f5
|
data/lib/gclouder/gcloud.rb
CHANGED
@@ -12,7 +12,7 @@ module GClouder
|
|
12
12
|
klass.extend GCloud
|
13
13
|
end
|
14
14
|
|
15
|
-
def gcloud(command, force: false, failure: true, silent: false, project_id: nil)
|
15
|
+
def gcloud(command, force: false, failure: true, silent: false, project_id: nil, config_relative: false)
|
16
16
|
project_id = verify(project_id)
|
17
17
|
|
18
18
|
GClouder::Project::ID.switch(project_id)
|
@@ -23,7 +23,13 @@ module GClouder
|
|
23
23
|
return
|
24
24
|
end
|
25
25
|
|
26
|
-
|
26
|
+
if config_relative
|
27
|
+
Dir.chdir(File.dirname(GClouder::Config::CLIArgs.cli_args[:config])) do
|
28
|
+
result = shell("gcloud --quiet --format json --project=#{project_id} #{command}", failure: failure, silent: silent)
|
29
|
+
end
|
30
|
+
else
|
31
|
+
result = shell("gcloud --quiet --format json --project=#{project_id} #{command}", failure: failure, silent: silent)
|
32
|
+
end
|
27
33
|
|
28
34
|
GClouder::Project::ID.reset
|
29
35
|
|
@@ -66,9 +66,7 @@ module GClouder
|
|
66
66
|
type = Resource::resource?("beta functions", function["name"], filter_value: filter_value) ? "change" : "add"
|
67
67
|
|
68
68
|
Resource::feedback(type, "beta functions", function["name"])
|
69
|
-
|
70
|
-
gcloud "beta functions deploy #{function["name"]} #{hash_to_args(function)} --region=#{region}"
|
71
|
-
end
|
69
|
+
gcloud "beta functions deploy #{function["name"]} #{hash_to_args(function)} --region=#{region}", config_relative: true
|
72
70
|
end
|
73
71
|
|
74
72
|
def self.purge(region, function)
|
data/lib/gclouder/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gclouder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Wilson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-09-
|
12
|
+
date: 2017-09-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: trollop
|