update 0.8.4 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -0
- data/bin/update +4 -8
- data/lib/update/red-green.rb +11 -13
- data/lib/update/version.rb +1 -1
- data/lib/update.rb +1 -0
- metadata +11 -11
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
|
data/lib/update/red-green.rb
CHANGED
@@ -1,17 +1,15 @@
|
|
1
1
|
module RedGreen
|
2
2
|
private
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
data/lib/update/version.rb
CHANGED
data/lib/update.rb
CHANGED
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
|
+
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-
|
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: &
|
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: *
|
24
|
+
version_requirements: *70192621492740
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: awesome_print
|
27
|
-
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: *
|
35
|
+
version_requirements: *70192621492180
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: slop
|
38
|
-
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: *
|
46
|
+
version_requirements: *70192621491660
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: awesome_print
|
49
|
-
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: *
|
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.
|
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
|