wordnik 4.07 → 4.08
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/Gemfile.lock +14 -10
- data/README.md +24 -18
- data/lib/wordnik.rb +36 -22
- data/lib/wordnik/configuration.rb +20 -8
- data/lib/wordnik/load_balancer.rb +71 -0
- data/lib/wordnik/request.rb +53 -32
- data/lib/wordnik/version.rb +1 -3
- data/spec/100words.txt +100 -0
- data/spec/load_balancer_spec.rb +28 -0
- data/spec/performance.rb +140 -0
- data/spec/request_spec.rb +14 -14
- data/spec/resource_spec.rb +24 -24
- data/spec/response_spec.rb +24 -24
- data/spec/spec_helper.rb +21 -17
- data/spec/wordnik_spec.rb +73 -41
- data/wordnik.gemspec +3 -1
- metadata +125 -25
data/spec/response_spec.rb
CHANGED
|
@@ -4,9 +4,9 @@ describe Wordnik::Response do
|
|
|
4
4
|
|
|
5
5
|
before(:each) do
|
|
6
6
|
|
|
7
|
-
VCR.use_cassette('word_resource', :record => :new_episodes) do
|
|
8
|
-
@raw = Typhoeus::Request.get("http
|
|
9
|
-
end
|
|
7
|
+
#VCR.use_cassette('word_resource', :record => :new_episodes) do
|
|
8
|
+
@raw = Typhoeus::Request.get("http://#{Wordnik.configuration.host}#{Wordnik.configuration.base_path}/word.json")
|
|
9
|
+
#end
|
|
10
10
|
|
|
11
11
|
@response = Wordnik::Response.new(@raw)
|
|
12
12
|
end
|
|
@@ -26,14 +26,14 @@ describe Wordnik::Response do
|
|
|
26
26
|
@response.headers['Wordnik-Api-Version'].to_s.should =~ /^4/
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
|
-
|
|
30
|
-
describe "unauthorized" do
|
|
29
|
+
|
|
30
|
+
describe "unauthorized" do
|
|
31
31
|
it "raises an error when initialized" do
|
|
32
|
-
VCR.use_cassette('get_dog_images', :record => :new_episodes) do
|
|
33
|
-
@unauthorized_raw = Typhoeus::Request.get("http
|
|
32
|
+
#VCR.use_cassette('get_dog_images', :record => :new_episodes) do
|
|
33
|
+
@unauthorized_raw = Typhoeus::Request.get("http://#{Wordnik.configuration.host}#{Wordnik.configuration.base_path}/word.json/dog/images/flickr")
|
|
34
34
|
expect { Wordnik::Response.new(@unauthorized_raw) }.to raise_error(ClientError)
|
|
35
|
-
end
|
|
36
|
-
end
|
|
35
|
+
#end
|
|
36
|
+
end
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
describe "format" do
|
|
@@ -44,43 +44,43 @@ describe Wordnik::Response do
|
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
it "recognizes xml" do
|
|
47
|
-
VCR.use_cassette('xml_response_request', :record => :new_episodes) do
|
|
48
|
-
@raw = Typhoeus::Request.get("http
|
|
49
|
-
end
|
|
47
|
+
#VCR.use_cassette('xml_response_request', :record => :new_episodes) do
|
|
48
|
+
@raw = Typhoeus::Request.get("http://#{Wordnik.configuration.host}#{Wordnik.configuration.base_path}/word.xml")
|
|
49
|
+
#end
|
|
50
50
|
@response = Wordnik::Response.new(@raw)
|
|
51
51
|
@response.format.should == 'xml'
|
|
52
52
|
@response.xml?.should == true
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
end
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
describe "prettiness" do
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
it "has a pretty json body" do
|
|
60
60
|
@response.pretty_body.should =~ /\{.*\}/
|
|
61
61
|
end
|
|
62
|
-
|
|
62
|
+
|
|
63
63
|
it "has a pretty XML body even in the face of adverse characters" do
|
|
64
64
|
configure_wordnik
|
|
65
|
-
VCR.use_cassette('crazier_json_request', :record => :new_episodes) do
|
|
65
|
+
#VCR.use_cassette('crazier_json_request', :record => :new_episodes) do
|
|
66
66
|
@request = Wordnik::Request.new(:get, "word.xml/hero/pronunciations", :params => {:limit => 1})
|
|
67
67
|
@response = @request.response
|
|
68
|
-
end
|
|
68
|
+
#end
|
|
69
69
|
@response.pretty_body.should =~ /\?xml/
|
|
70
|
-
end
|
|
71
|
-
|
|
70
|
+
end
|
|
71
|
+
|
|
72
72
|
it "has a pretty xml body" do
|
|
73
|
-
VCR.use_cassette('xml_response_request', :record => :new_episodes) do
|
|
74
|
-
@raw = Typhoeus::Request.get("http
|
|
75
|
-
end
|
|
73
|
+
#VCR.use_cassette('xml_response_request', :record => :new_episodes) do
|
|
74
|
+
@raw = Typhoeus::Request.get("http://#{Wordnik.configuration.host}#{Wordnik.configuration.base_path}/word.xml")
|
|
75
|
+
#end
|
|
76
76
|
@response = Wordnik::Response.new(@raw)
|
|
77
77
|
@response.pretty_body.should =~ /\?xml/
|
|
78
78
|
end
|
|
79
|
-
|
|
79
|
+
|
|
80
80
|
it "has pretty headers" do
|
|
81
81
|
@response.pretty_headers.should =~ /\{.*\}/
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
end
|
|
86
|
+
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'rubygems'
|
|
2
2
|
require 'bundler/setup'
|
|
3
3
|
require 'wordnik'
|
|
4
|
-
require 'vcr'
|
|
4
|
+
# require 'vcr'
|
|
5
5
|
require 'typhoeus'
|
|
6
6
|
require 'json'
|
|
7
7
|
require 'yaml'
|
|
@@ -11,16 +11,17 @@ RSpec.configure do |config|
|
|
|
11
11
|
# some (optional) config here
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
VCR.config do |config|
|
|
15
|
-
config.cassette_library_dir = 'spec/vcr'
|
|
16
|
-
config.stub_with :webmock # or :fakeweb
|
|
17
|
-
end
|
|
14
|
+
#VCR.config do |config|
|
|
15
|
+
# config.cassette_library_dir = 'spec/vcr'
|
|
16
|
+
# config.stub_with :webmock # or :fakeweb
|
|
17
|
+
#end
|
|
18
18
|
|
|
19
19
|
def help
|
|
20
20
|
puts "\nOh noes! You gotta stuff your wordnik credentials in ~/.wordnik.yml like so:\n\n"
|
|
21
|
-
puts "api_key:
|
|
22
|
-
puts "username:
|
|
23
|
-
puts "password:
|
|
21
|
+
puts "api_key: 12345abcdefg"
|
|
22
|
+
puts "username: fumanchu"
|
|
23
|
+
puts "password: kalamazoo\n\n"
|
|
24
|
+
puts "You can also put host,"
|
|
24
25
|
exit
|
|
25
26
|
end
|
|
26
27
|
|
|
@@ -39,15 +40,12 @@ def configure_wordnik
|
|
|
39
40
|
config.api_key = CREDENTIALS[:api_key]
|
|
40
41
|
config.username = CREDENTIALS[:username]
|
|
41
42
|
config.password = CREDENTIALS[:password]
|
|
42
|
-
config.logger = Logger.new('/dev/null')
|
|
43
|
+
config.logger = CREDENTIALS[:logfile] ? Logger.new(CREDENTIALS[:logfile]) : Logger.new('/dev/null')
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
config.host = CREDENTIALS[:host] || 'beta.wordnik.com'
|
|
46
|
+
config.hosts = CREDENTIALS[:hosts] || []
|
|
47
|
+
config.base_path = CREDENTIALS[:base_path] || '/v4'
|
|
47
48
|
|
|
48
|
-
# SSH tunneling...
|
|
49
|
-
config.host = 'localhost:8001'
|
|
50
|
-
config.base_path = '/admin/api'
|
|
51
49
|
end
|
|
52
50
|
end
|
|
53
51
|
|
|
@@ -59,6 +57,12 @@ def sample_resource_body
|
|
|
59
57
|
end
|
|
60
58
|
end
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
class Object
|
|
61
|
+
def has_suffix?(suffix)
|
|
62
|
+
suffix.respond_to?(:to_str) && self[-suffix.length, suffix.length] == suffix
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# A random string to tack onto stuff to ensure we're not seeing
|
|
63
67
|
# data from a previous test run
|
|
64
|
-
RAND = ("a".."z").to_a.sample(8).join
|
|
68
|
+
RAND = ("a".."z").to_a.sample(8).join
|
data/spec/wordnik_spec.rb
CHANGED
|
@@ -6,47 +6,73 @@ describe Wordnik do
|
|
|
6
6
|
before(:each) do
|
|
7
7
|
configure_wordnik
|
|
8
8
|
end
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
after(:each) do
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
context 'initialization' do
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
context 'URL stuff' do
|
|
16
16
|
|
|
17
|
+
before(:each) do
|
|
18
|
+
Wordnik.clear_configuration
|
|
19
|
+
end
|
|
20
|
+
|
|
17
21
|
context 'host' do
|
|
18
22
|
it 'removes http from host' do
|
|
19
|
-
Wordnik.configure {|c| c.host = 'http://example.com' }
|
|
23
|
+
Wordnik.configure {|c| c.host = 'http://example.com' }
|
|
20
24
|
Wordnik.configuration.host.should == 'example.com'
|
|
21
25
|
end
|
|
22
26
|
|
|
23
27
|
it 'removes https from host' do
|
|
24
|
-
Wordnik.configure {|c| c.host = 'https://wookiee.com' }
|
|
28
|
+
Wordnik.configure {|c| c.host = 'https://wookiee.com' }
|
|
25
29
|
Wordnik.configuration.host.should == 'wookiee.com'
|
|
26
30
|
end
|
|
27
31
|
|
|
28
32
|
it 'removes trailing path from host' do
|
|
29
|
-
Wordnik.configure {|c| c.host = 'hobo.com/v4' }
|
|
33
|
+
Wordnik.configure {|c| c.host = 'hobo.com/v4' }
|
|
30
34
|
Wordnik.configuration.host.should == 'hobo.com'
|
|
31
35
|
end
|
|
32
36
|
end
|
|
33
|
-
|
|
37
|
+
|
|
38
|
+
context 'hosts' do
|
|
39
|
+
it 'removes http from hosts' do
|
|
40
|
+
Wordnik.configure {|c| c.hosts = ['http://example.com'] }
|
|
41
|
+
Wordnik.configuration.hosts.should == ['example.com']
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
it 'removes https from hosts' do
|
|
45
|
+
Wordnik.configure {|c| c.hosts = ['https://wookiee.com'] }
|
|
46
|
+
Wordnik.configuration.hosts.should == ['wookiee.com']
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it 'removes trailing path from hosts' do
|
|
50
|
+
Wordnik.configure {|c| c.hosts = ['hobo.com/v4'] }
|
|
51
|
+
Wordnik.configuration.hosts.should == ['hobo.com']
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
it 'creates a load balancer from hosts' do
|
|
55
|
+
Wordnik.configure {|c| c.hosts = ['hobo.com'] }
|
|
56
|
+
Wordnik.configuration.load_balancer.class.should == Wordnik::LoadBalancer
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
34
60
|
context 'base_path' do
|
|
35
61
|
it "prepends a slash to base_path" do
|
|
36
|
-
Wordnik.configure {|c| c.base_path = 'v4/dog' }
|
|
62
|
+
Wordnik.configure {|c| c.base_path = 'v4/dog' }
|
|
37
63
|
Wordnik.configuration.base_path.should == '/v4/dog'
|
|
38
64
|
end
|
|
39
|
-
|
|
65
|
+
|
|
40
66
|
it "doesn't prepend a slash if one is already there" do
|
|
41
67
|
Wordnik.configure {|c| c.base_path = '/v4/dog' }
|
|
42
68
|
Wordnik.configuration.base_path.should == '/v4/dog'
|
|
43
69
|
end
|
|
44
|
-
|
|
70
|
+
|
|
45
71
|
it "ends up as a blank string if nil" do
|
|
46
72
|
Wordnik.configure {|c| c.base_path = nil }
|
|
47
73
|
Wordnik.configuration.base_path.should == ''
|
|
48
74
|
end
|
|
49
|
-
|
|
75
|
+
|
|
50
76
|
end
|
|
51
77
|
|
|
52
78
|
end
|
|
@@ -56,79 +82,85 @@ describe Wordnik do
|
|
|
56
82
|
Wordnik.resources.class.should == Hash
|
|
57
83
|
Wordnik.resources[:word].class.should == Wordnik::Resource
|
|
58
84
|
end
|
|
59
|
-
|
|
85
|
+
|
|
60
86
|
it 'has as many resources as there are resource names' do
|
|
61
87
|
Wordnik.resources.size.should == Wordnik.configuration.resource_names.size
|
|
62
88
|
end
|
|
63
89
|
|
|
64
90
|
it 'assigns resource keys that match the resource names' do
|
|
65
|
-
Wordnik.resources[:word].name.should == :word
|
|
91
|
+
Wordnik.resources[:word].name.should == :word
|
|
66
92
|
end
|
|
67
93
|
|
|
68
94
|
end
|
|
69
|
-
|
|
95
|
+
|
|
70
96
|
context 'authentication' do
|
|
71
|
-
|
|
97
|
+
|
|
72
98
|
before(:each) do
|
|
73
99
|
end
|
|
74
|
-
|
|
100
|
+
|
|
75
101
|
it 'auto-authenticates at load time if username and password are present'
|
|
76
|
-
|
|
102
|
+
|
|
77
103
|
it 'succeeds if a username and password are present in the configuration' do
|
|
78
|
-
|
|
104
|
+
Wordnik.clear_configuration
|
|
105
|
+
configure_wordnik
|
|
106
|
+
#VCR.use_cassette('wordnik_authenticate', :record => :new_episodes) do
|
|
79
107
|
Wordnik.authenticate
|
|
80
|
-
end
|
|
108
|
+
#end
|
|
81
109
|
Wordnik.authenticated?.should == true
|
|
82
110
|
end
|
|
83
|
-
|
|
111
|
+
|
|
84
112
|
it 'de_authenticates' do
|
|
85
|
-
|
|
113
|
+
Wordnik.clear_configuration
|
|
114
|
+
configure_wordnik
|
|
115
|
+
#VCR.use_cassette('wordnik_authenticate', :record => :new_episodes) do
|
|
86
116
|
Wordnik.authenticate
|
|
87
|
-
end
|
|
117
|
+
#end
|
|
88
118
|
Wordnik.authenticated?.should == true
|
|
89
119
|
Wordnik.de_authenticate
|
|
90
120
|
Wordnik.authenticated?.should == false
|
|
91
121
|
end
|
|
92
|
-
|
|
122
|
+
|
|
93
123
|
it 'fails if credentials are invalid' do
|
|
94
124
|
Wordnik.de_authenticate
|
|
95
125
|
Wordnik.configure do |config|
|
|
96
|
-
|
|
97
|
-
config.
|
|
98
|
-
config.
|
|
99
|
-
config.
|
|
100
|
-
config.
|
|
126
|
+
c = Wordnik.configuration.clone
|
|
127
|
+
config.api_key = c.api_key
|
|
128
|
+
config.username = c.username
|
|
129
|
+
config.password = "wrong!"
|
|
130
|
+
config.host = c.host
|
|
131
|
+
config.base_path = c.base_path
|
|
101
132
|
end
|
|
102
133
|
|
|
103
|
-
VCR.use_cassette('wordnik_authenticate_fail', :record => :new_episodes) do
|
|
134
|
+
#VCR.use_cassette('wordnik_authenticate_fail', :record => :new_episodes) do
|
|
104
135
|
expect { Wordnik.authenticate }.to raise_error(ClientError)
|
|
105
|
-
end
|
|
106
|
-
|
|
136
|
+
#end
|
|
137
|
+
|
|
107
138
|
Wordnik.authenticated?.should == false
|
|
108
139
|
configure_wordnik
|
|
109
140
|
end
|
|
110
|
-
|
|
141
|
+
|
|
111
142
|
it 'fails if username and/or password are absent' do
|
|
112
143
|
Wordnik.de_authenticate
|
|
113
144
|
Wordnik.configure do |config|
|
|
114
|
-
|
|
115
|
-
config.
|
|
145
|
+
c = Wordnik.configuration.clone
|
|
146
|
+
config.api_key = c.api_key
|
|
147
|
+
config.username = c.username
|
|
116
148
|
config.password = nil
|
|
117
|
-
config.host =
|
|
118
|
-
config.base_path =
|
|
149
|
+
config.host = c.host
|
|
150
|
+
config.base_path = c.base_path
|
|
119
151
|
end
|
|
120
152
|
expect { Wordnik.authenticate }.to raise_error(ClientError, /username and password are required/i)
|
|
121
153
|
Wordnik.authenticated?.should == false
|
|
122
154
|
configure_wordnik
|
|
123
155
|
end
|
|
124
|
-
|
|
156
|
+
|
|
125
157
|
end
|
|
126
|
-
|
|
158
|
+
|
|
127
159
|
end
|
|
128
|
-
|
|
160
|
+
|
|
129
161
|
it 'maps shorthand Wordnik.resource calls to their resources' do
|
|
130
162
|
Wordnik.word.class.should == Wordnik::Resource
|
|
131
163
|
Wordnik.word.name.should == :word
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
end
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
end
|
data/wordnik.gemspec
CHANGED
|
@@ -24,8 +24,10 @@ Gem::Specification.new do |s|
|
|
|
24
24
|
s.add_development_dependency 'rspec', '~> 2.8.0'
|
|
25
25
|
s.add_development_dependency 'vcr', '~> 1.11.3'
|
|
26
26
|
s.add_development_dependency 'webmock', '>=1.6.2'
|
|
27
|
-
s.add_development_dependency 'autotest'
|
|
27
|
+
s.add_development_dependency 'autotest'
|
|
28
28
|
s.add_development_dependency 'autotest-rails-pure'
|
|
29
|
+
s.add_development_dependency 'rake'
|
|
30
|
+
s.add_development_dependency 'ruby-prof'
|
|
29
31
|
|
|
30
32
|
s.files = [
|
|
31
33
|
`git ls-files`,
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wordnik
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '4.
|
|
4
|
+
version: '4.08'
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -10,11 +10,11 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2012-
|
|
13
|
+
date: 2012-10-29 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: typhoeus
|
|
17
|
-
requirement:
|
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
|
18
18
|
none: false
|
|
19
19
|
requirements:
|
|
20
20
|
- - ! '>='
|
|
@@ -22,10 +22,15 @@ dependencies:
|
|
|
22
22
|
version: 0.2.1
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
|
-
version_requirements:
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
none: false
|
|
27
|
+
requirements:
|
|
28
|
+
- - ! '>='
|
|
29
|
+
- !ruby/object:Gem::Version
|
|
30
|
+
version: 0.2.1
|
|
26
31
|
- !ruby/object:Gem::Dependency
|
|
27
32
|
name: htmlentities
|
|
28
|
-
requirement:
|
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
34
|
none: false
|
|
30
35
|
requirements:
|
|
31
36
|
- - ! '>='
|
|
@@ -33,10 +38,15 @@ dependencies:
|
|
|
33
38
|
version: 4.2.4
|
|
34
39
|
type: :runtime
|
|
35
40
|
prerelease: false
|
|
36
|
-
version_requirements:
|
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
42
|
+
none: false
|
|
43
|
+
requirements:
|
|
44
|
+
- - ! '>='
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 4.2.4
|
|
37
47
|
- !ruby/object:Gem::Dependency
|
|
38
48
|
name: addressable
|
|
39
|
-
requirement:
|
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
|
40
50
|
none: false
|
|
41
51
|
requirements:
|
|
42
52
|
- - ! '>='
|
|
@@ -44,10 +54,15 @@ dependencies:
|
|
|
44
54
|
version: 2.2.4
|
|
45
55
|
type: :runtime
|
|
46
56
|
prerelease: false
|
|
47
|
-
version_requirements:
|
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
58
|
+
none: false
|
|
59
|
+
requirements:
|
|
60
|
+
- - ! '>='
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: 2.2.4
|
|
48
63
|
- !ruby/object:Gem::Dependency
|
|
49
64
|
name: nokogiri
|
|
50
|
-
requirement:
|
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
|
51
66
|
none: false
|
|
52
67
|
requirements:
|
|
53
68
|
- - ! '>='
|
|
@@ -55,10 +70,15 @@ dependencies:
|
|
|
55
70
|
version: 1.4.4
|
|
56
71
|
type: :runtime
|
|
57
72
|
prerelease: false
|
|
58
|
-
version_requirements:
|
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
74
|
+
none: false
|
|
75
|
+
requirements:
|
|
76
|
+
- - ! '>='
|
|
77
|
+
- !ruby/object:Gem::Version
|
|
78
|
+
version: 1.4.4
|
|
59
79
|
- !ruby/object:Gem::Dependency
|
|
60
80
|
name: activemodel
|
|
61
|
-
requirement:
|
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
|
62
82
|
none: false
|
|
63
83
|
requirements:
|
|
64
84
|
- - ! '>='
|
|
@@ -66,10 +86,15 @@ dependencies:
|
|
|
66
86
|
version: 3.0.3
|
|
67
87
|
type: :runtime
|
|
68
88
|
prerelease: false
|
|
69
|
-
version_requirements:
|
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
90
|
+
none: false
|
|
91
|
+
requirements:
|
|
92
|
+
- - ! '>='
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: 3.0.3
|
|
70
95
|
- !ruby/object:Gem::Dependency
|
|
71
96
|
name: json
|
|
72
|
-
requirement:
|
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
|
73
98
|
none: false
|
|
74
99
|
requirements:
|
|
75
100
|
- - ! '>='
|
|
@@ -77,10 +102,15 @@ dependencies:
|
|
|
77
102
|
version: 1.4.6
|
|
78
103
|
type: :runtime
|
|
79
104
|
prerelease: false
|
|
80
|
-
version_requirements:
|
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
106
|
+
none: false
|
|
107
|
+
requirements:
|
|
108
|
+
- - ! '>='
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: 1.4.6
|
|
81
111
|
- !ruby/object:Gem::Dependency
|
|
82
112
|
name: rspec
|
|
83
|
-
requirement:
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
84
114
|
none: false
|
|
85
115
|
requirements:
|
|
86
116
|
- - ~>
|
|
@@ -88,10 +118,15 @@ dependencies:
|
|
|
88
118
|
version: 2.8.0
|
|
89
119
|
type: :development
|
|
90
120
|
prerelease: false
|
|
91
|
-
version_requirements:
|
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
122
|
+
none: false
|
|
123
|
+
requirements:
|
|
124
|
+
- - ~>
|
|
125
|
+
- !ruby/object:Gem::Version
|
|
126
|
+
version: 2.8.0
|
|
92
127
|
- !ruby/object:Gem::Dependency
|
|
93
128
|
name: vcr
|
|
94
|
-
requirement:
|
|
129
|
+
requirement: !ruby/object:Gem::Requirement
|
|
95
130
|
none: false
|
|
96
131
|
requirements:
|
|
97
132
|
- - ~>
|
|
@@ -99,10 +134,15 @@ dependencies:
|
|
|
99
134
|
version: 1.11.3
|
|
100
135
|
type: :development
|
|
101
136
|
prerelease: false
|
|
102
|
-
version_requirements:
|
|
137
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
138
|
+
none: false
|
|
139
|
+
requirements:
|
|
140
|
+
- - ~>
|
|
141
|
+
- !ruby/object:Gem::Version
|
|
142
|
+
version: 1.11.3
|
|
103
143
|
- !ruby/object:Gem::Dependency
|
|
104
144
|
name: webmock
|
|
105
|
-
requirement:
|
|
145
|
+
requirement: !ruby/object:Gem::Requirement
|
|
106
146
|
none: false
|
|
107
147
|
requirements:
|
|
108
148
|
- - ! '>='
|
|
@@ -110,10 +150,15 @@ dependencies:
|
|
|
110
150
|
version: 1.6.2
|
|
111
151
|
type: :development
|
|
112
152
|
prerelease: false
|
|
113
|
-
version_requirements:
|
|
153
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
154
|
+
none: false
|
|
155
|
+
requirements:
|
|
156
|
+
- - ! '>='
|
|
157
|
+
- !ruby/object:Gem::Version
|
|
158
|
+
version: 1.6.2
|
|
114
159
|
- !ruby/object:Gem::Dependency
|
|
115
160
|
name: autotest
|
|
116
|
-
requirement:
|
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
|
117
162
|
none: false
|
|
118
163
|
requirements:
|
|
119
164
|
- - ! '>='
|
|
@@ -121,10 +166,47 @@ dependencies:
|
|
|
121
166
|
version: '0'
|
|
122
167
|
type: :development
|
|
123
168
|
prerelease: false
|
|
124
|
-
version_requirements:
|
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
170
|
+
none: false
|
|
171
|
+
requirements:
|
|
172
|
+
- - ! '>='
|
|
173
|
+
- !ruby/object:Gem::Version
|
|
174
|
+
version: '0'
|
|
125
175
|
- !ruby/object:Gem::Dependency
|
|
126
176
|
name: autotest-rails-pure
|
|
127
|
-
requirement:
|
|
177
|
+
requirement: !ruby/object:Gem::Requirement
|
|
178
|
+
none: false
|
|
179
|
+
requirements:
|
|
180
|
+
- - ! '>='
|
|
181
|
+
- !ruby/object:Gem::Version
|
|
182
|
+
version: '0'
|
|
183
|
+
type: :development
|
|
184
|
+
prerelease: false
|
|
185
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
186
|
+
none: false
|
|
187
|
+
requirements:
|
|
188
|
+
- - ! '>='
|
|
189
|
+
- !ruby/object:Gem::Version
|
|
190
|
+
version: '0'
|
|
191
|
+
- !ruby/object:Gem::Dependency
|
|
192
|
+
name: rake
|
|
193
|
+
requirement: !ruby/object:Gem::Requirement
|
|
194
|
+
none: false
|
|
195
|
+
requirements:
|
|
196
|
+
- - ! '>='
|
|
197
|
+
- !ruby/object:Gem::Version
|
|
198
|
+
version: '0'
|
|
199
|
+
type: :development
|
|
200
|
+
prerelease: false
|
|
201
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
202
|
+
none: false
|
|
203
|
+
requirements:
|
|
204
|
+
- - ! '>='
|
|
205
|
+
- !ruby/object:Gem::Version
|
|
206
|
+
version: '0'
|
|
207
|
+
- !ruby/object:Gem::Dependency
|
|
208
|
+
name: ruby-prof
|
|
209
|
+
requirement: !ruby/object:Gem::Requirement
|
|
128
210
|
none: false
|
|
129
211
|
requirements:
|
|
130
212
|
- - ! '>='
|
|
@@ -132,7 +214,12 @@ dependencies:
|
|
|
132
214
|
version: '0'
|
|
133
215
|
type: :development
|
|
134
216
|
prerelease: false
|
|
135
|
-
version_requirements:
|
|
217
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
218
|
+
none: false
|
|
219
|
+
requirements:
|
|
220
|
+
- - ! '>='
|
|
221
|
+
- !ruby/object:Gem::Version
|
|
222
|
+
version: '0'
|
|
136
223
|
description: This gem provides a simple interface to the entire Wordnik API. Its methods
|
|
137
224
|
are defined by the documentation that comes from the API itself, so it's guaranteed
|
|
138
225
|
to be up to date.
|
|
@@ -172,6 +259,7 @@ files:
|
|
|
172
259
|
- lib/wordnik.rb
|
|
173
260
|
- lib/wordnik/configuration.rb
|
|
174
261
|
- lib/wordnik/endpoint.rb
|
|
262
|
+
- lib/wordnik/load_balancer.rb
|
|
175
263
|
- lib/wordnik/operation.rb
|
|
176
264
|
- lib/wordnik/operation_parameter.rb
|
|
177
265
|
- lib/wordnik/request.rb
|
|
@@ -194,10 +282,13 @@ files:
|
|
|
194
282
|
- lib/wordnik/resource_modules/words.rb
|
|
195
283
|
- lib/wordnik/response.rb
|
|
196
284
|
- lib/wordnik/version.rb
|
|
285
|
+
- spec/100words.txt
|
|
197
286
|
- spec/active_support_spec.rb
|
|
198
287
|
- spec/endpoint_spec.rb
|
|
288
|
+
- spec/load_balancer_spec.rb
|
|
199
289
|
- spec/operation_parameter_spec.rb
|
|
200
290
|
- spec/operation_spec.rb
|
|
291
|
+
- spec/performance.rb
|
|
201
292
|
- spec/request_spec.rb
|
|
202
293
|
- spec/resource_spec.rb
|
|
203
294
|
- spec/response_spec.rb
|
|
@@ -217,23 +308,32 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
217
308
|
- - ! '>='
|
|
218
309
|
- !ruby/object:Gem::Version
|
|
219
310
|
version: '0'
|
|
311
|
+
segments:
|
|
312
|
+
- 0
|
|
313
|
+
hash: -796298365332589124
|
|
220
314
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
315
|
none: false
|
|
222
316
|
requirements:
|
|
223
317
|
- - ! '>='
|
|
224
318
|
- !ruby/object:Gem::Version
|
|
225
319
|
version: '0'
|
|
320
|
+
segments:
|
|
321
|
+
- 0
|
|
322
|
+
hash: -796298365332589124
|
|
226
323
|
requirements: []
|
|
227
324
|
rubyforge_project: wordnik
|
|
228
|
-
rubygems_version: 1.8.
|
|
325
|
+
rubygems_version: 1.8.24
|
|
229
326
|
signing_key:
|
|
230
327
|
specification_version: 3
|
|
231
328
|
summary: A ruby wrapper for the Wordnik API
|
|
232
329
|
test_files:
|
|
330
|
+
- spec/100words.txt
|
|
233
331
|
- spec/active_support_spec.rb
|
|
234
332
|
- spec/endpoint_spec.rb
|
|
333
|
+
- spec/load_balancer_spec.rb
|
|
235
334
|
- spec/operation_parameter_spec.rb
|
|
236
335
|
- spec/operation_spec.rb
|
|
336
|
+
- spec/performance.rb
|
|
237
337
|
- spec/request_spec.rb
|
|
238
338
|
- spec/resource_spec.rb
|
|
239
339
|
- spec/response_spec.rb
|