update 0.8.5 → 0.8.6
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/bin/update +1 -24
- data/lib/update.rb +1 -0
- data/lib/update/options.rb +27 -0
- data/lib/update/version.rb +1 -1
- metadata +11 -10
data/bin/update
CHANGED
@@ -3,29 +3,6 @@ require "update"
|
|
3
3
|
require "slop"
|
4
4
|
require "ap"
|
5
5
|
|
6
|
-
|
7
|
-
banner: "Usage: update [options]",
|
8
|
-
ignore_case: true) do
|
9
|
-
|
10
|
-
on :v, :version, "Print version information" do
|
11
|
-
puts "Version #{Update::VERSION} on Ruby #{RUBY_VERSION}."
|
12
|
-
puts "<shannonskipper@gmail.com>"
|
13
|
-
exit
|
14
|
-
end
|
15
|
-
|
16
|
-
on :l, :list, "Print list of commands" do
|
17
|
-
ap Update::COMMANDS
|
18
|
-
exit
|
19
|
-
end
|
20
|
-
|
21
|
-
on :e, :edit, "Edit list of commands" do
|
22
|
-
puts "Edit the list of commands and descriptions. Usage:\n"
|
23
|
-
puts "cd #{File.expand_path('../../lib/update',__FILE__)}\n"
|
24
|
-
puts "Then open 'commands.rb' with a text editor..."
|
25
|
-
puts "and add your command and description to the Hash.\n"
|
26
|
-
puts "TODO: Better (read 'sane') way of doing this..."
|
27
|
-
exit
|
28
|
-
end
|
29
|
-
end
|
6
|
+
Update.parse_options
|
30
7
|
|
31
8
|
Update.run
|
data/lib/update.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
module Update
|
2
|
+
def self.parse_options
|
3
|
+
options = Slop.parse(help: true,
|
4
|
+
banner: "Usage: update [options]") do
|
5
|
+
on :v, :version, "Print version information" do
|
6
|
+
puts "Version #{Update::VERSION} on Ruby #{RUBY_VERSION}."
|
7
|
+
puts "<shannonskipper@gmail.com>"
|
8
|
+
exit
|
9
|
+
end
|
10
|
+
|
11
|
+
on :l, :list, "Print list of commands" do
|
12
|
+
ap Update::COMMANDS
|
13
|
+
exit
|
14
|
+
end
|
15
|
+
|
16
|
+
on :e, :edit, "Edit list of commands" do
|
17
|
+
puts "Edit the list of commands and descriptions. Usage:"
|
18
|
+
puts
|
19
|
+
puts "cd #{File.expand_path('../../lib/update',__FILE__)}"
|
20
|
+
puts
|
21
|
+
puts "Then open 'commands.rb' with a text editor... and add your command and description to the list."
|
22
|
+
puts "TODO: Better (read 'sane') way of doing this..."
|
23
|
+
exit
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/update/version.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.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-02-
|
12
|
+
date: 2012-02-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: slop
|
16
|
-
requirement: &
|
16
|
+
requirement: &70339091081660 !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: *70339091081660
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: awesome_print
|
27
|
-
requirement: &
|
27
|
+
requirement: &70339091080580 !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: *70339091080580
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: slop
|
38
|
-
requirement: &
|
38
|
+
requirement: &70339091079880 !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: *70339091079880
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: awesome_print
|
49
|
-
requirement: &
|
49
|
+
requirement: &70339091078980 !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: *70339091078980
|
58
58
|
description: A Ruby Gem for running a list of update commands from command line.
|
59
59
|
email:
|
60
60
|
- shannonskipper@gmail.com
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- bin/update
|
70
70
|
- lib/update.rb
|
71
71
|
- lib/update/commands.rb
|
72
|
+
- lib/update/options.rb
|
72
73
|
- lib/update/red-green.rb
|
73
74
|
- lib/update/version.rb
|
74
75
|
- update.gemspec
|