rtunesu 0.2.1 → 0.2.3
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/Manifest.txt +1 -1
- data/README.txt +5 -0
- data/config/hoe.rb +4 -3
- data/lib/rtunesu/connection.rb +8 -1
- data/lib/rtunesu/entities/course.rb +11 -0
- data/lib/rtunesu/entities/group.rb +12 -0
- data/lib/rtunesu/entities/permission.rb +3 -0
- data/lib/rtunesu/entities/section.rb +1 -1
- data/lib/rtunesu/entities/site.rb +11 -0
- data/lib/rtunesu/entities/theme.rb +15 -0
- data/lib/rtunesu/entities/track.rb +11 -1
- data/lib/rtunesu/version.rb +1 -1
- data/spec/user_spec.rb +0 -1
- data/website/index.html +7 -94
- data/website/index.txt +4 -80
- metadata +43 -3
data/Manifest.txt
CHANGED
@@ -15,8 +15,8 @@ lib/rtunesu/entities/group.rb
|
|
15
15
|
lib/rtunesu/entities/permission.rb
|
16
16
|
lib/rtunesu/entities/section.rb
|
17
17
|
lib/rtunesu/entities/site.rb
|
18
|
-
lib/rtunesu/entities/track.rb
|
19
18
|
lib/rtunesu/entities/theme.rb
|
19
|
+
lib/rtunesu/entities/track.rb
|
20
20
|
lib/rtunesu/entity.rb
|
21
21
|
lib/rtunesu/user.rb
|
22
22
|
lib/rtunesu/version.rb
|
data/README.txt
CHANGED
@@ -7,10 +7,15 @@ RTunesU is a ruby library for accessing Apple's iTunes U Webservices to integrat
|
|
7
7
|
- TODO: file uploading
|
8
8
|
|
9
9
|
== SYNOPSIS:
|
10
|
+
see the wiki for more information on using RTunesU:
|
11
|
+
http://github.com/trek/rtunesu/wikis
|
10
12
|
|
11
13
|
== REQUIREMENTS:
|
14
|
+
RTunesU depends on the ruby-hmac, hpricot, and builder libraries. These should all install automatically as dependencies when installing RTunesU
|
12
15
|
|
13
16
|
== INSTALL:
|
17
|
+
RTunesU install via rubygems. wit
|
18
|
+
gem instal rtunesu
|
14
19
|
|
15
20
|
== LICENSE:
|
16
21
|
|
data/config/hoe.rb
CHANGED
@@ -10,7 +10,8 @@ DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
|
|
10
10
|
EXTRA_DEPENDENCIES = [
|
11
11
|
['ruby-hmac', '>= 0.3.1'],
|
12
12
|
['hpricot', '>= 0.6'],
|
13
|
-
['builder', '>= 2.0']
|
13
|
+
['builder', '>= 2.0'],
|
14
|
+
['multipart-post', '>= 0.1']
|
14
15
|
]
|
15
16
|
|
16
17
|
@config_file = "~/.rubyforge/user-config.yml"
|
@@ -63,9 +64,9 @@ $hoe = Hoe.new(GEM_NAME, VERS) do |p|
|
|
63
64
|
|
64
65
|
# == Optional
|
65
66
|
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
66
|
-
|
67
|
+
p.extra_deps = EXTRA_DEPENDENCIES
|
67
68
|
|
68
|
-
|
69
|
+
#p.spec_extras = {} # A hash of extra values to set in the gemspec.
|
69
70
|
end
|
70
71
|
|
71
72
|
CHANGES = $hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
|
data/lib/rtunesu/connection.rb
CHANGED
@@ -4,6 +4,7 @@ require 'hmac'
|
|
4
4
|
require 'hmac-sha2'
|
5
5
|
require 'digest'
|
6
6
|
require 'net/https'
|
7
|
+
require 'net/http/post/multipart'
|
7
8
|
require 'uri'
|
8
9
|
require 'timeout'
|
9
10
|
|
@@ -102,7 +103,13 @@ module RTunesU
|
|
102
103
|
end
|
103
104
|
|
104
105
|
# Uploads a file from the local system to iTunes U.
|
105
|
-
def upload_file(
|
106
|
+
def upload_file(file_path, itunes_location)
|
107
|
+
# url = URI.parse(self.upload_url_for_location(itunes_location))
|
108
|
+
# req = Net::HTTP::Post::Multipart.new(url.path, {"file" => UploadIO.new(file_path, "image/jpeg")})
|
109
|
+
# res = Net::HTTP.start(url.host, url.port) do |http|
|
110
|
+
# http.request(req)
|
111
|
+
# end
|
112
|
+
|
106
113
|
IO::popen('-') do |c|
|
107
114
|
exec "curl -q -F 'file=@#{file.path}' '#{upload_url_for_location(itunes_location)}'"
|
108
115
|
end
|
@@ -1,8 +1,19 @@
|
|
1
1
|
module RTunesU
|
2
2
|
# A Course in iTunes U.
|
3
3
|
# == Attributes
|
4
|
+
# Name
|
5
|
+
# Handle
|
6
|
+
# Instructor
|
7
|
+
# Description
|
8
|
+
# Identifier
|
9
|
+
# ThemeHandle
|
10
|
+
# ShortName
|
11
|
+
|
4
12
|
# == Nested Entities
|
13
|
+
# Permission
|
14
|
+
# Group
|
5
15
|
|
6
16
|
class Course < Entity
|
17
|
+
|
7
18
|
end
|
8
19
|
end
|
@@ -1,8 +1,20 @@
|
|
1
1
|
module RTunesU
|
2
2
|
# A Group in iTunes U. A Group is expressed as a tab in the iTunes interface.
|
3
3
|
# == Attributes
|
4
|
+
# Name
|
5
|
+
# Handle
|
6
|
+
# GroupType
|
7
|
+
# ShortName
|
8
|
+
# AggregateFileSize
|
9
|
+
# AllowSubscription
|
10
|
+
#
|
11
|
+
#
|
4
12
|
# == Nested Entities
|
13
|
+
# Permission
|
5
14
|
# Track
|
15
|
+
# SharedObjects
|
16
|
+
# ExternalFeed
|
17
|
+
|
6
18
|
class Group < Entity
|
7
19
|
end
|
8
20
|
end
|
@@ -1,7 +1,18 @@
|
|
1
1
|
module RTunesU
|
2
2
|
# A Site in iTunes U.
|
3
3
|
# == Attributes
|
4
|
+
# Name
|
5
|
+
# Handle
|
6
|
+
# AllowSubscription
|
7
|
+
# AggregateFileSize
|
8
|
+
# ThemeHandle
|
9
|
+
# LoginURL
|
10
|
+
|
4
11
|
# == Nested Entities
|
12
|
+
# Permission
|
13
|
+
# Theme
|
14
|
+
# LinkCollectionSet
|
15
|
+
# Section
|
5
16
|
class Site
|
6
17
|
end
|
7
18
|
end
|
@@ -1,4 +1,19 @@
|
|
1
1
|
module RTunesU
|
2
|
+
# == Attributes
|
3
|
+
# Name
|
4
|
+
# Handle
|
5
|
+
# BackgroundColor
|
6
|
+
# LineColor
|
7
|
+
# LinkArrowColor
|
8
|
+
# LinkBackgroundColor
|
9
|
+
# LinkBackgroundColorAlpha
|
10
|
+
# LinkBoxColor
|
11
|
+
# LinkTextColor
|
12
|
+
# LinkTitleColor
|
13
|
+
# RegularTextColor
|
14
|
+
# TitleTextColor
|
15
|
+
# TimeFormat
|
16
|
+
# DateFormat
|
2
17
|
class Theme < Entity
|
3
18
|
end
|
4
19
|
end
|
@@ -1,7 +1,17 @@
|
|
1
1
|
module RTunesU
|
2
2
|
# A Track in iTunes U.
|
3
3
|
# == Attributes
|
4
|
-
#
|
4
|
+
# Name
|
5
|
+
# Handle
|
6
|
+
# Kind
|
7
|
+
# TrackNumber
|
8
|
+
# DiscNumber
|
9
|
+
# DurationMilliseconds
|
10
|
+
# AlbumName
|
11
|
+
# ArtistName
|
12
|
+
# GenreName
|
13
|
+
# DownloadURL
|
14
|
+
# Comment
|
5
15
|
class Track < Entity
|
6
16
|
# Tracks can only be found from within their Course. There is currently no way to find a Track separete from its Course.
|
7
17
|
def self.find(handle, course_handle, connection)
|
data/lib/rtunesu/version.rb
CHANGED
data/spec/user_spec.rb
CHANGED
data/website/index.html
CHANGED
@@ -33,104 +33,17 @@
|
|
33
33
|
<h1>rtunesu</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/rtunesu"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/rtunesu" class="numbers">0.2.
|
36
|
+
<a href="http://rubyforge.org/projects/rtunesu" class="numbers">0.2.3</a>
|
37
37
|
</div>
|
38
|
-
<
|
38
|
+
<h2>Code
|
39
|
+
RTunesU is hosted on github: <a href="http://github.com/trek/rtunesu/tree/master">http://github.com/trek/rtunesu/tree/master</a></h2>
|
39
40
|
|
40
41
|
|
41
|
-
<h2>
|
42
|
-
|
43
|
-
|
44
|
-
<h2>Installing</h2>
|
45
|
-
|
46
|
-
|
47
|
-
<p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">rtunesu</span></pre></p>
|
48
|
-
|
49
|
-
|
50
|
-
<h2>The basics</h2>
|
51
|
-
|
52
|
-
|
53
|
-
<h2>Demonstration of usage</h2>
|
54
|
-
|
55
|
-
|
56
|
-
<h2>Forum</h2>
|
57
|
-
|
58
|
-
|
59
|
-
<p><a href="http://groups.google.com/group/rtunesu">http://groups.google.com/group/rtunesu</a></p>
|
60
|
-
|
61
|
-
|
62
|
-
<p><span class="caps">TODO</span> – create Google Group – rtunesu</p>
|
63
|
-
|
64
|
-
|
65
|
-
<h2>How to submit patches</h2>
|
66
|
-
|
67
|
-
|
68
|
-
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
69
|
-
|
70
|
-
|
71
|
-
<p><span class="caps">TODO</span> – pick <span class="caps">SVN</span> or Git instructions</p>
|
72
|
-
|
73
|
-
|
74
|
-
<p>The trunk repository is <code>svn://rubyforge.org/var/svn/rtunesu/trunk</code> for anonymous access.</p>
|
75
|
-
|
76
|
-
|
77
|
-
<p><span class="caps">OOOORRRR</span></p>
|
78
|
-
|
79
|
-
|
80
|
-
<p>You can fetch the source from either:</p>
|
81
|
-
|
82
|
-
|
83
|
-
<ul>
|
84
|
-
<li>rubyforge: <span class="caps">MISSING IN ACTION</span></li>
|
85
|
-
</ul>
|
86
|
-
|
87
|
-
|
88
|
-
<p><span class="caps">TODO</span> – You can not created a RubyForge project, OR have not run <code>rubyforge config</code>
|
89
|
-
yet to refresh your local rubyforge data with this projects’ id information.</p>
|
90
|
-
|
91
|
-
|
92
|
-
<p>When you do this, this message will magically disappear!</p>
|
93
|
-
|
94
|
-
|
95
|
-
<p>Or you can hack website/index.txt and make it all go away!!</p>
|
96
|
-
|
97
|
-
|
98
|
-
<ul>
|
99
|
-
<li>github: <a href="http://github.com/GITHUB_USERNAME/rtunesu/tree/master">http://github.com/GITHUB_USERNAME/rtunesu/tree/master</a></li>
|
100
|
-
</ul>
|
101
|
-
|
102
|
-
|
103
|
-
<pre>git clone git://github.com/GITHUB_USERNAME/rtunesu.git</pre>
|
104
|
-
|
105
|
-
<p><span class="caps">TODO</span> – add “github_username: username” to ~/.rubyforge/user-config.yml and newgem will reuse it for future projects.</p>
|
106
|
-
|
107
|
-
|
108
|
-
<ul>
|
109
|
-
<li>gitorious: <a href="git://gitorious.org/rtunesu/mainline.git">git://gitorious.org/rtunesu/mainline.git</a></li>
|
110
|
-
</ul>
|
111
|
-
|
112
|
-
|
113
|
-
<pre>git clone git://gitorious.org/rtunesu/mainline.git</pre>
|
114
|
-
|
115
|
-
<h3>Build and test instructions</h3>
|
116
|
-
|
117
|
-
|
118
|
-
<pre>cd rtunesu
|
119
|
-
rake test
|
120
|
-
rake install_gem</pre>
|
121
|
-
|
122
|
-
<h2>License</h2>
|
123
|
-
|
124
|
-
|
125
|
-
<p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
|
126
|
-
|
127
|
-
|
128
|
-
<h2>Contact</h2>
|
129
|
-
|
130
|
-
|
131
|
-
<p>Comments are welcome. Send an email to <a href="mailto:FIXME"><span class="caps">FIXME</span> full name</a> email via the <a href="http://groups.google.com/group/rtunesu">forum</a></p>
|
42
|
+
<h2>Installing
|
43
|
+
RTunesU can be installed via rubygems with
|
44
|
+
gem install rtunesu</h2>
|
132
45
|
<p class="coda">
|
133
|
-
<a href="FIXME email">FIXME full name</a>,
|
46
|
+
<a href="FIXME email">FIXME full name</a>, 1st August 2008<br>
|
134
47
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
135
48
|
</p>
|
136
49
|
</div>
|
data/website/index.txt
CHANGED
@@ -1,83 +1,7 @@
|
|
1
1
|
h1. rtunesu
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
h2. What
|
7
|
-
|
2
|
+
h2. Code
|
3
|
+
RTunesU is hosted on github: "http://github.com/trek/rtunesu/tree/master":http://github.com/trek/rtunesu/tree/master
|
8
4
|
|
9
5
|
h2. Installing
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
h2. The basics
|
14
|
-
|
15
|
-
|
16
|
-
h2. Demonstration of usage
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
h2. Forum
|
21
|
-
|
22
|
-
"http://groups.google.com/group/rtunesu":http://groups.google.com/group/rtunesu
|
23
|
-
|
24
|
-
TODO - create Google Group - rtunesu
|
25
|
-
|
26
|
-
h2. How to submit patches
|
27
|
-
|
28
|
-
Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
|
29
|
-
|
30
|
-
TODO - pick SVN or Git instructions
|
31
|
-
|
32
|
-
The trunk repository is <code>svn://rubyforge.org/var/svn/rtunesu/trunk</code> for anonymous access.
|
33
|
-
|
34
|
-
OOOORRRR
|
35
|
-
|
36
|
-
You can fetch the source from either:
|
37
|
-
|
38
|
-
<% if rubyforge_project_id %>
|
39
|
-
|
40
|
-
* rubyforge: "http://rubyforge.org/scm/?group_id=<%= rubyforge_project_id %>":http://rubyforge.org/scm/?group_id=<%= rubyforge_project_id %>
|
41
|
-
|
42
|
-
<pre>git clone git://rubyforge.org/rtunesu.git</pre>
|
43
|
-
|
44
|
-
<% else %>
|
45
|
-
|
46
|
-
* rubyforge: MISSING IN ACTION
|
47
|
-
|
48
|
-
TODO - You can not created a RubyForge project, OR have not run <code>rubyforge config</code>
|
49
|
-
yet to refresh your local rubyforge data with this projects' id information.
|
50
|
-
|
51
|
-
When you do this, this message will magically disappear!
|
52
|
-
|
53
|
-
Or you can hack website/index.txt and make it all go away!!
|
54
|
-
|
55
|
-
<% end %>
|
56
|
-
|
57
|
-
* github: "http://github.com/GITHUB_USERNAME/rtunesu/tree/master":http://github.com/GITHUB_USERNAME/rtunesu/tree/master
|
58
|
-
|
59
|
-
<pre>git clone git://github.com/GITHUB_USERNAME/rtunesu.git</pre>
|
60
|
-
|
61
|
-
|
62
|
-
TODO - add "github_username: username" to ~/.rubyforge/user-config.yml and newgem will reuse it for future projects.
|
63
|
-
|
64
|
-
|
65
|
-
* gitorious: "git://gitorious.org/rtunesu/mainline.git":git://gitorious.org/rtunesu/mainline.git
|
66
|
-
|
67
|
-
<pre>git clone git://gitorious.org/rtunesu/mainline.git</pre>
|
68
|
-
|
69
|
-
h3. Build and test instructions
|
70
|
-
|
71
|
-
<pre>cd rtunesu
|
72
|
-
rake test
|
73
|
-
rake install_gem</pre>
|
74
|
-
|
75
|
-
|
76
|
-
h2. License
|
77
|
-
|
78
|
-
This code is free to use under the terms of the MIT license.
|
79
|
-
|
80
|
-
h2. Contact
|
81
|
-
|
82
|
-
Comments are welcome. Send an email to "FIXME full name":mailto:FIXME email via the "forum":http://groups.google.com/group/rtunesu
|
83
|
-
|
6
|
+
RTunesU can be installed via rubygems with
|
7
|
+
gem install rtunesu
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rtunesu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trek Glowacki
|
@@ -9,9 +9,49 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-09-09 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: ruby-hmac
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.3.1
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: hpricot
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0.6"
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: builder
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: "2.0"
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: multipart-post
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: "0.1"
|
54
|
+
version:
|
15
55
|
- !ruby/object:Gem::Dependency
|
16
56
|
name: hoe
|
17
57
|
type: :development
|
@@ -53,8 +93,8 @@ files:
|
|
53
93
|
- lib/rtunesu/entities/permission.rb
|
54
94
|
- lib/rtunesu/entities/section.rb
|
55
95
|
- lib/rtunesu/entities/site.rb
|
56
|
-
- lib/rtunesu/entities/track.rb
|
57
96
|
- lib/rtunesu/entities/theme.rb
|
97
|
+
- lib/rtunesu/entities/track.rb
|
58
98
|
- lib/rtunesu/entity.rb
|
59
99
|
- lib/rtunesu/user.rb
|
60
100
|
- lib/rtunesu/version.rb
|