merb_datamapper 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,48 +1,8 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
-
4
- # Assume a typical dev checkout to fetch the current merb-core version
5
- require File.expand_path('../../merb/merb-core/lib/merb-core/version', __FILE__)
6
-
7
- # Load this library's version information
8
- require File.expand_path('../lib/merb_datamapper/version', __FILE__)
9
-
10
- begin
11
-
12
- gem 'jeweler', '~> 1.4'
13
- require 'jeweler'
14
-
15
- Jeweler::Tasks.new do |gemspec|
16
-
17
- gemspec.version = Merb::DataMapper::VERSION.dup
18
-
19
- gemspec.name = "merb_datamapper"
20
- gemspec.description = "Merb plugin that provides support for datamapper"
21
- gemspec.summary = "Merb plugin that allows you to use datamapper with your merb app"
22
-
23
- gemspec.authors = [ "Jason Toy" ]
24
- gemspec.email = "jtoy@rubynow.com"
25
- gemspec.homepage = "http://github.com/merb/merb_datamapper"
26
-
27
- gemspec.files = %w(Generators LICENSE Rakefile README TODO) + Dir['{lib,spec}/**/*']
28
-
29
- # Runtime dependencies
30
- gemspec.add_dependency 'merb-core', "~> 1.1"
31
- gemspec.add_dependency 'dm-core', Merb::DataMapper::DM_VERSION_REQUIREMENT
32
- gemspec.add_dependency 'dm-migrations', Merb::DataMapper::DM_VERSION_REQUIREMENT
33
-
34
- # Development dependencies
35
- gemspec.add_development_dependency 'rspec', '>= 1.2.9'
36
-
37
- end
38
-
39
- Jeweler::GemcutterTasks.new
40
-
41
- rescue LoadError
42
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
43
- end
44
-
45
3
  require 'spec/rake/spectask'
4
+ require File.expand_path("../lib/merb_datamapper/version", __FILE__)
5
+
46
6
  Spec::Rake::SpecTask.new(:spec) do |spec|
47
7
  spec.spec_opts << '--options' << 'spec/spec.opts' if File.exists?('spec/spec.opts')
48
8
  spec.libs << 'lib' << 'spec'
@@ -55,5 +15,15 @@ Spec::Rake::SpecTask.new(:rcov) do |spec|
55
15
  spec.rcov = true
56
16
  end
57
17
 
18
+ desc "Build project gem"
19
+ task :build do
20
+ sh "#{RUBY} -S gem build merb_datamapper.gemspec"
21
+ end
22
+
23
+ desc "Build and install gem"
24
+ task :install => :build do
25
+ sh "#{RUBY} -S gem install -l ./merb_datamapper-#{Merb::DataMapper::VERSION}.gem --no-rdoc --no-ri"
26
+ end
27
+
58
28
  desc 'Default: run spec examples'
59
29
  task :default => 'spec'
@@ -60,19 +60,17 @@ class Merb::Orms::DataMapper::Connect < Merb::BootLoader
60
60
  end
61
61
  end
62
62
 
63
- class Merb::Orms::DataMapper::Associations < Merb::BootLoader
63
+ class Merb::Orms::DataMapper::Finalize < Merb::BootLoader
64
64
  after LoadClasses
65
65
 
66
66
  def self.run
67
-
68
- Merb.logger.verbose! 'Merb::Orms::DataMapper::Associations - defining lazy relationship properties'
69
-
70
- DataMapper::Model.descendants.each do |model|
71
- model.relationships.each_value { |r| r.child_key }
67
+ if DataMapper.respond_to?(:finalize)
68
+ DataMapper.finalize
69
+ else
70
+ DataMapper::Model.descendants.each do |model|
71
+ model.relationships.each_value { |r| r.child_key }
72
+ end
72
73
  end
73
-
74
- Merb.logger.verbose! 'Merb::Orms::DataMapper::Associations - complete'
75
-
76
74
  end
77
75
  end
78
76
 
@@ -16,10 +16,12 @@ namespace :db do
16
16
  end
17
17
  desc "Perform automigration"
18
18
  task :automigrate => :merb_env do
19
+ ::DataMapper.finalize if ::DataMapper.respond_to?(:finalize)
19
20
  ::DataMapper.auto_migrate!
20
21
  end
21
22
  desc "Perform non destructive automigration"
22
23
  task :autoupgrade => :merb_env do
24
+ ::DataMapper.finalize if ::DataMapper.respond_to?(:finalize)
23
25
  ::DataMapper.auto_upgrade!
24
26
  end
25
27
 
@@ -1,6 +1,6 @@
1
1
  module Merb
2
2
  module DataMapper
3
- VERSION = '1.1.1'.freeze
4
- DM_VERSION_REQUIREMENT = '~> 0.10'.freeze
3
+ VERSION = '1.1.2'.freeze
4
+ DM_VERSION_REQUIREMENT = '>= 0.10.2'.freeze
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,21 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb_datamapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 1
10
- version: 1.1.1
9
+ - 2
10
+ version: 1.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Toy
14
+ - Jonathan Stott
14
15
  autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-05-21 00:00:00 +01:00
