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.
Files changed (3) hide show
  1. data/bin/rock +7 -24
  2. data/lib/rock.rb +7 -3
  3. metadata +3 -3
data/bin/rock CHANGED
@@ -1,29 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'rock'
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
- class Rock
6
+ require 'rock'
6
7
 
7
- def usage
8
- $stderr.puts('rock --help');
9
- exit(2)
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
- myRock = Rock.new
29
- myRock.run
12
+ Rock::Command.run(command, args)
@@ -1,6 +1,10 @@
1
1
 
2
- Module Rock
3
- def search
4
- puts 'search'
2
+ # rock (ruby on crack)
3
+
4
+ module Rock
5
+ module Command
6
+ def self.run(command, args)
7
+ puts 'Placeholder, cranking Ruby like I smoked a fat rock'
8
+ end
5
9
  end
6
10
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rock
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 6
10
+ version: 0.1.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - For Sure, Rad!