speaker_rate 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +28 -0
- data/README.rdoc +17 -0
- data/Rakefile +2 -0
- data/lib/speaker_rate.rb +20 -0
- data/lib/speaker_rate/version.rb +3 -0
- data/speaker_rate.gemspec +24 -0
- data/spec/speaker_rate_spec.rb +32 -0
- data/spec/spec_helper.rb +2 -0
- metadata +105 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
speaker_rate (0.0.2)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: http://rubygems.org/
|
8
|
+
specs:
|
9
|
+
crack (0.1.8)
|
10
|
+
diff-lcs (1.1.2)
|
11
|
+
httparty (0.6.1)
|
12
|
+
crack (= 0.1.8)
|
13
|
+
rspec (2.4.0)
|
14
|
+
rspec-core (~> 2.4.0)
|
15
|
+
rspec-expectations (~> 2.4.0)
|
16
|
+
rspec-mocks (~> 2.4.0)
|
17
|
+
rspec-core (2.4.0)
|
18
|
+
rspec-expectations (2.4.0)
|
19
|
+
diff-lcs (~> 1.1.2)
|
20
|
+
rspec-mocks (2.4.0)
|
21
|
+
|
22
|
+
PLATFORMS
|
23
|
+
ruby
|
24
|
+
|
25
|
+
DEPENDENCIES
|
26
|
+
httparty
|
27
|
+
rspec
|
28
|
+
speaker_rate!
|
data/README.rdoc
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
= Speaker Rate
|
2
|
+
|
3
|
+
This is a simple gem that utilizes HTTParty and the Speaker Rate API.
|
4
|
+
|
5
|
+
For more information on the Speaker Rate API check out http://speakerrate.com/api
|
6
|
+
|
7
|
+
== Get Speaker
|
8
|
+
|
9
|
+
speaker = SpeakerRate.get_speaker(*speaker_rate_id*)
|
10
|
+
|
11
|
+
== Get Talk
|
12
|
+
|
13
|
+
talk = SpeakerRate.get_talk(*talk_id*)
|
14
|
+
|
15
|
+
== Get Event
|
16
|
+
|
17
|
+
event = SpeakerRate.get_event(*event_id*)
|
data/Rakefile
ADDED
data/lib/speaker_rate.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require "httparty"
|
2
|
+
require 'crack'
|
3
|
+
|
4
|
+
class SpeakerRate
|
5
|
+
include HTTParty
|
6
|
+
|
7
|
+
def self.get_speaker(speaker_rate_id)
|
8
|
+
get("http://speakerrate.com/speakers/#{speaker_rate_id}.json")
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.get_talk(talk_id)
|
12
|
+
get("http://speakerrate.com/talks/#{talk_id}.json")
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.get_event(event_id)
|
16
|
+
get("http://speakerrate.com/events/#{event_id}.json")
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "speaker_rate/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "speaker_rate"
|
7
|
+
s.version = SpeakerRate::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Jonathan Birkholz"]
|
10
|
+
s.email = ["rookieone@gmail.com"]
|
11
|
+
s.homepage = ""
|
12
|
+
s.summary = %q{Gem using HTTParty on the Speaker Rate API}
|
13
|
+
s.description = %q{Gem using HTTParty on the Speaker Rate API}
|
14
|
+
|
15
|
+
s.add_development_dependency "rspec"
|
16
|
+
s.add_development_dependency "httparty"
|
17
|
+
|
18
|
+
s.rubyforge_project = "speaker_rate"
|
19
|
+
|
20
|
+
s.files = `git ls-files`.split("\n")
|
21
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
22
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
23
|
+
s.require_paths = ["lib"]
|
24
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe SpeakerRate do
|
4
|
+
|
5
|
+
describe "get speaker" do
|
6
|
+
before(:each) do
|
7
|
+
@info = SpeakerRate.get_speaker(10082)
|
8
|
+
end
|
9
|
+
|
10
|
+
it { @info.should_not be_nil }
|
11
|
+
it { @info["talks"].should_not be_empty }
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "get talk" do
|
15
|
+
before(:each) do
|
16
|
+
@talk = SpeakerRate.get_talk(4758)
|
17
|
+
end
|
18
|
+
|
19
|
+
it { @talk.should_not be_nil }
|
20
|
+
it { @talk["title"].should_not be_blank }
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "get event" do
|
24
|
+
before(:each) do
|
25
|
+
@event = SpeakerRate.get_event(612)
|
26
|
+
end
|
27
|
+
|
28
|
+
it { @event.should_not be_nil }
|
29
|
+
it { @event["title"].should_not be_blank }
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: speaker_rate
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 21
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Jonathan Birkholz
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-01-05 00:00:00 -06:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rspec
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: httparty
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
47
|
+
type: :development
|
48
|
+
version_requirements: *id002
|
49
|
+
description: Gem using HTTParty on the Speaker Rate API
|
50
|
+
email:
|
51
|
+
- rookieone@gmail.com
|
52
|
+
executables: []
|
53
|
+
|
54
|
+
extensions: []
|
55
|
+
|
56
|
+
extra_rdoc_files: []
|
57
|
+
|
58
|
+
files:
|
59
|
+
- .gitignore
|
60
|
+
- Gemfile
|
61
|
+
- Gemfile.lock
|
62
|
+
- README.rdoc
|
63
|
+
- Rakefile
|
64
|
+
- lib/speaker_rate.rb
|
65
|
+
- lib/speaker_rate/version.rb
|
66
|
+
- speaker_rate.gemspec
|
67
|
+
- spec/speaker_rate_spec.rb
|
68
|
+
- spec/spec_helper.rb
|
69
|
+
has_rdoc: true
|
70
|
+
homepage: ""
|
71
|
+
licenses: []
|
72
|
+
|
73
|
+
post_install_message:
|
74
|
+
rdoc_options: []
|
75
|
+
|
76
|
+
require_paths:
|
77
|
+
- lib
|
78
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
+
none: false
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
hash: 3
|
84
|
+
segments:
|
85
|
+
- 0
|
86
|
+
version: "0"
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
none: false
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
hash: 3
|
93
|
+
segments:
|
94
|
+
- 0
|
95
|
+
version: "0"
|
96
|
+
requirements: []
|
97
|
+
|
98
|
+
rubyforge_project: speaker_rate
|
99
|
+
rubygems_version: 1.3.7
|
100
|
+
signing_key:
|
101
|
+
specification_version: 3
|
102
|
+
summary: Gem using HTTParty on the Speaker Rate API
|
103
|
+
test_files:
|
104
|
+
- spec/speaker_rate_spec.rb
|
105
|
+
- spec/spec_helper.rb
|