amiral 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. data/lib/amiral/version.rb +1 -1
  2. data/lib/amiral.rb +9 -7
  3. metadata +1 -1
@@ -1,3 +1,3 @@
1
1
  module Amiral
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
data/lib/amiral.rb CHANGED
@@ -49,7 +49,7 @@ module Amiral
49
49
  err = stderr.read
50
50
  }
51
51
  short = "unknown status"
52
- case status
52
+ case status.exitstatus
53
53
  when 0:
54
54
  short = "nothing to do, i'm all good"
55
55
  when 2:
@@ -61,7 +61,7 @@ module Amiral
61
61
  end
62
62
 
63
63
  {
64
- :exit => ((status == 0) || (status == 2)) ? 0 : 1,
64
+ :exit => ((status.exitstatus == 0)||(status.exitstatus == 2)) ? 0 : 1,
65
65
  :status => status,
66
66
  :short => short,
67
67
  :out => out,
@@ -78,8 +78,9 @@ module Amiral
78
78
  err = stderr.read
79
79
  }
80
80
  {
81
- :exit => status,
82
- :short => (status == 0) ? "apt-get update ran fine" : "apt-get cannot perform update!",
81
+ :exit => status.exitstatus,
82
+ :short => (status.exitstatus == 0) ? "apt-get update ran fine" :
83
+ "apt-get cannot perform update!",
83
84
  :out => out,
84
85
  :err => err
85
86
  }
@@ -103,9 +104,10 @@ module Amiral
103
104
 
104
105
  }
105
106
  {
106
- :exit = status,
107
- :short = (status == 0) ? "service #{service} #{action} successful" :
108
- "service #{service} #{action} failed!",
107
+ :exit => status.exitstatus,
108
+ :short => (status.exitstatus == 0) ?
109
+ "service #{service} #{action} successful" :
110
+ "service #{service} #{action} failed!",
109
111
  :out => out,
110
112
  :err => err
111
113
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amiral
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: