rakins 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/bin/rakins +2 -35
  2. data/lib/rakin.rb +44 -0
  3. metadata +2 -2
  4. data/lib/rakins.rb +0 -0
data/bin/rakins CHANGED
@@ -5,39 +5,6 @@
5
5
  # http://www.youtube.com/watch?v=QHQ7bt5LBj8
6
6
  # Enjoy!
7
7
 
8
- first_arg = ARGV[0]
9
- second_arg = ARGV[1]
10
-
11
- angry_rakin_phrases = ["GONNA RAKE THINGS UP! BRR!",
12
- "WHY YOU GOTTA CALL UP A RAKIN FO' NUTHIN?",
13
- "RAKINS GONNA GETCHA!",
14
- "STEALIN YO' STUFF!"]
15
-
16
- def make_rakin_say message
17
- rakin = <<-EOF
18
- ,,,,
19
- .' `/\\_/\\
20
- ' <@V@> /===#{ '=' * (message.length+2) }
21
- <(((((((((( ) ( \\./ <== #{message} =
22
- \\(''''''\\(\\( \\===#{ '=' * (message.length+2) }
23
- `-"`-" " "
24
- EOF
25
-
26
- rakin
27
- end
28
-
29
- if !first_arg.nil? && first_arg=='install'
30
- puts make_rakin_say "INSTALLIN' #{second_arg}, YO."
31
- puts `gem install #{second_arg}`
32
- elsif !first_arg.nil? && first_arg=='help'
33
- puts "rakins install <gem> will install a gem, rakins <command> will bundle exec the command."
34
- elsif !first_arg.nil? && first_arg=='origin'
35
- `open http://www.youtube.com/watch?v=QHQ7bt5LBj8`
36
- elsif !first_arg.nil? && second_arg.nil?
37
- puts make_rakin_say "EXECIN' #{first_arg}, YO."
38
- puts `bundle exec #{first_arg}`
39
- elsif first_arg.nil?
40
- puts make_rakin_say angry_rakin_phrases[ rand(angry_rakin_phrases.length)]
41
- end
42
-
8
+ require 'rakin'
43
9
 
10
+ Rakin.consider_events
@@ -0,0 +1,44 @@
1
+ class Rakin
2
+
3
+ ANGRY_RAKINS_PHRASES = ["GONNA RAKE THINGS UP! BRR!",
4
+ "WHY YOU GOTTA CALL UP A RAKIN FO' NUTHIN?",
5
+ "RAKINS GONNA GETCHA!",
6
+ "STEALIN YO' STUFF!"]
7
+
8
+ def self.speaks message
9
+ rakin = <<-EOF
10
+ ,,,,
11
+ .' `/\\_/\\
12
+ ' <@V@> /===#{ '=' * (message.length+2) }
13
+ <(((((((((( ) ( \\./ <== #{message} =
14
+ \\(''''''\\(\\( \\===#{ '=' * (message.length+2) }
15
+ `-"`-" " "
16
+ EOF
17
+
18
+ rakin
19
+ end
20
+
21
+ def self.talks_back
22
+ speaks ANGRY_RAKINS_PHRASES[ rand(ANGRY_RAKINS_PHRASES.length)]
23
+ end
24
+
25
+ def self.consider_events
26
+ first_arg = ARGV[0]
27
+ second_arg = ARGV[1]
28
+
29
+ if !first_arg.nil? && first_arg=='install'
30
+ puts Rakin.speaks "INSTALLIN' #{second_arg}, YO."
31
+ puts `gem install #{second_arg}`
32
+ elsif !first_arg.nil? && first_arg=='help'
33
+ puts "rakins install <gem> will install a gem, rakins <command> will bundle exec the command."
34
+ elsif !first_arg.nil? && first_arg=='origin'
35
+ `open http://www.youtube.com/watch?v=QHQ7bt5LBj8`
36
+ elsif !first_arg.nil? && !second_arg.nil?
37
+ puts Rakin.speaks "EXECIN' #{first_arg}, YO."
38
+ puts `bundle exec #{first_arg} #{second_arg}`
39
+ elsif first_arg.nil?
40
+ puts Rakin.talks_back
41
+ end
42
+ end
43
+
44
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rakins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -18,7 +18,7 @@ executables:
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
- - lib/rakins.rb
21
+ - lib/rakin.rb
22
22
  - bin/rakins
23
23
  homepage: http://rubygems.org/gems/rakins
24
24
  licenses: []
File without changes