appengine-apis 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,5 +19,5 @@ $:.unshift(File.dirname(__FILE__)) unless
19
19
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
20
20
 
21
21
  module AppEngine
22
- VERSION = '0.0.9'
23
- end
22
+ VERSION = '0.0.10'
23
+ end
@@ -73,7 +73,7 @@ module AppEngine
73
73
  # Not indexed.
74
74
  class Text < String
75
75
  def to_java
76
- JavaDatastore::Text.new(self.to_java_string)
76
+ JavaDatastore::Text.new(java.lang.String.new(self))
77
77
  end
78
78
 
79
79
  def self.new_from_java(text)
@@ -109,7 +109,7 @@ module AppEngine
109
109
  #
110
110
  class Link < String
111
111
  def to_java
112
- JavaDatastore::Link.new(self.to_java_string)
112
+ JavaDatastore::Link.new(java.lang.String.new(self))
113
113
  end
114
114
 
115
115
  def self.new_from_java(link)
@@ -120,7 +120,7 @@ module AppEngine
120
120
  # An RFC2822 email address. Makes no attempt at validation.
121
121
  class Email < String
122
122
  def to_java
123
- JavaDatastore::Email.new(self.to_java_string)
123
+ JavaDatastore::Email.new(java.lang.String.new(self))
124
124
  end
125
125
 
126
126
  def self.new_from_java(email)
@@ -135,7 +135,7 @@ module AppEngine
135
135
  # More details: http://www.zeldman.com/daily/0405d.shtml
136
136
  class Category < String
137
137
  def to_java
138
- JavaDatastore::Category.new(self.to_java_string)
138
+ JavaDatastore::Category.new(java.lang.String.new(self))
139
139
  end
140
140
 
141
141
  def self.new_from_java(category)
@@ -150,7 +150,7 @@ module AppEngine
150
150
  # numbering and addressing formats.
151
151
  class PhoneNumber < String
152
152
  def to_java
153
- JavaDatastore::PhoneNumber.new(self.to_java_string)
153
+ JavaDatastore::PhoneNumber.new(java.lang.String.new(self))
154
154
  end
155
155
 
156
156
  def self.new_from_java(phone)
@@ -162,7 +162,7 @@ module AppEngine
162
162
  # no validation is performed.
163
163
  class PostalAddress < String
164
164
  def to_java
165
- JavaDatastore::PostalAddress.new(self.to_java_string)
165
+ JavaDatastore::PostalAddress.new(java.lang.String.new(self))
166
166
  end
167
167
 
168
168
  def self.new_from_java(address)
@@ -532,7 +532,7 @@ module AppEngine
532
532
  when Float
533
533
  java.lang.Double.new(value)
534
534
  when String
535
- value.to_java_string
535
+ java.lang.String.new(value)
536
536
  else
537
537
  value
538
538
  end
@@ -111,6 +111,11 @@ module AppEngine
111
111
  def auth_domain
112
112
  end
113
113
 
114
+ # Returns an opaque string that uniquely identifies the user
115
+ # represented by this User object.
116
+ def user_id
117
+ end
118
+
114
119
  def email
115
120
  end
116
121
  end
@@ -285,6 +285,12 @@ describe AppEngine::Datastore::Rating do
285
285
  l = lambda {AppEngine::Datastore::Rating.new 101}
286
286
  l.should raise_error ArgumentError
287
287
  end
288
+
289
+ it 'should support rating' do
290
+ a = AppEngine::Datastore::Rating.new(33)
291
+ a.rating.should == 33
292
+ a.to_i.should == 33
293
+ end
288
294
  end
289
295
 
290
296
  describe AppEngine::Datastore::GeoPt do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appengine-apis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Brown
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-03 00:00:00 -07:00
12
+ date: 2009-11-02 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency