howcast 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/VERSION +1 -1
- data/howcast-0.5.0.gem +0 -0
- data/howcast.gemspec +3 -2
- data/lib/howcast/client/user.rb +2 -2
- data/spec/howcast/client/user_spec.rb +6 -1
- metadata +4 -3
data/CHANGELOG
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/howcast-0.5.0.gem
ADDED
Binary file
|
data/howcast.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{howcast}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jingshen Jimmy Zhang", "Ian Smith-Heisters"]
|
12
|
-
s.date = %q{2010-03-
|
12
|
+
s.date = %q{2010-03-18}
|
13
13
|
s.description = %q{ Howcast offers an Application Programming Interface (API) which allows
|
14
14
|
developers to build applications that interface with Howcast. The Howcast
|
15
15
|
API is RESTful (REpresentational State Transfer) and users of this API will
|
@@ -31,6 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
"README.markdown",
|
32
32
|
"Rakefile",
|
33
33
|
"VERSION",
|
34
|
+
"howcast-0.5.0.gem",
|
34
35
|
"howcast.gemspec",
|
35
36
|
"lib/howcast.rb",
|
36
37
|
"lib/howcast/client.rb",
|
data/lib/howcast/client/user.rb
CHANGED
@@ -62,8 +62,8 @@ class Howcast::Client
|
|
62
62
|
#
|
63
63
|
# Get the Howcast user with login 'someone'
|
64
64
|
# Howcast::Client.new.user('someone')
|
65
|
-
def user(login)
|
66
|
-
response = establish_connection("users/#{login}/profile/videos.xml")
|
65
|
+
def user(login, options = {})
|
66
|
+
response = establish_connection("users/#{login}/profile/videos#{"/#{options[:page]}" if options[:page]}.xml")
|
67
67
|
parse_single_user_xml(login, response)
|
68
68
|
end
|
69
69
|
|
@@ -22,7 +22,12 @@ describe Howcast::Client, "user" do
|
|
22
22
|
it "should establish a connection with the correct user url" do
|
23
23
|
@hc.should_receive(:open).with(equivalent_uri("http://www.howcast.com/users/someone/profile/videos.xml?api_key=myapikey")).and_return(user_videos_xml)
|
24
24
|
@hc.user('someone')
|
25
|
-
end
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should support a paging option" do
|
28
|
+
@hc.should_receive(:open).with(equivalent_uri("http://www.howcast.com/users/someone/profile/videos/2.xml?api_key=myapikey")).and_return(user_videos_xml)
|
29
|
+
@hc.user('someone', :page => 2)
|
30
|
+
end
|
26
31
|
|
27
32
|
it "should raise Howcast::ApiKeyNotFound error when the response contains Invalid API Key" do
|
28
33
|
lambda {
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
8
|
+
- 1
|
9
|
+
version: 0.5.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jingshen Jimmy Zhang
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-03-
|
18
|
+
date: 2010-03-18 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- README.markdown
|
58
58
|
- Rakefile
|
59
59
|
- VERSION
|
60
|
+
- howcast-0.5.0.gem
|
60
61
|
- howcast.gemspec
|
61
62
|
- lib/howcast.rb
|
62
63
|
- lib/howcast/client.rb
|