howcast 0.7.4 → 0.7.15
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/.rspec +2 -0
- data/.rvmrc +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +38 -0
- data/{README.markdown → README.md} +44 -13
- data/Rakefile +6 -39
- data/VERSION +1 -1
- data/fixtures/categories.xml +2230 -0
- data/fixtures/category.1585.xml +24 -0
- data/fixtures/homepage.staff_videos.xml +315 -0
- data/fixtures/invalid.api_key.xml +6 -0
- data/fixtures/playlist.4566.xml +484 -0
- data/fixtures/users.someone.profile.videos.xml +440 -0
- data/fixtures/video.233.generated.xml +1563 -0
- data/fixtures/video.233.xml +830 -0
- data/howcast.gemspec +31 -90
- data/lib/howcast.rb +1 -1
- data/lib/howcast/client.rb +1 -1
- data/lib/howcast/client/base.rb +232 -188
- data/lib/howcast/client/category.rb +31 -13
- data/lib/howcast/client/homepage.rb +10 -8
- data/lib/howcast/client/marker.rb +2 -0
- data/lib/howcast/client/playlist.rb +2 -0
- data/lib/howcast/client/search.rb +11 -11
- data/lib/howcast/client/type.rb +48 -0
- data/lib/howcast/client/user.rb +2 -0
- data/lib/howcast/client/utils.rb +53 -0
- data/lib/howcast/client/video.rb +39 -25
- data/lib/howcast/ext/string.rb +8 -0
- data/lib/howcast/hpricot/elements.rb +22 -0
- data/lib/howcast/version.rb +3 -0
- data/script/github-test.rb +24 -0
- data/spec/howcast/client/base_spec.rb +2 -2
- data/spec/howcast/client/category_spec.rb +41 -2
- data/spec/howcast/client/homepage_spec.rb +8 -8
- data/spec/howcast/client/playlist_spec.rb +6 -4
- data/spec/howcast/client/search_spec.rb +7 -8
- data/spec/howcast/client/user_spec.rb +9 -7
- data/spec/howcast/client/video_spec.rb +106 -22
- data/spec/spec_helper.rb +4 -7
- data/spec/xml_fixtures_helper.rb +20 -2895
- metadata +94 -28
- data/CHANGELOG +0 -108
- data/Manifest +0 -19
- data/howcast-0.7.3.gem +0 -0
- data/spec/string_matchers_helper.rb +0 -22
metadata
CHANGED
@@ -1,63 +1,121 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: howcast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 7
|
8
|
-
-
|
9
|
-
version: 0.7.
|
9
|
+
- 15
|
10
|
+
version: 0.7.15
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Jingshen Jimmy Zhang
|
13
14
|
- Ian Smith-Heisters
|
15
|
+
- Juris Galang
|
14
16
|
autorequire:
|
15
17
|
bindir: bin
|
16
18
|
cert_chain: []
|
17
19
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
20
|
+
date: 2012-05-31 00:00:00 Z
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
23
32
|
prerelease: false
|
24
|
-
requirement:
|
33
|
+
requirement: *id001
|
34
|
+
type: :runtime
|
35
|
+
name: hpricot
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
25
39
|
requirements:
|
26
40
|
- - ">="
|
27
41
|
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
28
43
|
segments:
|
29
44
|
- 0
|
30
45
|
version: "0"
|
46
|
+
prerelease: false
|
47
|
+
requirement: *id002
|
31
48
|
type: :runtime
|
32
|
-
|
49
|
+
name: nokogiri
|
33
50
|
- !ruby/object:Gem::Dependency
|
34
|
-
|
51
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
35
60
|
prerelease: false
|
36
|
-
requirement:
|
61
|
+
requirement: *id003
|
62
|
+
type: :development
|
63
|
+
name: rake
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
37
67
|
requirements:
|
38
68
|
- - ">="
|
39
69
|
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
40
71
|
segments:
|
41
72
|
- 0
|
42
73
|
version: "0"
|
74
|
+
prerelease: false
|
75
|
+
requirement: *id004
|
43
76
|
type: :development
|
44
|
-
|
45
|
-
|
46
|
-
|
77
|
+
name: rspec
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
hash: 3
|
85
|
+
segments:
|
86
|
+
- 0
|
87
|
+
version: "0"
|
88
|
+
prerelease: false
|
89
|
+
requirement: *id005
|
90
|
+
type: :development
|
91
|
+
name: ruby-debug
|
92
|
+
description: " Howcast offers an Application Programming Interface (API) which allows\n developers to build applications that interface with Howcast. The Howcast\n API is RESTful (REpresentational State Transfer) and users of this API will\n be able: 1) Retreive detailed information about a single video, including\n metadata such as title, description, video views, rating etc; 2) Retrieve a\n list of videos restricted by a set of filters offered by Howcast and sorted\n using several metrics that you can specify (most recent, most views, etc);\n 3) Search for video; 4) And much more. Note: Before you can use our APIs,\n you must register an API key, that is submitted with each request.\n "
|
93
|
+
email:
|
94
|
+
- support@howcast.com
|
47
95
|
executables: []
|
48
96
|
|
49
97
|
extensions: []
|
50
98
|
|
51
|
-
extra_rdoc_files:
|
52
|
-
|
99
|
+
extra_rdoc_files: []
|
100
|
+
|
53
101
|
files:
|
54
|
-
-
|
102
|
+
- .gitignore
|
103
|
+
- .rspec
|
104
|
+
- .rvmrc
|
105
|
+
- Gemfile
|
106
|
+
- Gemfile.lock
|
55
107
|
- License.txt
|
56
|
-
-
|
57
|
-
- README.markdown
|
108
|
+
- README.md
|
58
109
|
- Rakefile
|
59
110
|
- VERSION
|
60
|
-
-
|
111
|
+
- fixtures/categories.xml
|
112
|
+
- fixtures/category.1585.xml
|
113
|
+
- fixtures/homepage.staff_videos.xml
|
114
|
+
- fixtures/invalid.api_key.xml
|
115
|
+
- fixtures/playlist.4566.xml
|
116
|
+
- fixtures/users.someone.profile.videos.xml
|
117
|
+
- fixtures/video.233.generated.xml
|
118
|
+
- fixtures/video.233.xml
|
61
119
|
- howcast.gemspec
|
62
120
|
- lib/howcast.rb
|
63
121
|
- lib/howcast/client.rb
|
@@ -67,10 +125,16 @@ files:
|
|
67
125
|
- lib/howcast/client/marker.rb
|
68
126
|
- lib/howcast/client/playlist.rb
|
69
127
|
- lib/howcast/client/search.rb
|
128
|
+
- lib/howcast/client/type.rb
|
70
129
|
- lib/howcast/client/user.rb
|
130
|
+
- lib/howcast/client/utils.rb
|
71
131
|
- lib/howcast/client/video.rb
|
72
132
|
- lib/howcast/errors.rb
|
133
|
+
- lib/howcast/ext/string.rb
|
134
|
+
- lib/howcast/hpricot/elements.rb
|
73
135
|
- lib/howcast/logging.rb
|
136
|
+
- lib/howcast/version.rb
|
137
|
+
- script/github-test.rb
|
74
138
|
- spec/howcast/client/base_spec.rb
|
75
139
|
- spec/howcast/client/category_spec.rb
|
76
140
|
- spec/howcast/client/homepage_spec.rb
|
@@ -81,39 +145,41 @@ files:
|
|
81
145
|
- spec/output_capture_helper.rb
|
82
146
|
- spec/spec.opts
|
83
147
|
- spec/spec_helper.rb
|
84
|
-
- spec/string_matchers_helper.rb
|
85
148
|
- spec/xml_fixtures_helper.rb
|
86
149
|
- tasks/github.rake
|
87
|
-
|
88
|
-
homepage: http://github.com/howcast/howcast-gem
|
150
|
+
homepage: http://api.howcast.com/
|
89
151
|
licenses: []
|
90
152
|
|
91
153
|
post_install_message:
|
92
|
-
rdoc_options:
|
93
|
-
|
154
|
+
rdoc_options: []
|
155
|
+
|
94
156
|
require_paths:
|
95
157
|
- lib
|
96
158
|
required_ruby_version: !ruby/object:Gem::Requirement
|
159
|
+
none: false
|
97
160
|
requirements:
|
98
161
|
- - ">="
|
99
162
|
- !ruby/object:Gem::Version
|
163
|
+
hash: 3
|
100
164
|
segments:
|
101
165
|
- 0
|
102
166
|
version: "0"
|
103
167
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
|
+
none: false
|
104
169
|
requirements:
|
105
170
|
- - ">="
|
106
171
|
- !ruby/object:Gem::Version
|
172
|
+
hash: 3
|
107
173
|
segments:
|
108
174
|
- 0
|
109
175
|
version: "0"
|
110
176
|
requirements: []
|
111
177
|
|
112
|
-
rubyforge_project:
|
113
|
-
rubygems_version: 1.
|
178
|
+
rubyforge_project: howcast
|
179
|
+
rubygems_version: 1.8.15
|
114
180
|
signing_key:
|
115
181
|
specification_version: 3
|
116
|
-
summary: Howcast API
|
182
|
+
summary: Ruby-bindings for the Howcast API
|
117
183
|
test_files:
|
118
184
|
- spec/howcast/client/base_spec.rb
|
119
185
|
- spec/howcast/client/category_spec.rb
|
@@ -123,6 +189,6 @@ test_files:
|
|
123
189
|
- spec/howcast/client/user_spec.rb
|
124
190
|
- spec/howcast/client/video_spec.rb
|
125
191
|
- spec/output_capture_helper.rb
|
192
|
+
- spec/spec.opts
|
126
193
|
- spec/spec_helper.rb
|
127
|
-
- spec/string_matchers_helper.rb
|
128
194
|
- spec/xml_fixtures_helper.rb
|
data/CHANGELOG
DELETED
@@ -1,108 +0,0 @@
|
|
1
|
-
== 0.7.4 2010-04-05
|
2
|
-
|
3
|
-
* Fix bug due to inconsistently named playlist thumbnail elements
|
4
|
-
|
5
|
-
== 0.7.3 2010-04-01
|
6
|
-
|
7
|
-
* Add missing playlist id attribute
|
8
|
-
|
9
|
-
== 0.7.2 2010-04-01
|
10
|
-
|
11
|
-
* Update homepage object per API changes
|
12
|
-
|
13
|
-
== 0.7.1 2010-04-01
|
14
|
-
|
15
|
-
* Update playlist and user objects per API changes
|
16
|
-
|
17
|
-
== 0.7.0 2010-03-19
|
18
|
-
|
19
|
-
* Add playlist object
|
20
|
-
|
21
|
-
== 0.6.0 2010-03-19
|
22
|
-
|
23
|
-
* Add homepage object
|
24
|
-
|
25
|
-
== 0.5.1 2010-03-18
|
26
|
-
|
27
|
-
* Add paging for user object videos
|
28
|
-
|
29
|
-
== 0.5.0 2010-03-17
|
30
|
-
|
31
|
-
* Add user object
|
32
|
-
|
33
|
-
== 0.4.16 2010-03-16
|
34
|
-
|
35
|
-
* Add permalink to category object
|
36
|
-
|
37
|
-
== 0.4.15 2010-03-15
|
38
|
-
|
39
|
-
* Add categories api support
|
40
|
-
|
41
|
-
== 0.4.14 2010-03-10
|
42
|
-
|
43
|
-
* Add filename to video object
|
44
|
-
|
45
|
-
== 0.4.13 2010-03-08
|
46
|
-
|
47
|
-
* add support for category hierarchy, ingredients, markers, and related videos for video object
|
48
|
-
|
49
|
-
== 0.4.9 2009-08-19
|
50
|
-
|
51
|
-
* require hpricot, update readme
|
52
|
-
|
53
|
-
== 0.4.8 2009-08-19
|
54
|
-
|
55
|
-
* Move gem to github, use echoe to clean up configuration, remove dependency on hpricot
|
56
|
-
|
57
|
-
== 0.4.5 2009-07-27
|
58
|
-
|
59
|
-
* Removed guide wrappers, Howcast API just has how-to's which merges old video and guides
|
60
|
-
|
61
|
-
== 0.4.3 2009-03-02
|
62
|
-
|
63
|
-
* Compatibility with ruby 1.9 - replacing dependency on hpricot with why-hpricot as github as the ruby 1.9 hpricot gem
|
64
|
-
|
65
|
-
== 0.4.2 2009-02-04
|
66
|
-
|
67
|
-
* Adding embed code to video object
|
68
|
-
|
69
|
-
== 0.4.1 2008-11-05
|
70
|
-
|
71
|
-
* Support for finding a category ancestor trail from a category object
|
72
|
-
|
73
|
-
== 0.4 2008-11-02
|
74
|
-
|
75
|
-
* Add support for the new category API to get the name and parent ID
|
76
|
-
* Added badges and easy_steps methods for video
|
77
|
-
|
78
|
-
== 0.3.4 2008-08-21
|
79
|
-
|
80
|
-
* Support for new paging scheme in browse pages - ?page=1 => /1
|
81
|
-
|
82
|
-
== 0.3.3 2008-07-25
|
83
|
-
|
84
|
-
* Video dimensions
|
85
|
-
|
86
|
-
== 0.3.2 2008-06-03
|
87
|
-
|
88
|
-
* Clean up with inject
|
89
|
-
|
90
|
-
== 0.3.1 2008-04-08
|
91
|
-
|
92
|
-
* Ability to search in extended mode
|
93
|
-
|
94
|
-
== 0.3 2008-03-27
|
95
|
-
|
96
|
-
* API Key support
|
97
|
-
|
98
|
-
== 0.2 2008-03-11
|
99
|
-
|
100
|
-
* Support for WikiGuide API - list and search
|
101
|
-
|
102
|
-
== 0.1.1 2008-03-04
|
103
|
-
|
104
|
-
* Minor bug fixes and documentation
|
105
|
-
|
106
|
-
== 0.1.0 2008-02-19
|
107
|
-
|
108
|
-
* Initial release
|
data/Manifest
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
CHANGELOG
|
2
|
-
lib/howcast/client/base.rb
|
3
|
-
lib/howcast/client/category.rb
|
4
|
-
lib/howcast/client/search.rb
|
5
|
-
lib/howcast/client/video.rb
|
6
|
-
lib/howcast/client.rb
|
7
|
-
lib/howcast/errors.rb
|
8
|
-
lib/howcast.rb
|
9
|
-
License.txt
|
10
|
-
Manifest
|
11
|
-
Rakefile
|
12
|
-
README.markdown
|
13
|
-
spec/howcast/client/base_spec.rb
|
14
|
-
spec/howcast/client/category_spec.rb
|
15
|
-
spec/howcast/client/search_spec.rb
|
16
|
-
spec/howcast/client/video_spec.rb
|
17
|
-
spec/spec.opts
|
18
|
-
spec/spec_helper.rb
|
19
|
-
tasks/github.rake
|
data/howcast-0.7.3.gem
DELETED
Binary file
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module StringMatchersHelper
|
2
|
-
def to_s_like like
|
3
|
-
simple_matcher("converts to a string like #{like.inspect}") do |candidate|
|
4
|
-
like === candidate.to_s
|
5
|
-
end
|
6
|
-
end
|
7
|
-
|
8
|
-
def equivalent_uri string
|
9
|
-
simple_matcher("is an equivalent uri to #{string.inspect}") do |candidate|
|
10
|
-
verifier = URI.parse string
|
11
|
-
tests = [
|
12
|
-
lambda{|x|x.scheme},
|
13
|
-
lambda{|x|x.userinfo},
|
14
|
-
lambda{|x|x.port},
|
15
|
-
lambda{|x|x.path},
|
16
|
-
lambda{|x|x.query.split('&').sort},
|
17
|
-
lambda{|x|x.fragment}
|
18
|
-
]
|
19
|
-
tests.all?{|t|t.call(candidate) == t.call(verifier)}
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|