rock 0.1.4 → 0.1.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/rock +7 -24
- data/lib/rock.rb +7 -3
- metadata +3 -3
data/bin/rock
CHANGED
@@ -1,29 +1,12 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
3
|
+
lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
|
4
|
+
$LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
|
4
5
|
|
5
|
-
|
6
|
+
require 'rock'
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end
|
11
|
-
|
12
|
-
def command_parser
|
13
|
-
if ARGV.length == 0
|
14
|
-
usage
|
15
|
-
else
|
16
|
-
ARGV.each do |i|
|
17
|
-
puts i
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def run
|
23
|
-
command_parser
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
8
|
+
args = ARGV.dup
|
9
|
+
ARGV.clear
|
10
|
+
command = args.shift.strip rescue 'rock --help'
|
27
11
|
|
28
|
-
|
29
|
-
myRock.run
|
12
|
+
Rock::Command.run(command, args)
|
data/lib/rock.rb
CHANGED
metadata
CHANGED