update 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/update/base.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  module Update
2
- extend RedGreen
3
-
4
2
  class << self
5
3
  def run
6
4
  run_each_command
@@ -13,23 +11,25 @@ module Update
13
11
  Update::COMMANDS.each do |command, description|
14
12
  green description
15
13
  puts `#{command}`
16
- check_for_failures
14
+ check_for_failures command
17
15
  end
18
16
  end
19
17
 
20
- def check_for_failures
21
- @status ||= "status"
18
+ def check_for_failures command
22
19
  unless $?.success?
23
- @status.taint
20
+ @failed_commands ||= []
21
+ @failed_commands << command
24
22
  red "Command failed."
25
23
  end
26
24
  end
27
25
 
28
26
  def report_final_status
29
- unless @status.tainted?
30
- green "Update process completed successfully."
27
+ if @failed_commands
28
+ red "Update process completed with failures.\a"
29
+ puts
30
+ red "#{@failed_commands}"
31
31
  else
32
- red "Update process completed with failures.\a" #chirp
32
+ green "Update process completed successfully."
33
33
  end
34
34
  end
35
35
  end
@@ -1,4 +1,4 @@
1
- module RedGreen
1
+ module Update
2
2
  RED, GREEN = "tput setaf 1", "tput setaf 2"
3
3
  RESET = "tput sgr0"
4
4
 
@@ -1,3 +1,3 @@
1
1
  module Update
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: update
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: slop
16
- requirement: &70094881842000 !ruby/object:Gem::Requirement
16
+ requirement: &70303145851980 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '2.4'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70094881842000
24
+ version_requirements: *70303145851980
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: slop
27
- requirement: &70094881841300 !ruby/object:Gem::Requirement
27
+ requirement: &70303145851280 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '2.4'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70094881841300
35
+ version_requirements: *70303145851280
36
36
  description: A Ruby Gem for running a list of update commands from command line.
37
37
  email:
38
38
  - shannonskipper@gmail.com