update 0.2.4 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/update/version.rb +1 -1
  2. data/lib/update.rb +6 -11
  3. metadata +6 -6
@@ -1,3 +1,3 @@
1
1
  module Update
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.6"
3
3
  end
data/lib/update.rb CHANGED
@@ -4,7 +4,7 @@ require "update/version"
4
4
 
5
5
  module Update
6
6
  extend RedGreen
7
-
7
+
8
8
  class << self
9
9
  def run
10
10
  run_commands
@@ -17,32 +17,27 @@ module Update
17
17
  Update::COMMANDS.each do |command, description|
18
18
  @command = command
19
19
  green description
20
- run_command_and_print_output
20
+ run_command_printing_output
21
21
  check_for_failures
22
22
  end
23
23
  end
24
24
 
25
- def run_command_and_print_output
26
- IO.popen @command do |io|
27
- puts io.read
28
- io.close
29
- end
25
+ def run_command_printing_output
26
+ IO.popen @command { |io| puts io.read }
30
27
  end
31
28
 
32
29
  def check_for_failures
33
30
  unless $?.success?
34
31
  @failed ||= []
35
32
  @failed << @command
36
- red "Command failed."
33
+ red "Command failed: '#{@command}'"
37
34
  end
38
35
  end
39
36
 
40
37
  def report_status
41
38
  if @failed
42
39
  red "Update process completed with failures.\a" #chirp
43
- @failed.each do |command|
44
- puts "Command failed: '#{command}'"
45
- end
40
+ @failed.each { |this_failed| puts "Command failed: '#{this_failed}'" }
46
41
  else
47
42
  green "Update process completed successfully."
48
43
  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.2.4
4
+ version: 0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-25 00:00:00.000000000 Z
12
+ date: 2012-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: slop
16
- requirement: &70258115606520 !ruby/object:Gem::Requirement
16
+ requirement: &70274888444920 !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: *70258115606520
24
+ version_requirements: *70274888444920
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: slop
27
- requirement: &70258115605940 !ruby/object:Gem::Requirement
27
+ requirement: &70274888444360 !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: *70258115605940
35
+ version_requirements: *70274888444360
36
36
  description: A Ruby Gem for running a list of update commands from command line.
37
37
  email:
38
38
  - shannonskipper@gmail.com