rat_deployer 0.1.6 → 0.1.7
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/rat_deployer/cli.rb +3 -3
- data/lib/rat_deployer/command.rb +5 -11
- data/lib/rat_deployer/config.rb +4 -0
- data/lib/rat_deployer/version.rb +1 -1
- data/lib/rat_deployer.rb +13 -7
- 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: 6fe2ca3076952e1d8dcf4a08491fce111526a0aa
|
4
|
+
data.tar.gz: 085115922ea3cb5a05c63f9f015f7c4331dcbaec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20d8cd20b31d9f13dfbab3aed434085bdda9d68d517d06837c62dca04ee49c0dccd6702018041eb105ed8333f3623c05bd031e1cd680c999d1a4b0aa0b02041a
|
7
|
+
data.tar.gz: d515e185764e880b42af0293038db361469ea86dfad43ba738071d9d1799e400139a1e3b2d98201cdd1e5eab7718f21fd8b06e95c142cb92464bd917e6522012
|
data/lib/rat_deployer/cli.rb
CHANGED
@@ -12,9 +12,9 @@ module RatDeployer
|
|
12
12
|
|
13
13
|
desc "deploy", "deploys current environment"
|
14
14
|
def deploy
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
invoke [RatDeployer::Cli::Images, :update]
|
16
|
+
invoke :compose, %w[pull]
|
17
|
+
invoke :compose, ["up -d"]
|
18
18
|
end
|
19
19
|
|
20
20
|
desc "compose ARGS...", "runs docker-compose command with default flags"
|
data/lib/rat_deployer/command.rb
CHANGED
@@ -4,7 +4,7 @@ require 'highline/import'
|
|
4
4
|
module RatDeployer
|
5
5
|
module Command
|
6
6
|
def run(cmd)
|
7
|
-
if prompt_enabled?
|
7
|
+
if RatDeployer::Config.prompt_enabled?
|
8
8
|
msg = "||=> Running command ".colorize(:blue) + "`#{cmd.colorize(:white)}`"
|
9
9
|
puts msg
|
10
10
|
end
|
@@ -13,22 +13,22 @@ module RatDeployer
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def put_heading(str)
|
16
|
-
return unless prompt_enabled?
|
16
|
+
return unless RatDeployer::Config.prompt_enabled?
|
17
17
|
puts "|| #{str}".colorize(:blue)
|
18
18
|
end
|
19
19
|
|
20
20
|
def put_error(str)
|
21
|
-
return unless prompt_enabled?
|
21
|
+
return unless RatDeployer::Config.prompt_enabled?
|
22
22
|
puts "// #{str}".colorize(:red)
|
23
23
|
end
|
24
24
|
|
25
25
|
def put_warning(str)
|
26
|
-
return unless prompt_enabled?
|
26
|
+
return unless RatDeployer::Config.prompt_enabled?
|
27
27
|
puts colorize_warning(str)
|
28
28
|
end
|
29
29
|
|
30
30
|
def ask_for_confirmation
|
31
|
-
return unless prompt_enabled?
|
31
|
+
return unless RatDeployer::Config.prompt_enabled?
|
32
32
|
prompt = "Are you sure you want to continue?"
|
33
33
|
|
34
34
|
a = ''
|
@@ -46,11 +46,5 @@ module RatDeployer
|
|
46
46
|
def colorize_warning(str)
|
47
47
|
"\\\\ #{str}".colorize(:yellow)
|
48
48
|
end
|
49
|
-
|
50
|
-
private
|
51
|
-
|
52
|
-
def prompt_enabled?
|
53
|
-
ENV['RAT_PROMPT'] != "false"
|
54
|
-
end
|
55
49
|
end
|
56
50
|
end
|
data/lib/rat_deployer/config.rb
CHANGED
data/lib/rat_deployer/version.rb
CHANGED
data/lib/rat_deployer.rb
CHANGED
@@ -1,16 +1,22 @@
|
|
1
1
|
require 'rat_deployer/version'
|
2
|
+
require 'rat_deployer/config'
|
2
3
|
|
3
4
|
module RatDeployer
|
4
5
|
def self.print_rat
|
5
|
-
|
6
|
+
return unless RatDeployer::Config.prompt_enabled?
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
rat = <<-RAT
|
9
|
+
|
10
|
+
DEPLOY RAT
|
11
|
+
(\,/) WORKING
|
12
|
+
oo '''//, _
|
13
|
+
,/_;~, \, / '
|
14
|
+
"' \ ( \ !
|
15
|
+
',| \ |__.'
|
16
|
+
'~ '~----''
|
13
17
|
|
14
18
|
RAT
|
19
|
+
|
20
|
+
puts rat
|
15
21
|
end
|
16
22
|
end
|
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.7
|
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-12-
|
11
|
+
date: 2016-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|