capdocker 1.0.26 → 1.0.27

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: 2688e3091904aca7d35fca2acc18d5e47afa1976
4
- data.tar.gz: 9b59e3aa4180a7da52c12bd450ab900e027fac2b
3
+ metadata.gz: f10c7841c5970dd9d3b604d76c6c3547cf6ef564
4
+ data.tar.gz: 96b7ce804ef885a370952c040909bba8db9744aa
5
5
  SHA512:
6
- metadata.gz: 340c7079ac421d533cb03faf0956b0cc219007b09f5e5a604ccd690b7eba5ad1421dd033e4948b4cc6d702cbab217eb9578ce32170277c52a49e29400f46f23d
7
- data.tar.gz: c925fd2e3d9b8ee6555f5426bb3cc35223784bd1a6c5133f64348528e3d85e939216f268b71dcaef35998dbf32367c09249fdac21813f3fd74fdde63dde4be36
6
+ metadata.gz: 2136f09ad94c151de39dc46e0e40b94dd0c46f63a84447463554c81a33d05d45d4cbede78ab6eaef3c269709724ee9f36bebc7f3193eb785c2782d83d2d17814
7
+ data.tar.gz: 55f2c9a3c629172aa524635de220037caf82b862afcff24ff909eacada43f98a573eeb14c9aaa3e745bf95db5a46b96c62d08b28f1951b39bbf333f95cced1ef
data/capdocker.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{capdocker}
5
- s.version = "1.0.26"
5
+ s.version = "1.0.27"
6
6
  s.authors = ["Ross Riley", "One Black Bear"]
7
7
  s.email = %q{ross@oneblackbear.com}
8
8
  s.date = Time.now
data/lib/docker_deploy.rb CHANGED
@@ -1,5 +1,3 @@
1
- require 'capistrano/recipes/deploy'
2
-
3
1
  Capistrano::Configuration.instance(:must_exist).load do
4
2
 
5
3
  # Default Variables and Role
@@ -21,7 +19,28 @@ Capistrano::Configuration.instance(:must_exist).load do
21
19
  after "deploy:update_code", "deploy:mount_shares"
22
20
  after "deploy:update_code", "docker:build"
23
21
 
22
+ # logs the command then executes it locally.
23
+ # returns the command output as a string
24
+ def run_locally(cmd)
25
+ if dry_run
26
+ return logger.debug "executing locally: #{cmd.inspect}"
27
+ end
28
+ logger.trace "executing locally: #{cmd.inspect}" if logger
29
+ output_on_stdout = nil
30
+ elapsed = Benchmark.realtime do
31
+ output_on_stdout = `#{cmd}`
32
+ end
33
+ if $?.to_i > 0 # $? is command exit code (posix style)
34
+ raise Capistrano::LocalArgumentError, "Command #{cmd} returned status code #{$?}"
35
+ end
36
+ logger.trace "command finished in #{(elapsed * 1000).round}ms" if logger
37
+ output_on_stdout
38
+ end
39
+
40
+
24
41
 
42
+ # This is the manin deployment namespace
43
+ # default command gets run if invoked via `cap deploy`
25
44
  namespace :deploy do
26
45
 
27
46
  desc "Deploys the project to docker server."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capdocker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.26
4
+ version: 1.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Riley