hackersays 1.0.0
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/Rakefile +8 -0
- data/bin/hackersays +4 -0
- data/lib/.said +1621 -0
- data/lib/hackersays.rb +14 -0
- data/test/test_hackersays.rb +8 -0
- metadata +52 -0
data/lib/hackersays.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'yaml'
|
3
|
+
require 'open-uri'
|
4
|
+
class Hacker
|
5
|
+
def self.said
|
6
|
+
@quotes = []
|
7
|
+
hackers_said = File.dirname(__FILE__) + "/.said"
|
8
|
+
@quotes = YAML::load(open(hackers_said).read)
|
9
|
+
quote = @quotes[rand(@quotes.length)]
|
10
|
+
said = quote[:c]
|
11
|
+
who = quote[:a] || "Some hacker"
|
12
|
+
"#{said} ~ #{who}".gsub(/\n/,"")
|
13
|
+
end
|
14
|
+
end
|
metadata
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hackersays
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Hemanth.HM
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-05-20 00:00:00.000000000Z
|
13
|
+
dependencies: []
|
14
|
+
description: The best lines from hackers around the world!
|
15
|
+
email: hemanth.hm@gmail.com
|
16
|
+
executables:
|
17
|
+
- hackersays
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- Rakefile
|
22
|
+
- lib/hackersays.rb
|
23
|
+
- bin/hackersays
|
24
|
+
- lib/.said
|
25
|
+
- test/test_hackersays.rb
|
26
|
+
homepage: http://rubygems.org/gems/gita
|
27
|
+
licenses: []
|
28
|
+
post_install_message:
|
29
|
+
rdoc_options: []
|
30
|
+
require_paths:
|
31
|
+
- lib
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
requirements: []
|
45
|
+
rubyforge_project:
|
46
|
+
rubygems_version: 1.8.10
|
47
|
+
signing_key:
|
48
|
+
specification_version: 3
|
49
|
+
summary: Hackersays!
|
50
|
+
test_files:
|
51
|
+
- test/test_hackersays.rb
|
52
|
+
has_rdoc:
|