merb_datamapper 1.0.7.1 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,3 @@
1
- Merb::Generators::ModelGenerator.option :migration, :as => :boolean, :desc => 'Also generate a dm-migration for the model'
2
-
3
1
  class Merb::Generators::ModelGenerator
4
2
  ##
5
3
  # Corrects case of common datamapper arguments.
@@ -9,7 +7,7 @@ class Merb::Generators::ModelGenerator
9
7
  end
10
8
 
11
9
  def after_generation
12
- STDOUT << message("Don't forget to define the model schema in your #{file_name.capitalize} class")
10
+ STDOUT << message("Don't forget to define the model schema in your #{ Extlib::Inflection.camelize(file_name) } class")
13
11
  end
14
12
 
15
13
  end
@@ -42,7 +42,7 @@ if defined?(Merb::Plugins)
42
42
 
43
43
  # make sure all relationships are initialized after loading
44
44
  descendants = DataMapper::Resource.descendants.dup
45
- descendants.each do |model|
45
+ descendants.dup.each do |model|
46
46
  descendants.merge(model.descendants) if model.respond_to?(:descendants)
47
47
  end
48
48
  descendants.each do |model|
@@ -53,6 +53,17 @@ if defined?(Merb::Plugins)
53
53
  end
54
54
  end
55
55
 
56
+ # wrap action in repository block to enable identity map
57
+ class Application < Merb::Controller
58
+ override! :_call_action
59
+ def _call_action(*)
60
+ repository do |r|
61
+ Merb.logger.debug "In repository block #{r.name}"
62
+ super
63
+ end
64
+ end
65
+ end
66
+
56
67
  generators = File.join(File.dirname(__FILE__), 'generators')
57
68
  Merb.add_generators generators / 'data_mapper_model'
58
69
  Merb.add_generators generators / 'data_mapper_resource_controller'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb_datamapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7.1
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Toy
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-31 00:00:00 -08:00
12
+ date: 2009-01-16 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ~>
42
42
  - !ruby/object:Gem::Version
43
- version: 1.0.7.1
43
+ version: 1.0.8
44
44
  version:
45
45
  description: DataMapper plugin providing DataMapper support for Merb
46
46
  email: jtoy@rubynow.com