hackersays 1.0.0 → 1.0.3

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f3bbae2165cbd23e9149ff03e03ef1a8a6ed42b0
4
+ data.tar.gz: c72ee30edd58a2bcafefb5631dcc998fbc63b842
5
+ SHA512:
6
+ metadata.gz: e0e3a9ec4c01d619069cc2706cd52b1a896379296b668755823c1f79a0dfea709dabcbb7617f9b9fef7b32cd0e7b6c3e6c890e0a1faf47d78277a64690d1a361
7
+ data.tar.gz: de8aea110dc4f9aa6618c7f1a8de90d67405c5e1c715cef5f3d4f1df755f3ee365b36f45eec7dc665652d0d5f49fd7c59250484bb27791f273914fb66ace65c5
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
- require 'rake/testtask'
2
-
3
- Rake::TestTask.new do |t|
4
- t.libs << 'test'
5
- end
6
-
7
- desc "Run tests"
8
- task :default => :test
1
+ require 'rake/testtask'
2
+
3
+ Rake::TestTask.new do |t|
4
+ t.libs << 'test'
5
+ end
6
+
7
+ desc "Run tests"
8
+ task :default => :test
data/bin/hackersays CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby
2
- require 'hackersays'
3
- puts Hacker.said()
4
-
1
+ #!/usr/bin/env ruby
2
+ require 'hackersays'
3
+ puts Hacker.said()
4
+
data/lib/hackersays.rb CHANGED
@@ -1,14 +1,13 @@
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
1
+ #!/usr/bin/env ruby
2
+ require 'json'
3
+ require 'open-uri'
4
+
5
+ class Hacker
6
+ def self.said
7
+ quote_url = "http://hackersays.com/quote"
8
+ quote = JSON::load(open(quote_url).read())
9
+ comment = quote["c"]
10
+ author = quote["a"] || "Some hacker"
11
+ "#{comment} ~ #{author}"
12
+ end
13
+ end
@@ -1,8 +1,8 @@
1
- require 'test/unit'
2
- require 'hackersays'
3
-
4
- class HackerTest < Test::Unit::TestCase
5
- def test_hacker_said
6
- assert_not_nil Hacker.said()
7
- end
8
- end
1
+ require 'test/unit'
2
+ require 'hackersays'
3
+
4
+ class HackerTest < Test::Unit::TestCase
5
+ def test_hacker_said
6
+ assert_not_nil Hacker.said()
7
+ end
8
+ end
metadata CHANGED
@@ -1,17 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hackersays
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
5
- prerelease:
4
+ version: 1.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Hemanth.HM
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-05-20 00:00:00.000000000Z
13
- dependencies: []
14
- description: The best lines from hackers around the world!
11
+ date: 2012-05-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: json
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: open-uri
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.0
41
+ description: The best lines from hackers from hackersays.com
15
42
  email: hemanth.hm@gmail.com
16
43
  executables:
17
44
  - hackersays
@@ -21,32 +48,29 @@ files:
21
48
  - Rakefile
22
49
  - lib/hackersays.rb
23
50
  - bin/hackersays
24
- - lib/.said
25
51
  - test/test_hackersays.rb
26
- homepage: http://rubygems.org/gems/gita
52
+ homepage: http://hemanth.github.com/hackersay-gem/
27
53
  licenses: []
54
+ metadata: {}
28
55
  post_install_message:
29
56
  rdoc_options: []
30
57
  require_paths:
31
58
  - lib
32
59
  required_ruby_version: !ruby/object:Gem::Requirement
33
- none: false
34
60
  requirements:
35
- - - ! '>='
61
+ - - '>='
36
62
  - !ruby/object:Gem::Version
37
63
  version: '0'
38
64
  required_rubygems_version: !ruby/object:Gem::Requirement
39
- none: false
40
65
  requirements:
41
- - - ! '>='
66
+ - - '>='
42
67
  - !ruby/object:Gem::Version
43
68
  version: '0'
44
69
  requirements: []
45
70
  rubyforge_project:
46
- rubygems_version: 1.8.10
71
+ rubygems_version: 2.0.0
47
72
  signing_key:
48
73
  specification_version: 3
49
74
  summary: Hackersays!
50
75
  test_files:
51
76
  - test/test_hackersays.rb
52
- has_rdoc: