dribble 0.1.0 → 0.1.1
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/LICENSE +1 -1
- data/README.rdoc +89 -12
- data/Rakefile +8 -5
- data/VERSION +1 -1
- data/dribble.gemspec +28 -14
- data/examples/barebones/player.rb +10 -10
- data/examples/barebones/shot.rb +12 -12
- data/examples/player.rb +15 -15
- data/lib/dribble/request.rb +24 -7
- data/lib/dribble.rb +2 -3
- data/spec/core_ext/hash_spec.rb +94 -0
- data/spec/core_ext/object_spec.rb +44 -0
- data/spec/dribble/api/player_spec.rb +200 -0
- data/spec/dribble/api/shot_spec.rb +184 -0
- data/spec/dribble/version_spec.rb +19 -0
- data/spec/fake_data/player/player_draftees.json +1 -0
- data/spec/fake_data/player/player_find_shots.json +1 -0
- data/spec/fake_data/player/player_followers.json +1 -0
- data/spec/fake_data/player/player_following_shots.json +1 -0
- data/spec/fake_data/player/player_profile.json +1 -0
- data/spec/fake_data/shot/shot_debuts.json +1 -0
- data/spec/fake_data/shot/shot_everyones.json +1 -0
- data/spec/fake_data/shot/shot_for.json +1 -0
- data/spec/fake_data/shot/shot_popular.json +1 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/support/fake_eventmachine_requests.rb +43 -0
- metadata +32 -18
- data/spec/dribble/core_ext/hash_spec.rb +0 -56
- data/spec/dribble/core_ext/object_spec.rb +0 -19
- data/spec/rcov.opts +0 -4
- data/spec/support/fakeweb_yajl.rb +0 -17
@@ -1,19 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
|
2
|
-
|
3
|
-
describe "Object Extensions" do
|
4
|
-
|
5
|
-
before(:all) do
|
6
|
-
@namespace = 'dribble'
|
7
|
-
@key = 'name'
|
8
|
-
@value = 'simplebits'
|
9
|
-
end
|
10
|
-
|
11
|
-
it "should create a key value like: name=simplebits" do
|
12
|
-
@value.to_query(@key).should == 'name=simplebits'
|
13
|
-
end
|
14
|
-
|
15
|
-
it "should send back a key value string with namespace like: dribble[name]=simplebits, but encoded" do
|
16
|
-
@value.to_query("#{@namespace}[#{@key}]").should == 'dribble%5Bname%5D=simplebits'
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
data/spec/rcov.opts
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
module Yajl
|
2
|
-
class HttpStream
|
3
|
-
class << self
|
4
|
-
|
5
|
-
def fake_get(uri, opts={}, &block)
|
6
|
-
yajl = ::Yajl::Parser.new(:symbolize_keys => true)
|
7
|
-
case uri.to_s
|
8
|
-
when condition
|
9
|
-
else
|
10
|
-
raise HttpError.new("TEST: Unknown uri: #{uri.to_s}")
|
11
|
-
end
|
12
|
-
end
|
13
|
-
alias_method :get, :fake_get
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|