merb_activerecord 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
data/Generators ADDED
@@ -0,0 +1,4 @@
1
+ scope 'merb-gen' do
2
+ dir = File.join(File.dirname(__FILE__), 'lib', 'generators/')
3
+ Merb.add_generators dir + 'migration', dir + 'model', dir + 'resource_controller', dir + 'session_migration'
4
+ end
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.8") + PKG_BUILD
20
+ GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.9") + PKG_BUILD
21
21
 
22
22
  RELEASE_NAME = "REL #{GEM_VERSION}"
23
23
 
@@ -35,9 +35,9 @@ 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.8')
38
+ s.add_dependency('merb-core', '>= 0.9.9')
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 Generators) + Dir.glob("{lib}/**/*")
41
41
  end
42
42
 
43
43
  Rake::GemPackageTask.new(spec) do |pkg|
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.8
4
+ version: 0.9.9
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-10-07 00:00:00 +03:00
12
+ date: 2008-10-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.8
23
+ version: 0.9.9
24
24
  version:
25
25
  description: Merb plugin that provides ActiveRecord support for Merb
26
26
  email: canadaduane@gmail.com
@@ -37,6 +37,7 @@ files:
37
37
  - README
38
38
  - Rakefile
39
39
  - TODO
40
+ - Generators
40
41
  - lib/active_record
41
42
  - lib/active_record/merbtasks.rb
42
43
  - lib/generators
@@ -75,9 +76,6 @@ files:
75
76
  - lib/merb/session
76
77
  - lib/merb/session/active_record_session.rb
77
78
  - lib/merb_activerecord.rb
78
- - specs/merb_active_record_session_spec.rb
79
- - specs/merb_active_record_spec.rb
80
- - specs/spec_helper.rb
81
79
  has_rdoc: true
82
80
  homepage: http://merbivore.com
83
81
  post_install_message:
@@ -1,57 +0,0 @@
1
- $:.push File.join(File.dirname(__FILE__), '..', 'lib')
2
- require 'merb-core'
3
- require 'merb-core/test'
4
- require 'merb-core/test/helpers'
5
-
6
- Merb::BootLoader.before_app_loads do
7
- require "merb/session/active_record_session"
8
- end
9
-
10
- Merb.start_environment( :environment => 'test', :adapter => 'runner',
11
- :session_store => 'activerecord')
12
-
13
- Spec::Runner.configure do |config|
14
- config.include Merb::Test::RequestHelper
15
- end
16
-
17
- require 'merb_activerecord'
18
- ActiveRecord::Base.establish_connection(:adapter => "sqlite3",
19
- :dbfile => ":memory:")
20
-
21
- ActiveRecord::Schema.define do
22
- create_table :sessions do |t|
23
- t.column :session_id, :string
24
- t.column :data, :text
25
- t.column :created_at, :datetime
26
- end
27
- end
28
-
29
- # Load up the shared specs from merb-core
30
- if (gem_spec = Gem.source_index.search(Gem::Dependency.new('merb-core', '>=0.9.6')).last) &&
31
- gem_spec.files.include?('spec/public/session/controllers/sessions.rb')
32
- require gem_spec.full_gem_path / 'spec/public/session/controllers/sessions.rb'
33
- require gem_spec.full_gem_path / 'spec/public/session/session_spec.rb'
34
- end
35
-
36
- describe Merb::ActiveRecordSession do
37
-
38
- before do
39
- @session_class = Merb::ActiveRecordSession
40
- @session = @session_class.generate
41
- end
42
-
43
- it_should_behave_like "All session-store backends"
44
-
45
- it "should have a session_store_type class attribute" do
46
- @session.class.session_store_type.should == :activerecord
47
- end
48
-
49
- end
50
-
51
- describe Merb::ActiveRecordSession, "mixed into Merb::Controller" do
52
-
53
- before(:all) { @session_class = Merb::ActiveRecordSession }
54
-
55
- it_should_behave_like "All session-stores mixed into Merb::Controller"
56
-
57
- end
@@ -1,60 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- describe Merb::Orms::ActiveRecord::Connect do
4
- it "is loaded at plugin bootstrap" do
5
- defined?(Merb::Orms::ActiveRecord::Connect).should == "constant"
6
- end
7
-
8
- it "is a merb bootloader" do
9
- Merb::Orms::ActiveRecord::Connect.superclass.should == Merb::BootLoader
10
- end
11
- end
12
-
13
- describe "Merb ActiveRecord extension" do
14
- before :all do
15
- @wd = Dir.pwd
16
- Merb.stub!(:dir_for).with(:config).and_return(@wd)
17
- @config_file_path = @wd / "config" / "database.yml"
18
- @sample_file_path = @wd / "config" / "database.yml.sample"
19
-
20
- @sample_source = Merb::Orms::ActiveRecord.sample_source
21
- @config_sample = Erubis.load_yaml_file(@sample_source)
22
- end
23
-
24
- it "is loaded at plugin booststrap" do
25
- defined?(Merb::Orms::ActiveRecord).should == "constant"
26
- end
27
-
28
- it "loads config from Merb configurations directory" do
29
- Merb::Orms::ActiveRecord.config_file.should == @config_file_path
30
- end
31
-
32
- it "loads config sample from Merb configurations directory" do
33
- Merb::Orms::ActiveRecord.sample_dest.should == @sample_file_path
34
- end
35
-
36
- it "provides a sample database.yml with development environment" do
37
- @config_sample[:development].should be_an_instance_of(Hash)
38
- end
39
-
40
- it "provides a sample database.yml with test environment" do
41
- @config_sample[:test].should be_an_instance_of(Hash)
42
- end
43
-
44
- it "provides a sample database.yml with production environment" do
45
- @config_sample[:production].should be_an_instance_of(Hash)
46
- end
47
-
48
- it "uses Unicode and localhost in sample" do
49
- @config_sample[:development][:host].should == "localhost"
50
- @config_sample[:development][:encoding].should == "utf8"
51
- end
52
-
53
- it "provides Rack with a way to start a transcantion" do
54
- Merb::Orms::ActiveRecord.should respond_to(:open_sandbox!)
55
- end
56
-
57
- it "provides Rack with a way to stop a transcantion" do
58
- Merb::Orms::ActiveRecord.should respond_to(:close_sandbox!)
59
- end
60
- end
data/specs/spec_helper.rb DELETED
@@ -1,3 +0,0 @@
1
- $:.push File.join(File.dirname(__FILE__), '..', 'lib')
2
- require 'merb-core'
3
- require 'merb_activerecord'