rundock 0.2.8 → 0.2.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a55c43c6b352ecf9a8739e92f8359a8aa75f56b
4
- data.tar.gz: 28542e06144f4bcf366cb93c9299dfc095449057
3
+ metadata.gz: 7fe1522d58ced441b963285f6d4cd963c2ca5632
4
+ data.tar.gz: e1a65a4ede4cff83bcd8a474838da3483a07027f
5
5
  SHA512:
6
- metadata.gz: d18e16cb5d509e65604f4c82b5ca0b5d1cefea999da03b28f24b87c74a25a71236dea304df55be1d8ca38031d04a86c634c5b1a3a80bf891f35866d13656f536
7
- data.tar.gz: c0bd0685561e1f22363c45d44583e53e01fae64368048298c64d273e4db5f193d2b8e0b92aa93b2daeec07f78171203e3d6e63ed025b850df901c44cc91a9149
6
+ metadata.gz: 44e7cb01074e66f7ffab9a083c2050084ea9ed89d70b54ddad58f16614406123a293fb7b8c5583f35db3b3fa94395f801b7e2efd3be8fbbe9bcb3566414d3576
7
+ data.tar.gz: 893c456e09ed5b6e0152067437e7f1e6934ab76d25fa0a4f4ae9b42522cb7a12d6a2b9239e99efea8dc8f2046bf1585b661f019291b35ae08d35718eb2ba4dfe
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## v0.2.9
2
+
3
+ Improvements
4
+
5
+ - Support dry-run
6
+
7
+ Fix
8
+
9
+ - Change stderr to strip
10
+
1
11
  ## v0.2.8
2
12
 
3
13
  Improvements
@@ -41,11 +41,13 @@ module Rundock
41
41
 
42
42
  Logger.debug(%(Start executing: "#{command}"))
43
43
 
44
+ return nil if options[:dry_run]
45
+
44
46
  result = @backend.run_command(command)
45
47
  exit_status = result.exit_status
46
48
 
47
49
  Logger.formatter.indent do
48
- Logger.error("#{result.stderr}") unless result.stderr.blank?
50
+ Logger.error("#{result.stderr.strip}") unless result.stderr.strip.blank?
49
51
  Logger.info("#{result.stdout.strip}") unless result.stdout.strip.blank?
50
52
  Logger.debug("errexit: #{exec_options[:errexit]}")
51
53
  Logger.debug("exit status: #{exit_status}")
data/lib/rundock/cli.rb CHANGED
@@ -28,6 +28,7 @@ module Rundock
28
28
  option :sudo, type: :boolean, default: false
29
29
  option :default_ssh_opts, type: :string, aliases: ['-d'], default: DEFAULT_SSH_OPTIONS_DEFAULT_FILE_PATH
30
30
  option :run_anyway, type: :boolean, default: false
31
+ option :dry_run, type: :boolean, aliases: ['-n']
31
32
  def do(*scenario_file_path)
32
33
  scenario_file_path = [DEFAULT_SCENARIO_FILE_PATH] if scenario_file_path.empty?
33
34
  opts = { :scenario => scenario_file_path[0] }
@@ -47,6 +48,7 @@ module Rundock
47
48
  option :ask_password, type: :boolean, default: false
48
49
  option :sudo, type: :boolean, default: false
49
50
  option :run_anyway, type: :boolean, default: false
51
+ option :dry_run, type: :boolean, aliases: ['-n']
50
52
  def ssh
51
53
  opts = {}
52
54
 
@@ -1,3 +1,3 @@
1
1
  module Rundock
2
- VERSION = '0.2.8'
2
+ VERSION = '0.2.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rundock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - hiracy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-06 00:00:00.000000000 Z
11
+ date: 2015-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler