oos4ruby 0.2.0 → 0.2.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/lib/oos4ruby/collection.rb +3 -3
- data/lib/oos4ruby/search.rb +2 -2
- data/lib/oos4ruby/version.rb +1 -1
- data/website/index.html +2 -3
- metadata +2 -2
data/lib/oos4ruby/collection.rb
CHANGED
|
@@ -11,7 +11,7 @@ class Collection < Array
|
|
|
11
11
|
@feed = feed
|
|
12
12
|
@auth = auth
|
|
13
13
|
@slug = slug
|
|
14
|
-
evalued_class = Oos4ruby.const_get(self.class.name.gsub(/s$/, ''))
|
|
14
|
+
evalued_class = Oos4ruby.const_get(self.class.name.gsub(/Oos4ruby::/, '').gsub(/s$/, ''))
|
|
15
15
|
@feed.entries.each {|entry| self << evalued_class.new(entry, @auth, @slug) }
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -111,7 +111,7 @@ class Collection < Array
|
|
|
111
111
|
:content_type => file content type
|
|
112
112
|
=end
|
|
113
113
|
def create!(opts = {})
|
|
114
|
-
evalued_class = Oos4ruby.const_get(self.class.name.gsub(/s$/, ''))
|
|
114
|
+
evalued_class = Oos4ruby.const_get(self.class.name.gsub(/Oos4ruby::/, '').gsub(/s$/, ''))
|
|
115
115
|
body = evalued_class.dump! opts, @slug
|
|
116
116
|
unless self.instance_of?Medias
|
|
117
117
|
body = "<?xml version='1.0' ?>\n" + body.to_s
|
|
@@ -125,7 +125,7 @@ class Collection < Array
|
|
|
125
125
|
worked = poster.post content_type, body
|
|
126
126
|
|
|
127
127
|
raise poster.response.message unless worked
|
|
128
|
-
return get_page(@feed.self_link
|
|
128
|
+
return get_page(@feed.self_link).first
|
|
129
129
|
end
|
|
130
130
|
=begin rdoc
|
|
131
131
|
return true if the text of the element is equals to the given value
|
data/lib/oos4ruby/search.rb
CHANGED
|
@@ -17,9 +17,9 @@ class Search
|
|
|
17
17
|
<tt>page</tt>:: page number in the search results
|
|
18
18
|
=end
|
|
19
19
|
def Search.find(auth, opts)
|
|
20
|
-
query = SEARCH_URL
|
|
20
|
+
query = "#{SEARCH_URL}?#{parse_params(opts)}"
|
|
21
21
|
|
|
22
|
-
getter = HTTPInvoker.new
|
|
22
|
+
getter = HTTPInvoker.new query, auth
|
|
23
23
|
|
|
24
24
|
worked = getter.get
|
|
25
25
|
raise RuntimeError.new(getter.response.message) unless worked
|
data/lib/oos4ruby/version.rb
CHANGED
data/website/index.html
CHANGED
|
@@ -33,9 +33,8 @@
|
|
|
33
33
|
<h1>oos4ruby</h1>
|
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/oos4ruby"; return false'>
|
|
35
35
|
<p>Get Version</p>
|
|
36
|
-
<a href="http://rubyforge.org/projects/oos4ruby" class="numbers">0.1
|
|
36
|
+
<a href="http://rubyforge.org/projects/oos4ruby" class="numbers">0.2.1</a>
|
|
37
37
|
</div>
|
|
38
|
-
<h1>&#x2192; ‘oos4ruby’</h1>
|
|
39
38
|
<h2>What</h2>
|
|
40
39
|
<p>oos4ruby is a ruby library to interact with the 11870 <span class="caps">API</span>.</p>
|
|
41
40
|
<h2>Installing</h2>
|
|
@@ -93,7 +92,7 @@
|
|
|
93
92
|
<h2>Contact</h2>
|
|
94
93
|
<p>Comments are welcome. Send an email to <a href="mailto:david.calavera@gmail.com">David Calavera</a> email via the <a href="http://groups.google.com/group/api-11870">forum</a></p>
|
|
95
94
|
<p class="coda">
|
|
96
|
-
<a href="
|
|
95
|
+
<a href="http://thinkincode.net">David Calavera</a>, 19th November 2009<br>
|
|
97
96
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
|
98
97
|
</p>
|
|
99
98
|
</div>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: oos4ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Calavera
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-
|
|
12
|
+
date: 2009-12-02 00:00:00 +01:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|