merb_activerecord 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -17,9 +17,9 @@ 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.8") + PKG_BUILD
|
21
21
|
|
22
|
-
RELEASE_NAME
|
22
|
+
RELEASE_NAME = "REL #{GEM_VERSION}"
|
23
23
|
|
24
24
|
require "extlib/tasks/release"
|
25
25
|
|
@@ -35,30 +35,43 @@ 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.8')
|
39
39
|
s.require_path = 'lib'
|
40
|
-
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
|
40
|
+
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
|
41
|
+
end
|
41
42
|
|
42
43
|
Rake::GemPackageTask.new(spec) do |pkg|
|
43
44
|
pkg.gem_spec = spec
|
44
45
|
end
|
45
46
|
|
46
47
|
desc "Install the gem"
|
47
|
-
task :install
|
48
|
-
|
48
|
+
task :install do
|
49
|
+
Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
|
49
50
|
end
|
50
51
|
|
51
|
-
|
52
|
+
desc "Uninstall the gem"
|
53
|
+
task :uninstall do
|
54
|
+
Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
|
55
|
+
end
|
52
56
|
|
53
|
-
|
54
|
-
|
55
|
-
|
57
|
+
desc "Create a gemspec file"
|
58
|
+
task :gemspec do
|
59
|
+
File.open("#{GEM_NAME}.gemspec", "w") do |file|
|
60
|
+
file.puts spec.to_ruby
|
56
61
|
end
|
57
|
-
|
58
62
|
end
|
59
63
|
|
60
|
-
desc "Run all
|
61
|
-
Spec::Rake::SpecTask.new(
|
62
|
-
t.spec_opts
|
63
|
-
t.spec_files =
|
64
|
+
desc "Run all examples (or a specific spec with TASK=xxxx)"
|
65
|
+
Spec::Rake::SpecTask.new('spec') do |t|
|
66
|
+
t.spec_opts = ["-cfs"]
|
67
|
+
t.spec_files = begin
|
68
|
+
if ENV["TASK"]
|
69
|
+
ENV["TASK"].split(',').map { |task| "spec/**/#{task}_spec.rb" }
|
70
|
+
else
|
71
|
+
FileList['spec/**/*_spec.rb']
|
72
|
+
end
|
73
|
+
end
|
64
74
|
end
|
75
|
+
|
76
|
+
desc 'Default: run spec examples'
|
77
|
+
task :default => 'spec'
|
data/lib/merb_activerecord.rb
CHANGED
@@ -15,6 +15,9 @@ if defined?(Merb::Plugins)
|
|
15
15
|
Merb.logger.debug "Using ActiveRecord sessions"
|
16
16
|
require File.join(File.dirname(__FILE__) / "merb" / "session" / "active_record_session")
|
17
17
|
end
|
18
|
+
# The default identify is :id instead of :to_param so that the identify
|
19
|
+
# can be used as the default resource key
|
20
|
+
Merb::Router.root_behavior = Merb::Router.root_behavior.identify(ActiveRecord::Base => :id)
|
18
21
|
end
|
19
22
|
|
20
23
|
end
|
data/specs/spec_helper.rb
CHANGED
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.8
|
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-
|
12
|
+
date: 2008-10-07 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.8
|
24
24
|
version:
|
25
25
|
description: Merb plugin that provides ActiveRecord support for Merb
|
26
26
|
email: canadaduane@gmail.com
|