dm-appengine 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/appengine_adapter.rb +14 -2
- data/lib/dm-appengine/properties/native.rb +1 -1
- metadata +4 -4
data/Rakefile
CHANGED
data/lib/appengine_adapter.rb
CHANGED
@@ -43,8 +43,20 @@ module DataMapper
|
|
43
43
|
AppEngine::Testing::install_test_datastore
|
44
44
|
end
|
45
45
|
end
|
46
|
-
|
47
|
-
Extlib::Inflection.pluralize(Extlib::Inflection.camelize(value))
|
46
|
+
self.resource_naming_convention = lambda do |value|
|
47
|
+
Extlib::Inflection.pluralize(Extlib::Inflection.camelize(value)).tap do |name|
|
48
|
+
if name != value
|
49
|
+
warn "Pluralized default storage name '#{name}' is deprecated on App Engine and will be changed! To use singular storage names, MIGRATE YOUR DATA FIRST, then run this sometime after the adapter is setup, but before your models load:"
|
50
|
+
warn ' DataMapper.repository.adapter.singular_naming_convention!'
|
51
|
+
warn "If you are on Rails, place that line somewhere after `require 'rails_dm_datastore'` in environment.rb."
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def singular_naming_convention!
|
58
|
+
self.resource_naming_convention = lambda do |value|
|
59
|
+
value
|
48
60
|
end
|
49
61
|
end
|
50
62
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-appengine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Brown
|
@@ -16,7 +16,7 @@ autorequire: dm-appengine
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-06
|
19
|
+
date: 2010-09-06 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|