viddler-ruby 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/lib/viddler/client.rb +1 -1
- data/lib/viddler/version.rb +1 -1
- data/spec/client_spec.rb +3 -3
- metadata +6 -7
- data/Gemfile.lock +0 -38
data/.gitignore
CHANGED
data/lib/viddler/client.rb
CHANGED
@@ -96,7 +96,7 @@ module Viddler
|
|
96
96
|
def post(method, arguments={})
|
97
97
|
arguments[:api_key] = api_key
|
98
98
|
arguments[:sessionid] = sessionid if authenticated?
|
99
|
-
JSON.parse RestClient.post(DEFAULT_ENDPOINT + method + '.json',
|
99
|
+
JSON.parse RestClient.post(DEFAULT_ENDPOINT + method + '.json', arguments)
|
100
100
|
rescue RestClient::ExceptionWithResponse => e
|
101
101
|
raise_api_exception e
|
102
102
|
end
|
data/lib/viddler/version.rb
CHANGED
data/spec/client_spec.rb
CHANGED
@@ -92,7 +92,7 @@ describe Viddler::Client, "#post" do
|
|
92
92
|
end
|
93
93
|
|
94
94
|
it "calls RestClient.post with proper params" do
|
95
|
-
RestClient.should_receive(:post).with('http://api.viddler.com/api/v2/viddler.api.getInfo.json',
|
95
|
+
RestClient.should_receive(:post).with('http://api.viddler.com/api/v2/viddler.api.getInfo.json', hash_including(:param1 => 'asdf', :param2 => true))
|
96
96
|
@client.post('viddler.api.getInfo', :param1 => 'asdf', :param2 => true)
|
97
97
|
end
|
98
98
|
|
@@ -102,7 +102,7 @@ describe Viddler::Client, "#post" do
|
|
102
102
|
end
|
103
103
|
|
104
104
|
it "includes API key" do
|
105
|
-
RestClient.should_receive(:post).with(anything,
|
105
|
+
RestClient.should_receive(:post).with(anything, hash_including(:api_key => 'abc123'))
|
106
106
|
@client.post('viddler.api.getInfo')
|
107
107
|
end
|
108
108
|
|
@@ -118,7 +118,7 @@ describe Viddler::Client, "#post" do
|
|
118
118
|
end
|
119
119
|
|
120
120
|
it "calls RestClient.post with sessionid" do
|
121
|
-
RestClient.should_receive('post').with(anything,
|
121
|
+
RestClient.should_receive('post').with(anything, hash_including(:sessionid => 'mysess'))
|
122
122
|
@client.post('viddler.api.getInfo', :something => 'yes')
|
123
123
|
end
|
124
124
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: viddler-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 25
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kyle Slattery
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-01-21 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -90,7 +90,6 @@ extra_rdoc_files: []
|
|
90
90
|
files:
|
91
91
|
- .gitignore
|
92
92
|
- Gemfile
|
93
|
-
- Gemfile.lock
|
94
93
|
- LICENSE
|
95
94
|
- README.md
|
96
95
|
- Rakefile
|
@@ -135,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
134
|
requirements: []
|
136
135
|
|
137
136
|
rubyforge_project: viddler-ruby
|
138
|
-
rubygems_version: 1.
|
137
|
+
rubygems_version: 1.4.1
|
139
138
|
signing_key:
|
140
139
|
specification_version: 3
|
141
140
|
summary: An API wrapper for Viddler's v2 API
|
data/Gemfile.lock
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
viddler-ruby (0.0.3)
|
5
|
-
activesupport (> 2.3.0)
|
6
|
-
json
|
7
|
-
rest-client
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: http://rubygems.org/
|
11
|
-
specs:
|
12
|
-
ZenTest (4.4.0)
|
13
|
-
activesupport (2.3.10)
|
14
|
-
diff-lcs (1.1.2)
|
15
|
-
json (1.4.6)
|
16
|
-
mime-types (1.16)
|
17
|
-
rest-client (1.6.1)
|
18
|
-
mime-types (>= 1.16)
|
19
|
-
rspec (2.1.0)
|
20
|
-
rspec-core (~> 2.1.0)
|
21
|
-
rspec-expectations (~> 2.1.0)
|
22
|
-
rspec-mocks (~> 2.1.0)
|
23
|
-
rspec-core (2.1.0)
|
24
|
-
rspec-expectations (2.1.0)
|
25
|
-
diff-lcs (~> 1.1.2)
|
26
|
-
rspec-mocks (2.1.0)
|
27
|
-
|
28
|
-
PLATFORMS
|
29
|
-
ruby
|
30
|
-
|
31
|
-
DEPENDENCIES
|
32
|
-
ZenTest
|
33
|
-
activesupport (> 2.3.0)
|
34
|
-
bundler (>= 1.0.0)
|
35
|
-
json
|
36
|
-
rest-client
|
37
|
-
rspec
|
38
|
-
viddler-ruby!
|