rat_deployer 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rat_deployer/cli.rb +12 -12
- data/lib/rat_deployer/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: 124b0ad74f1fe05802dc538c2113bf6a67b85792
|
4
|
+
data.tar.gz: b50d566c0e05f40f38443fb4c8cba9d750b17766
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f8f055a0f13597540aef2efa86959910f7425e15ced8e49083a79b58202903b899fbed27933eb1617b473ac905c88c4f965be408397f90e2da04e3cd59aa0db
|
7
|
+
data.tar.gz: 55fb3171b53a4b72f7f4a3073f428ffc2752c08e081efbf6ee07fdde2a4cd77d5525134164c851bc970b17a422d7d73ee08443a15b455d34bf2b402ad89f6d59
|
data/lib/rat_deployer/cli.rb
CHANGED
@@ -23,8 +23,6 @@ module RatDeployer
|
|
23
23
|
|
24
24
|
desc "compose ARGS...", "runs docker-compose command with default flags"
|
25
25
|
def compose(cmd, *cmd_flags)
|
26
|
-
warn_if_running_on_remote_host
|
27
|
-
|
28
26
|
env = RatDeployer::Config.env
|
29
27
|
project_name = RatDeployer::Config.all.fetch('project_name')
|
30
28
|
|
@@ -34,7 +32,9 @@ module RatDeployer
|
|
34
32
|
"-p #{project_name}_#{env}"
|
35
33
|
].join(' ')
|
36
34
|
|
37
|
-
|
35
|
+
within_machine do
|
36
|
+
run "docker-compose #{flags} #{cmd} #{cmd_flags.join(" ")}"
|
37
|
+
end
|
38
38
|
end
|
39
39
|
|
40
40
|
private
|
@@ -49,17 +49,17 @@ module RatDeployer
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def within_machine(&block)
|
52
|
-
|
52
|
+
set_machine
|
53
53
|
yield
|
54
54
|
ensure
|
55
|
-
|
56
|
-
end
|
57
|
-
|
58
|
-
def warn_if_running_on_remote_host
|
59
|
-
if machine = ENV["DOCKER_MACHINE"]
|
60
|
-
put_warning "Your docker client is pointing to the remote machine #{machine}"
|
61
|
-
ask_for_confirmation
|
62
|
-
end
|
55
|
+
unset_machine
|
63
56
|
end
|
57
|
+
|
58
|
+
#def warn_if_running_on_remote_host
|
59
|
+
#if machine = ENV["DOCKER_MACHINE"]
|
60
|
+
#put_warning "Your docker client is pointing to the remote machine #{machine}"
|
61
|
+
#ask_for_confirmation
|
62
|
+
#end
|
63
|
+
#end
|
64
64
|
end
|
65
65
|
end
|
data/lib/rat_deployer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rat_deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Oga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|