oos4ruby 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -22,3 +22,8 @@
22
22
  * collection goes to array (deprecated sintax "entries")
23
23
  * contacts bugs fixed
24
24
  * collections total size bug fixed
25
+
26
+ == 0.1.4 2008-01-10
27
+
28
+ *1 bugs fixed:
29
+ * see this thread: http://tinyurl.com/253a2d (thanks to Luismi Cavallé)
data/lib/oos4ruby/bean.rb CHANGED
@@ -1,5 +1,4 @@
1
- include Oos4ruby
2
-
1
+ module Oos4ruby
3
2
  module Bean #:nodoc:
4
3
  def self.append_features(base)
5
4
  super
@@ -186,4 +185,5 @@ module Bean #:nodoc:
186
185
 
187
186
  end
188
187
  end
188
+ end
189
189
 
@@ -1,7 +1,6 @@
1
- include Bean
2
-
3
1
  module Oos4ruby
4
2
  class Category
3
+ include Bean
5
4
 
6
5
  define_attr_reader({
7
6
  AtomNamespace => [:term, :scheme],
@@ -103,12 +103,12 @@ class Collection < Array
103
103
  :country => a hash with :name and :slug (required)
104
104
  :summary => review title
105
105
  :content or :review_content => review_content
106
- :privacy => a REXML::Element from 11870 privacy scheme or a string with "true" or "false"
106
+ :privacy => a REXML::Element from 11870 privacy scheme or one of the next strings => "public", "trustedContacts", "contacts", "private"
107
107
  :tags => an array of tags
108
108
  :lists => an array of lists
109
109
  * if you want to create a Contact:
110
110
  :contact or :slug or :title => the new contact slug
111
- :trusted => a REXML::Element from 11870 trusted scheme or one of the next strings => "public", "trustedContacts", "contacts", "private"
111
+ :trusted => a REXML::Element from 11870 trusted scheme or a string with "true" or "false"
112
112
  * if you want to create a Media:
113
113
  :file => the new media file system path or a File object
114
114
  :content_length => file size
@@ -1,8 +1,6 @@
1
-
2
- include Bean
3
-
4
1
  module Oos4ruby
5
- class Contact < BeanClass
2
+ class Contact < Bean::BeanClass
3
+ include Bean
6
4
 
7
5
  define_el_reader AtomNamespace => [:title, :updated]
8
6
 
@@ -1,10 +1,9 @@
1
-
2
- include Bean
3
-
4
1
  module Oos4ruby
5
2
  class Media < Bean::BeanClass
3
+ include Bean
6
4
 
7
5
  define_el_reader AtomNamespace => [:title, :updated, :content]
6
+ define_attr_reader AtomNamespace => {:content => :type, :content => :src}
8
7
 
9
8
  attr_writer :title
10
9
 
@@ -25,10 +24,7 @@ module Oos4ruby
25
24
 
26
25
  private
27
26
  def load!
28
- if @title
29
- @xml.child('title').text = @title
30
- end
31
- end
32
-
27
+ @xml.child('title').text = @title if @title
28
+ end
33
29
  end
34
30
  end
data/lib/oos4ruby/site.rb CHANGED
@@ -1,9 +1,6 @@
1
-
2
- require 'date'
3
- include Bean
4
-
5
1
  module Oos4ruby
6
2
  class Site < Bean::BeanClass
3
+ include Bean
7
4
 
8
5
  define_el_reader(
9
6
  {
@@ -54,6 +51,8 @@ class Site < Bean::BeanClass
54
51
  end
55
52
 
56
53
  def Site.dump!(opts, slug)
54
+ require 'date'
55
+
57
56
  entry = create_entry
58
57
 
59
58
  entry.add_element opts[:author]
data/lib/oos4ruby/user.rb CHANGED
@@ -1,10 +1,6 @@
1
-
2
- require 'mime/types'
3
-
4
- include Bean
5
-
6
1
  module Oos4ruby
7
2
  class User < Bean::BeanClass
3
+ include Bean
8
4
 
9
5
  define_el_reader({
10
6
  OosNamespace => [:name, :surname, :no_mails, :only_contacts, :no_newsletter],
@@ -92,6 +88,8 @@ class User < Bean::BeanClass
92
88
  end
93
89
 
94
90
  def update_avatar!(file_path)
91
+ require 'mime/types'
92
+
95
93
  file = File.open(file_path, "rb") { |f| f.read }
96
94
 
97
95
  putter = HTTPInvoker.new(@xml.link('edit-media'), @auth)
@@ -2,7 +2,7 @@ module Oos4ruby #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 3
5
+ TINY = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -26,8 +26,8 @@ task :install_gem_no_doc => [:clean, :package] do
26
26
  sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
27
27
  end
28
28
 
29
- desc 'Tag the latest release'
30
- task :tag_version do
29
+ desc 'Tag the latest release in google code repository'
30
+ task :tag_version_released do
31
31
  sh "svn copy https://api-11870.googlecode.com/svn/trunk/oos4ruby " +
32
32
  "https://api-11870.googlecode.com/svn/tags/oos4ruby/REL-#{VERS} --username david.calavera"
33
33
  end
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
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.3</a>
36
+ <a href="http://rubyforge.org/projects/oos4ruby" class="numbers">0.1.4</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;oos4ruby&#8217;</h1>
39
39
 
@@ -150,7 +150,7 @@
150
150
 
151
151
  <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>
152
152
  <p class="coda">
153
- <a href="FIXME email">David Calavera</a>, 2nd November 2007<br>
153
+ <a href="FIXME email">David Calavera</a>, 13th November 2007<br>
154
154
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
155
155
  </p>
156
156
  </div>
metadata CHANGED
@@ -1,33 +1,38 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
3
- specification_version: 1
4
2
  name: oos4ruby
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.1.3
7
- date: 2007-11-02 00:00:00 +01:00
8
- summary: oos4ruby is a ruby binding for the 11870 API
9
- require_paths:
10
- - lib
11
- email: david.calavera@gmail.com
12
- homepage: http://oos4r.rubyforge.org
13
- rubyforge_project: oos4r
14
- description: oos4ruby is a ruby binding for the 11870 API
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
25
- platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
4
+ version: 0.1.4
5
+ platform: ""
29
6
  authors:
30
7
  - David Calavera
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-01-10 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: mime-types
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: "1.5"
23
+ version:
24
+ description: oos4ruby is a ruby binding for the 11870 API
25
+ email: david.calavera@gmail.com
26
+ executables: []
27
+
28
+ extensions: []
29
+
30
+ extra_rdoc_files:
31
+ - History.txt
32
+ - License.txt
33
+ - Manifest.txt
34
+ - README.txt
35
+ - website/index.txt
31
36
  files:
32
37
  - History.txt
33
38
  - License.txt
@@ -70,31 +75,33 @@ files:
70
75
  - website/javascripts/rounded_corners_lite.inc.js
71
76
  - website/stylesheets/screen.css
72
77
  - website/template.rhtml
73
- test_files:
74
- - test/test_helper.rb
75
- - test/test_oos4ruby.rb
78
+ has_rdoc: true
79
+ homepage: http://oos4r.rubyforge.org
80
+ post_install_message:
76
81
  rdoc_options:
77
82
  - --main
78
83
  - README.txt
79
- extra_rdoc_files:
80
- - History.txt
81
- - License.txt
82
- - Manifest.txt
83
- - README.txt
84
- - website/index.txt
85
- executables: []
86
-
87
- extensions: []
88
-
84
+ require_paths:
85
+ - lib
86
+ required_ruby_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: "0"
91
+ version:
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: "0"
97
+ version:
89
98
  requirements: []
90
99
 
91
- dependencies:
92
- - !ruby/object:Gem::Dependency
93
- name: mime-types
94
- version_requirement:
95
- version_requirements: !ruby/object:Gem::Version::Requirement
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: "1.5"
100
- version:
100
+ rubyforge_project: oos4r
101
+ rubygems_version: 0.9.5
102
+ signing_key:
103
+ specification_version: 2
104
+ summary: oos4ruby is a ruby binding for the 11870 API
105
+ test_files:
106
+ - test/test_oos4ruby.rb
107
+ - test/test_helper.rb