clouder 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
- == 0.0.5 2009-01-29
1
+ == 0.5.1 2009-03-09
2
+
3
+ * (timshadel) Added a simple fix to make Note.get(”/notes/“) work.
4
+
5
+ == 0.5.0 2009-01-29
2
6
 
3
7
  * Initial release
@@ -9,7 +9,7 @@ require 'clouder/rest'
9
9
 
10
10
  # The Clouder module holds global server-wide functions.
11
11
  module Clouder
12
- VERSION = '0.5.0'
12
+ VERSION = '0.5.1'
13
13
 
14
14
  # Returns an array of URIs of the resources exposed by
15
15
  # the CloudKit server at the +uri+.
@@ -105,7 +105,7 @@ module Clouder
105
105
  else
106
106
  # /notes/1234
107
107
  if url.path[0,1] == "/"
108
- URI.parse(self.uri) + uri
108
+ (URI.parse(self.uri) + url).to_s
109
109
  # 1234
110
110
  else
111
111
  File.join("#{self.uri}", id)
@@ -138,6 +138,22 @@ describe "Entity" do
138
138
  n.last_modified.should == last_modified
139
139
  end
140
140
 
141
+ it "should let you retrieve saved objects by URI" do
142
+ n = Note.new
143
+ n.text = "My Note"
144
+ n.author = "John Doe"
145
+ n.save
146
+
147
+ id, etag, last_modified = n.id, n.etag, n.last_modified
148
+
149
+ n = Note.get Note.all.first
150
+ n.text.should == "My Note"
151
+ n.author.should == "John Doe"
152
+ n.id.should == id
153
+ n.etag.should == etag
154
+ n.last_modified.should == last_modified
155
+ end
156
+
141
157
  it "should return nil when trying to retrieve a non-existing object" do
142
158
  Note.get("abcdef").should == nil
143
159
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clouder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Demetrius Nunes
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-01 00:00:00 -02:00
12
+ date: 2009-03-09 00:00:00 -03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency