merb_activerecord 0.9.6 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ GEM_EMAIL = "canadaduane@gmail.com"
17
17
 
18
18
  GEM_NAME = "merb_activerecord"
19
19
  PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
20
- GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.6") + PKG_BUILD
20
+ GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.7") + PKG_BUILD
21
21
 
22
22
  RELEASE_NAME = "REL #{GEM_VERSION}"
23
23
 
@@ -35,7 +35,7 @@ spec = Gem::Specification.new do |s|
35
35
  s.author = GEM_AUTHOR
36
36
  s.email = GEM_EMAIL
37
37
  s.homepage = PROJECT_URL
38
- s.add_dependency('merb-core', '>= 0.9.6')
38
+ s.add_dependency('merb-core', '>= 0.9.7')
39
39
  s.require_path = 'lib'
40
40
  s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*") end
41
41
 
@@ -1,4 +1,4 @@
1
- Merb::Generators::MigrationGenerator.template :migration_activerecord, :orm => :activerecord do
2
- source(File.dirname(__FILE__), 'templates/migration/schema/migrations/%file_name%.rb')
3
- destination("#{destination_directory}/#{file_name}.rb")
1
+ Merb::Generators::MigrationGenerator.template :migration_activerecord, :orm => :activerecord do |t|
2
+ t.source = File.dirname(__FILE__) / 'templates/migration/schema/migrations/%file_name%.rb'
3
+ t.destination = "#{destination_directory}/#{file_name}.rb"
4
4
  end
@@ -1,6 +1,6 @@
1
- Merb::Generators::ModelGenerator.template :model_activerecord, :orm => :activerecord do
2
- source(File.dirname(__FILE__), "templates/model/app/models/%file_name%.rb")
3
- destination("app/models", base_path, "#{file_name}.rb")
1
+ Merb::Generators::ModelGenerator.template :model_activerecord, :orm => :activerecord do |t|
2
+ t.source = File.dirname(__FILE__) / "templates/model/app/models/%file_name%.rb"
3
+ t.destination = "app/models" / base_path / "#{file_name}.rb"
4
4
  end
5
5
 
6
6
  Merb::Generators::ModelGenerator.invoke :migration, :orm => :activerecord do |generator|
@@ -1,12 +1,12 @@
1
- Merb::Generators::ResourceControllerGenerator.template :controller_activerecord, :orm => :activerecord do
2
- source(File.dirname(__FILE__), "templates/resource_controller/app/controllers/%file_name%.rb")
3
- destination("app/controllers", base_path, "#{file_name}.rb")
1
+ Merb::Generators::ResourceControllerGenerator.template :controller_activerecord, :orm => :activerecord do |t|
2
+ t.source = File.dirname(__FILE__) / "templates/resource_controller/app/controllers/%file_name%.rb"
3
+ t.destination = "app/controllers" / base_path / "#{file_name}.rb"
4
4
  end
5
5
 
6
6
  [:index, :show, :edit, :new].each do |view|
7
7
  Merb::Generators::ResourceControllerGenerator.template "view_#{view}_activerecord".to_sym,
8
- :orm => :activerecord, :template_engine => :erb do
9
- source(File.dirname(__FILE__), "templates/resource_controller/app/views/%file_name%/#{view}.html.erb")
10
- destination("app/views", base_path, "#{file_name}/#{view}.html.erb")
8
+ :orm => :activerecord, :template_engine => :erb do |t|
9
+ t.source = File.dirname(__FILE__) / "templates/resource_controller/app/views/%file_name%/#{view}.html.erb"
10
+ t.destination = "app/views" / base_path / "#{file_name}/#{view}.html.erb"
11
11
  end
12
12
  end
@@ -1,4 +1,4 @@
1
- Merb::Generators::SessionMigrationGenerator.template :session_migration_activerecord, :orm => :activerecord do
2
- source(File.dirname(__FILE__), 'templates/session_migration/schema/migrations/%version%_database_sessions.rb')
3
- destination("schema/migrations/#{version}_database_sessions.rb")
1
+ Merb::Generators::SessionMigrationGenerator.template :session_migration_activerecord, :orm => :activerecord do |t|
2
+ t.source = File.dirname(__FILE__) / 'templates/session_migration/schema/migrations/%version%_database_sessions.rb'
3
+ t.destination = "schema/migrations/#{version}_database_sessions.rb"
4
4
  end
@@ -1,5 +1,4 @@
1
1
  require 'fileutils'
2
- require 'active_record'
3
2
 
4
3
  module Merb
5
4
  module Orms
@@ -1,5 +1,5 @@
1
- require 'active_record'
2
1
  require 'merb-core/dispatch/session'
2
+ require 'active_record'
3
3
  require 'base64'
4
4
 
5
5
  module Merb
@@ -27,7 +27,7 @@ ActiveRecord::Schema.define do
27
27
  end
28
28
 
29
29
  # Load up the shared specs from merb-core
30
- if (gem_spec = Gem.source_index.search('merb-core').last) &&
30
+ if (gem_spec = Gem.source_index.search(Gem::Dependency.new('merb-core', '>=0.9.6')).last) &&
31
31
  gem_spec.files.include?('spec/public/session/controllers/sessions.rb')
32
32
  require gem_spec.full_gem_path / 'spec/public/session/controllers/sessions.rb'
33
33
  require gem_spec.full_gem_path / 'spec/public/session/session_spec.rb'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb_activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Duane Johnson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-08 00:00:00 +03:00
12
+ date: 2008-09-14 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.9.6
23
+ version: 0.9.7
24
24
  version:
25
25
  description: Merb plugin that provides ActiveRecord support for Merb
26
26
  email: canadaduane@gmail.com