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 +2 -2
- data/lib/generators/migration.rb +3 -3
- data/lib/generators/model.rb +3 -3
- data/lib/generators/resource_controller.rb +6 -6
- data/lib/generators/session_migration.rb +3 -3
- data/lib/merb/orms/active_record/connection.rb +0 -1
- data/lib/merb/session/active_record_session.rb +1 -1
- data/specs/merb_active_record_session_spec.rb +1 -1
- metadata +3 -3
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.
|
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.
|
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
|
|
data/lib/generators/migration.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Merb::Generators::MigrationGenerator.template :migration_activerecord, :orm => :activerecord do
|
2
|
-
source
|
3
|
-
destination
|
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
|
data/lib/generators/model.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
Merb::Generators::ModelGenerator.template :model_activerecord, :orm => :activerecord do
|
2
|
-
source
|
3
|
-
destination
|
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
|
3
|
-
destination
|
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
|
10
|
-
destination
|
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
|
3
|
-
destination
|
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
|
@@ -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.
|
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-
|
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.
|
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
|