deep_cloneable 2.0.2 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Appraisals +29 -2
- data/CHANGELOG.md +328 -0
- data/Gemfile +7 -10
- data/Gemfile.lock +27 -63
- data/LICENSE +1 -1
- data/Rakefile +4 -18
- data/deep_cloneable.gemspec +18 -63
- data/init.rb +3 -1
- data/lib/deep_cloneable.rb +12 -130
- data/lib/deep_cloneable/association_not_found_exception.rb +6 -0
- data/lib/deep_cloneable/deep_clone.rb +207 -0
- data/lib/deep_cloneable/skip_validations.rb +10 -0
- data/lib/deep_cloneable/version.rb +3 -0
- data/readme.md +243 -0
- metadata +24 -38
- data/.document +0 -5
- data/.travis.yml +0 -28
- data/README.rdoc +0 -95
- data/VERSION +0 -1
- data/gemfiles/3.1.gemfile +0 -14
- data/gemfiles/3.1.gemfile.lock +0 -75
- data/gemfiles/3.2.gemfile +0 -14
- data/gemfiles/3.2.gemfile.lock +0 -75
- data/gemfiles/4.0.gemfile +0 -14
- data/gemfiles/4.0.gemfile.lock +0 -80
- data/gemfiles/4.1.gemfile +0 -14
- data/gemfiles/4.1.gemfile.lock +0 -79
- data/gemfiles/4.2.gemfile +0 -14
- data/gemfiles/4.2.gemfile.lock +0 -79
- data/test/database.yml +0 -6
- data/test/models.rb +0 -88
- data/test/schema.rb +0 -101
- data/test/test_deep_cloneable.rb +0 -342
- data/test/test_helper.rb +0 -42
data/test/test_helper.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'yaml'
|
3
|
-
require 'minitest/autorun'
|
4
|
-
|
5
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
6
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
7
|
-
|
8
|
-
require 'active_record'
|
9
|
-
|
10
|
-
def load_schema
|
11
|
-
config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
|
12
|
-
|
13
|
-
if defined?(ActiveSupport::BufferedLogger)
|
14
|
-
ActiveRecord::Base.logger = ActiveSupport::BufferedLogger.new(File.dirname(__FILE__) + "/debug.log")
|
15
|
-
else
|
16
|
-
ActiveRecord::Base.logger = ActiveSupport::Logger.new(File.dirname(__FILE__) + "/debug.log")
|
17
|
-
end
|
18
|
-
|
19
|
-
db_adapter = ENV['DB']
|
20
|
-
# no db passed, try one of these fine config-free DBs before bombing.
|
21
|
-
db_adapter ||= begin
|
22
|
-
require 'rubygems'
|
23
|
-
require 'sqlite'
|
24
|
-
'sqlite'
|
25
|
-
rescue MissingSourceFile
|
26
|
-
begin
|
27
|
-
require 'sqlite3'
|
28
|
-
'sqlite3'
|
29
|
-
rescue MissingSourceFile
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
if db_adapter.nil?
|
34
|
-
raise "No DB Adapter selected. Pass the DB= option to pick one, or install Sqlite or Sqlite3."
|
35
|
-
end
|
36
|
-
ActiveRecord::Base.establish_connection(config[db_adapter])
|
37
|
-
load(File.dirname(__FILE__) + "/schema.rb")
|
38
|
-
end
|
39
|
-
|
40
|
-
load_schema
|
41
|
-
require File.dirname(__FILE__) + '/../init.rb'
|
42
|
-
require 'models'
|