19
+ date: 2010-07-03 00:00:00 +01:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
@@ -39,13 +40,14 @@ dependencies:
39
40
  requirement: &id002 !ruby/object:Gem::Requirement
40
41
  none: false
41
42
  requirements:
42
- - - ~>
43
+ - - ">="
43
44
  - !ruby/object:Gem::Version
44
- hash: 31
45
+ hash: 51
45
46
  segments:
46
47
  - 0
47
48
  - 10
48
- version: "0.10"
49
+ - 2
50
+ version: 0.10.2
49
51
  type: :runtime
50
52
  version_requirements: *id002
51
53
  - !ruby/object:Gem::Dependency
@@ -54,13 +56,14 @@ dependencies:
54
56
  requirement: &id003 !ruby/object:Gem::Requirement
55
57
  none: false
56
58
  requirements:
57
- - - ~>
59
+ - - ">="
58
60
  - !ruby/object:Gem::Version
59
- hash: 31
61
+ hash: 51
60
62
  segments:
61
63
  - 0
62
64
  - 10
63
- version: "0.10"
65
+ - 2
66
+ version: 0.10.2
64
67
  type: :runtime
65
68
  version_requirements: *id003
66
69
  - !ruby/object:Gem::Dependency
@@ -80,54 +83,54 @@ dependencies:
80
83
  type: :development
81
84
  version_requirements: *id004
82
85
  description: Merb plugin that provides support for datamapper
83
- email: jtoy@rubynow.com
86
+ email: jonathan.stott@gmail.com
84
87
  executables: []
85
88
 
86
89
  extensions: []
87
90
 
88
91
  extra_rdoc_files:
89
- - LICENSE
90
92
  - README
93
+ - LICENSE
91
94
  - TODO
92
95
  files:
93
96
  - Generators
94
- - LICENSE
95
- - README
96
97
  - Rakefile
97
- - TODO
98
- - lib/generators/data_mapper_migration.rb
99
- - lib/generators/data_mapper_model.rb
98
+ - lib/merb_datamapper.rb
100
99
  - lib/generators/data_mapper_resource_controller.rb
100
+ - lib/generators/data_mapper_model.rb
101
+ - lib/generators/templates/views/index.html.erb
102
+ - lib/generators/templates/views/new.html.erb
103
+ - lib/generators/templates/views/show.html.erb
104
+ - lib/generators/templates/views/edit.html.erb
101
105
  - lib/generators/templates/migration.rb
102
106
  - lib/generators/templates/model.rb
103
107
  - lib/generators/templates/model_migration.rb
104
108
  - lib/generators/templates/resource_controller.rb
105
- - lib/generators/templates/views/edit.html.erb
106
- - lib/generators/templates/views/index.html.erb
107
- - lib/generators/templates/views/new.html.erb
108
- - lib/generators/templates/views/show.html.erb
109
- - lib/merb_datamapper.rb
110
- - lib/merb_datamapper/connection.rb
109
+ - lib/generators/data_mapper_migration.rb
111
110
  - lib/merb_datamapper/data_mapper_session.rb
112
- - lib/merb_datamapper/database.yml.sample
113
111
  - lib/merb_datamapper/merbtasks.rb
112
+ - lib/merb_datamapper/connection.rb
114
113
  - lib/merb_datamapper/version.rb
115
- - spec/connection_spec.rb
116
- - spec/datamapper_id_map_controller.rb
117
- - spec/datamapper_model.rb
118
- - spec/datamapper_session_controller.rb
119
- - spec/identity_map_spec.rb
120
- - spec/session_spec.rb
114
+ - lib/merb_datamapper/database.yml.sample
121
115
  - spec/session_store_spec.rb
122
116
  - spec/spec.opts
117
+ - spec/connection_spec.rb
118
+ - spec/identity_map_spec.rb
123
119
  - spec/spec_helper.rb
120
+ - spec/datamapper_id_map_controller.rb
121
+ - spec/session_spec.rb
122
+ - spec/datamapper_session_controller.rb
123
+ - spec/datamapper_model.rb
124
+ - README
125
+ - LICENSE
126
+ - TODO
124
127
  has_rdoc: true
125
128
  homepage: http://github.com/merb/merb_datamapper
126
129
  licenses: []
127
130
 
128
131
  post_install_message:
129
- rdoc_options:
130
- - --charset=UTF-8
132
+ rdoc_options: []
133
+
131
134
  require_paths:
132
135
  - lib
133
136
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -155,12 +158,5 @@ rubygems_version: 1.3.7
155
158
  signing_key:
156
159
  specification_version: 3
157
160
  summary: Merb plugin that allows you to use datamapper with your merb app
158
- test_files:
159
- - spec/session_store_spec.rb
160
- - spec/connection_spec.rb
161
- - spec/identity_map_spec.rb
162
- - spec/spec_helper.rb
163
- - spec/datamapper_id_map_controller.rb
164
- - spec/session_spec.rb
165
- - spec/datamapper_session_controller.rb
166
- - spec/datamapper_model.rb
161
+ test_files: []
162
+