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 CHANGED
@@ -5,7 +5,7 @@ require 'date'
5
5
  require 'spec/rake/spectask'
6
6
 
7
7
  GEM = "dm-appengine"
8
- GEM_VERSION = "0.1.0"
8
+ GEM_VERSION = "0.1.1"
9
9
  HOMEPAGE = "http://code.google.com/p/appengine-jruby"
10
10
  SUMMARY = "A DataMapper adapter for Google App Engine"
11
11
 
@@ -43,8 +43,20 @@ module DataMapper
43
43
  AppEngine::Testing::install_test_datastore
44
44
  end
45
45
  end
46
- @resource_naming_convention = lambda do |value|
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
 
@@ -1,6 +1,6 @@
1
1
  module DataMapper
2
2
  class Property
3
- class AppEngineNative < Property
3
+ class AppEngineNative < Object
4
4
  primitive ::Object
5
5
 
6
6
  def dump(value)
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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
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-09 00:00:00 -04:00
19
+ date: 2010-09-06 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency