acts_as_revisionable 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 1.0.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{acts_as_revisionable}
8
- s.version = "1.0.3"
8
+ s.version = "1.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Durand"]
12
- s.date = %q{2010-06-22}
12
+ s.date = %q{2010-10-08}
13
13
  s.description = %q{ActiveRecord extension that provides revision support so that history can be tracked and changes can be reverted. Emphasis for this plugin versus similar ones is including associations, saving on storage, and extensibility of the model.}
14
14
  s.email = %q{brian@embellishedvisions.com}
15
15
  s.extra_rdoc_files = [
@@ -36,7 +36,7 @@ module ActsAsRevisionable
36
36
  t.string :revisionable_type, :null => false, :limit => 100
37
37
  t.integer :revisionable_id, :null => false
38
38
  t.integer :revision, :null => false
39
- t.binary :data, :limit => 5.megabytes
39
+ t.binary :data, :limit => (connection.adapter_name == "MySQL" ? 5.megabytes : nil)
40
40
  t.timestamp :created_at, :null => false
41
41
  end
42
42
 
data/spec/spec_helper.rb CHANGED
@@ -5,19 +5,13 @@ require 'sqlite3'
5
5
  module ActsAsRevisionable
6
6
  module Test
7
7
  def self.create_database
8
- db_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'tmp'))
9
- Dir.mkdir(db_dir) unless File.exist?(db_dir)
10
- db = File.join(db_dir, 'test.sqlite3')
11
- ActiveRecord::Base.establish_connection("adapter" => "sqlite3", "database" => db)
8
+ ActiveRecord::Base.establish_connection("adapter" => "sqlite3", "database" => ":memory:")
12
9
  ActsAsRevisionable::RevisionRecord.create_table
13
10
  end
14
11
 
15
12
  def self.delete_database
16
- db_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'tmp'))
17
- db = File.join(db_dir, 'test.sqlite3')
13
+ ActiveRecord::Base.connection.drop_table(ActsAsRevisionable::RevisionRecord.table_name)
18
14
  ActiveRecord::Base.connection.disconnect!
19
- File.delete(db) if File.exist?(db)
20
- Dir.delete(db_dir) if File.exist?(db_dir) and Dir.entries(db_dir).reject{|f| f.match(/^\.+$/)}.empty?
21
15
  end
22
16
  end
23
17
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_revisionable
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 3
10
- version: 1.0.3
9
+ - 4
10
+ version: 1.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian Durand
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-22 00:00:00 -05:00
18
+ date: 2010-10-08 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency