-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9787083
Showing
8 changed files
with
1,686 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GNU AFFERO GENERAL PUBLIC LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Visit the site [hackersays-gem](http://hemanth.github.com/hackersays-gem) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require 'rake/testtask' | ||
|
||
Rake::TestTask.new do |t| | ||
t.libs << 'test' | ||
end | ||
|
||
desc "Run tests" | ||
task :default => :test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env ruby | ||
require 'hackersays' | ||
puts Hacker.said() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Gem::Specification.new do |s| | ||
s.name = "hackersays" | ||
s.version = "1.0.0" | ||
s.default_executable = "hackersays" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.authors = ["Hemanth.HM"] | ||
s.date = %q{2012-05-20} | ||
s.description = %q{The best lines from hackers around the world!} | ||
s.email = %q{hemanth.hm@gmail.com} | ||
s.files = ["Rakefile", "lib/hackersays.rb", "bin/hackersays","lib/.said"] | ||
s.test_files = Dir.glob('test/*.rb') | ||
s.homepage = %q{http://rubygems.org/gems/gita} | ||
s.require_paths = ["lib"] | ||
s.rubygems_version = %q{1.6.2} | ||
s.summary = %q{Hackersays!} | ||
s.bindir = 'bin' | ||
s.executables = 'hackersays' | ||
|
||
if s.respond_to? :specification_version then | ||
s.specification_version = 3 | ||
|
||
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then | ||
else | ||
end | ||
else | ||
end | ||
end | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env ruby | ||
require 'yaml' | ||
require 'open-uri' | ||
class Hacker | ||
def self.said | ||
@quotes = [] | ||
hackers_said = File.dirname(__FILE__) + "/.said" | ||
@quotes = YAML::load(open(hackers_said).read) | ||
quote = @quotes[rand(@quotes.length)] | ||
said = quote[:c] | ||
who = quote[:a] || "Some hacker" | ||
"#{said} ~ #{who}".gsub(/\n/,"") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require 'test/unit' | ||
require 'hackersays' | ||
|
||
class HackerTest < Test::Unit::TestCase | ||
def test_hacker_said | ||
assert_not_nil Hacker.said() | ||
end | ||
end |