update 0.8.4 → 0.8.5

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.
data/README.md CHANGED
@@ -8,6 +8,15 @@ update
8
8
  Running `update` processes the list of updates found in the commands.rb file and then reports back whether the updates were run sucessfully.
9
9
  ##Edit list of updates
10
10
  Modify the Hash of update commands in commands.rb to customize update scripts. TODO: Sane and usable way to do this. >.>
11
+ ##Command line arguments
12
+ Usage: update [options]
13
+
14
+ options:
15
+
16
+ -v, --version Print version information
17
+ -l, --list Print list of commands
18
+ -e, --edit Edit list of commands
19
+ -h, --help Print this help message
11
20
  ##License
12
21
  Copyright (c) Shannon Skipper.
13
22
  MIT License.
data/bin/update CHANGED
@@ -5,8 +5,7 @@ require "ap"
5
5
 
6
6
  opts = Slop.parse(help: true,
7
7
  banner: "Usage: update [options]",
8
- ignore_case: true,
9
- strict: true) do
8
+ ignore_case: true) do
10
9
 
11
10
  on :v, :version, "Print version information" do
12
11
  puts "Version #{Update::VERSION} on Ruby #{RUBY_VERSION}."
@@ -20,13 +19,10 @@ opts = Slop.parse(help: true,
20
19
  end
21
20
 
22
21
  on :e, :edit, "Edit list of commands" do
23
- puts "Edit the list of commands and descriptions. Usage:"
24
- puts
25
- puts "cd #{File.expand_path('../../lib/update',__FILE__)}"
26
- puts
22
+ puts "Edit the list of commands and descriptions. Usage:\n"
23
+ puts "cd #{File.expand_path('../../lib/update',__FILE__)}\n"
27
24
  puts "Then open 'commands.rb' with a text editor..."
28
- puts "and add your command and description to the Hash."
29
- puts
25
+ puts "and add your command and description to the Hash.\n"
30
26
  puts "TODO: Better (read 'sane') way of doing this..."
31
27
  exit
32
28
  end
@@ -1,17 +1,15 @@
1
1
  module RedGreen
2
2
  private
3
3
 
4
- def red text
5
- say "tput setaf 1", text
6
- end
7
-
8
- def green text
9
- say "tput setaf 2", text
10
- end
11
-
12
- def say color, text
13
- system color
14
- puts text
15
- system "tput sgr0" #default color
16
- end
4
+ def red text
5
+ system "tput setaf 1" #red text
6
+ STDERR.puts text
7
+ system "tput sgr0" #default text
8
+ end
9
+
10
+ def green text
11
+ system "tput setaf 2" #green text
12
+ puts text
13
+ system "tput sgr0" #default text
14
+ end
17
15
  end
@@ -1,3 +1,3 @@
1
1
  module Update
2
- VERSION = "0.8.4"
2
+ VERSION = "0.8.5"
3
3
  end
data/lib/update.rb CHANGED
@@ -30,6 +30,7 @@ module Update
30
30
  if @failed
31
31
  red "Update process completed with failures.\a" #chirp
32
32
  @failed.each { |this_failed| puts "Command failed: '#{this_failed}'" }
33
+ exit 1
33
34
  else
34
35
  green "Update process completed successfully."
35
36
  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.8.4
4
+ version: 0.8.5
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-02-16 00:00:00.000000000 Z
12
+ date: 2012-02-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: slop
16
- requirement: &70242592808760 !ruby/object:Gem::Requirement
16
+ requirement: &70192621492740 !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: *70242592808760
24
+ version_requirements: *70192621492740
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: awesome_print
27
- requirement: &70242592808240 !ruby/object:Gem::Requirement
27
+ requirement: &70192621492180 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '1.0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70242592808240
35
+ version_requirements: *70192621492180
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: slop
38
- requirement: &70242592807700 !ruby/object:Gem::Requirement
38
+ requirement: &70192621491660 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '2.4'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70242592807700
46
+ version_requirements: *70192621491660
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: awesome_print
49
- requirement: &70242592807240 !ruby/object:Gem::Requirement
49
+ requirement: &70192621490980 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '1.0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70242592807240
57
+ version_requirements: *70192621490980
58
58
  description: A Ruby Gem for running a list of update commands from command line.
59
59
  email:
60
60
  - shannonskipper@gmail.com
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project: update
95
- rubygems_version: 1.8.16
95
+ rubygems_version: 1.8.17
96
96
  signing_key:
97
97
  specification_version: 3
98
98
  summary: a gem to run a list of updates