rat_deployer 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 162287a407396a434b6fc6e410a064e88a567ccc
4
- data.tar.gz: 69acd2cb09dc9b22faf70014eefa74315602f279
3
+ metadata.gz: 6fe2ca3076952e1d8dcf4a08491fce111526a0aa
4
+ data.tar.gz: 085115922ea3cb5a05c63f9f015f7c4331dcbaec
5
5
  SHA512:
6
- metadata.gz: 8bc9bb979e290ae215b9eeb26ae2109ce63c806efcb70876042a8039e68db3af0b7fcec2d890e225e6aa008259d83c3a8356006809a54b68190f3e4b2281e169
7
- data.tar.gz: b9e2c538e700fb91248a15e907be878495c62ce1f69db2a26268b31b607fa31865c1dd0f728e991f7df163b155f3c90bdcacfc186dc3e3bf7b25028885ff3eb6
6
+ metadata.gz: 20d8cd20b31d9f13dfbab3aed434085bdda9d68d517d06837c62dca04ee49c0dccd6702018041eb105ed8333f3623c05bd031e1cd680c999d1a4b0aa0b02041a
7
+ data.tar.gz: d515e185764e880b42af0293038db361469ea86dfad43ba738071d9d1799e400139a1e3b2d98201cdd1e5eab7718f21fd8b06e95c142cb92464bd917e6522012
@@ -12,9 +12,9 @@ module RatDeployer
12
12
 
13
13
  desc "deploy", "deploys current environment"
14
14
  def deploy
15
- run "rat images update"
16
- run "rat compose pull"
17
- run "rat compose up -d"
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"
@@ -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
@@ -33,5 +33,9 @@ module RatDeployer
33
33
  env_var = ENV['RAT_REMOTE']
34
34
  env_var.nil? ? true : env_var == 'true'
35
35
  end
36
+
37
+ def self.prompt_enabled?
38
+ ENV['RAT_PROMPT'] != "false"
39
+ end
36
40
  end
37
41
  end
@@ -1,3 +1,3 @@
1
1
  module RatDeployer
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
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
- puts <<-RAT
6
+ return unless RatDeployer::Config.prompt_enabled?
6
7
 
7
- (\,/) DEPLOY RAT WORKING
8
- oo '''//, _
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.6
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-22 00:00:00.000000000 Z
11
+ date: 2016-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor