amoeba 3.2.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/activerecord_head.yml +26 -0
- data/.github/workflows/jruby.yml +30 -0
- data/.github/workflows/rspec.yml +49 -0
- data/.github/workflows/rubocop.yml +20 -0
- data/.gitignore +2 -0
- data/.rubocop.yml +12 -8
- data/.rubocop_todo.yml +149 -0
- data/Appraisals +31 -38
- data/CHANGELOG.md +68 -0
- data/Gemfile +6 -2
- data/LICENSE.md +11 -0
- data/README.md +28 -17
- data/Rakefile +2 -0
- data/amoeba.gemspec +18 -17
- data/docs/contributing.md +19 -0
- data/docs/test_refactor.md +20 -0
- data/gemfiles/activerecord_6.1.gemfile +17 -8
- data/gemfiles/activerecord_7.0.gemfile +22 -0
- data/gemfiles/activerecord_7.1.gemfile +21 -0
- data/gemfiles/activerecord_8.0.gemfile +21 -0
- data/gemfiles/activerecord_8.1.gemfile +21 -0
- data/gemfiles/activerecord_head.gemfile +12 -13
- data/gemfiles/jruby_activerecord_7.0.gemfile +20 -0
- data/gemfiles/jruby_activerecord_head.gemfile +15 -15
- data/lib/amoeba/class_methods.rb +2 -0
- data/lib/amoeba/cloner.rb +15 -6
- data/lib/amoeba/config.rb +30 -53
- data/lib/amoeba/instance_methods.rb +3 -0
- data/lib/amoeba/macros/base.rb +4 -1
- data/lib/amoeba/macros/has_and_belongs_to_many.rb +2 -0
- data/lib/amoeba/macros/has_many.rb +2 -0
- data/lib/amoeba/macros/has_one.rb +4 -0
- data/lib/amoeba/macros.rb +2 -0
- data/lib/amoeba/version.rb +3 -1
- data/lib/amoeba.rb +6 -2
- data/spec/lib/amoeba_spec.rb +425 -231
- data/spec/spec_helper.rb +16 -6
- data/spec/support/data.rb +23 -14
- data/spec/support/models.rb +50 -40
- data/spec/support/schema.rb +2 -0
- metadata +53 -39
- data/.travis.yml +0 -110
- data/gemfiles/activerecord_4.2.gemfile +0 -18
- data/gemfiles/activerecord_5.0.gemfile +0 -18
- data/gemfiles/activerecord_5.1.gemfile +0 -18
- data/gemfiles/activerecord_5.2.gemfile +0 -18
- data/gemfiles/activerecord_6.0.gemfile +0 -18
- data/gemfiles/jruby_activerecord_6.1.gemfile +0 -19
data/spec/spec_helper.rb
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'simplecov'
|
|
2
|
-
|
|
3
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
|
|
4
|
-
SimpleCov::Formatter::HTMLFormatter,
|
|
5
|
-
Coveralls::SimpleCov::Formatter
|
|
6
|
-
])
|
|
4
|
+
|
|
7
5
|
SimpleCov.start do
|
|
8
6
|
add_filter 'spec'
|
|
9
7
|
minimum_coverage(76)
|
|
8
|
+
|
|
9
|
+
if ENV['CI']
|
|
10
|
+
require 'simplecov-lcov'
|
|
11
|
+
|
|
12
|
+
SimpleCov::Formatter::LcovFormatter.config do |c|
|
|
13
|
+
c.report_with_single_file = true
|
|
14
|
+
c.single_report_path = 'coverage/lcov.info'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
formatter SimpleCov::Formatter::LcovFormatter
|
|
18
|
+
end
|
|
10
19
|
end
|
|
20
|
+
|
|
11
21
|
require 'active_record'
|
|
12
22
|
require 'amoeba'
|
|
13
23
|
|
|
@@ -22,7 +32,7 @@ adapter = if defined?(JRuby)
|
|
|
22
32
|
ActiveRecord::Base.establish_connection(adapter: adapter, database: ':memory:')
|
|
23
33
|
|
|
24
34
|
::RSpec.configure do |config|
|
|
25
|
-
config.order = :
|
|
35
|
+
config.order = :defined
|
|
26
36
|
end
|
|
27
37
|
|
|
28
38
|
load File.dirname(__FILE__) + '/support/schema.rb'
|
data/spec/support/data.rb
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
1
2
|
|
|
2
3
|
u1 = User.create(name: 'Robert Johnson', email: 'bob@crossroads.com')
|
|
3
4
|
u2 = User.create(name: 'Miles Davis', email: 'miles@kindofblue.com')
|
|
@@ -8,7 +9,8 @@ a2 = Author.create(full_name: 'Arthur Sees Clarck', nickname: 'strangewater')
|
|
|
8
9
|
t = Topic.create(title: 'Ponies', description: 'Lets talk about my ponies.')
|
|
9
10
|
|
|
10
11
|
# First Post {{{
|
|
11
|
-
p1 = t.posts.create(owner: u1, author: a1, title: 'My little pony',
|
|
12
|
+
p1 = t.posts.create(owner: u1, author: a1, title: 'My little pony',
|
|
13
|
+
contents: 'Lorum ipsum dolor rainbow bright. I like dogs, dogs are awesome.')
|
|
12
14
|
f1 = p1.create_post_config(is_visible: true, is_open: false, password: 'abcdefg123')
|
|
13
15
|
a1 = p1.create_account(title: 'Foo')
|
|
14
16
|
h1 = p1.account.create_history(some_stuff: 'Bar')
|
|
@@ -21,11 +23,15 @@ c2 = p1.comments.create(contents: 'I hate it!', nerf: 'whapaow')
|
|
|
21
23
|
c3 = p1.comments.create(contents: 'kthxbbq!!11!!!1!eleven!!', nerf: 'bonk')
|
|
22
24
|
[0, 0, 1, 2, 1, 0].each { |stars| c3.ratings.create(num_stars: stars) }
|
|
23
25
|
|
|
24
|
-
%w
|
|
26
|
+
%w[funny wtf cats].each { |value| p1.tags << Tag.create(value: value) }
|
|
25
27
|
|
|
26
|
-
['My Sidebar', 'Photo Gallery', 'Share & Like'].each
|
|
28
|
+
['My Sidebar', 'Photo Gallery', 'Share & Like'].each do |value|
|
|
29
|
+
p1.widgets << Widget.create(value: value)
|
|
30
|
+
end
|
|
27
31
|
|
|
28
|
-
['This is important', "You've been warned", "Don't forget"].each
|
|
32
|
+
['This is important', "You've been warned", "Don't forget"].each do |value|
|
|
33
|
+
p1.notes << Note.create(value: value)
|
|
34
|
+
end
|
|
29
35
|
|
|
30
36
|
p1.save
|
|
31
37
|
|
|
@@ -85,15 +91,18 @@ necklace1.sections << jewelry
|
|
|
85
91
|
necklace1.sections << accessories
|
|
86
92
|
necklace1.save
|
|
87
93
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
employee_address_2 = employee.addresses.create(street: '124 My Street',unit:'103',city:'Follywood',
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
company = Company.create(name: 'ABC Industries')
|
|
95
|
+
employee = company.employees.create(name: 'Joe', ssn: '1111111111', salary: 10_000.0)
|
|
96
|
+
employee_address = employee.addresses.create(street: '123 My Street', unit: '103', city: 'Hollywood',
|
|
97
|
+
state: 'CA', zip: '90210')
|
|
98
|
+
employee_address_2 = employee.addresses.create(street: '124 My Street', unit: '103', city: 'Follywood',
|
|
99
|
+
state: 'CA', zip: '90210')
|
|
100
|
+
employee_photo = employee.photos.create(name: 'Portrait', size: 12_345)
|
|
101
|
+
customer = company.customers.create(email: 'my@email.address', password: 'password')
|
|
102
|
+
customer_address = customer.addresses.create(street: '321 My Street', unit: '301', city: 'Bollywood',
|
|
103
|
+
state: 'IN', zip: '11111')
|
|
104
|
+
customer_address_2 = customer.addresses.create(street: '321 My Drive', unit: '311', city: 'Mollywood',
|
|
105
|
+
state: 'IN', zip: '21111')
|
|
106
|
+
customer_photo = customer.photos.create(name: 'Mug Shot', size: 54_321)
|
|
98
107
|
|
|
99
108
|
# }}}
|
data/spec/support/models.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
class Topic < ActiveRecord::Base
|
|
2
4
|
has_many :posts
|
|
3
5
|
end
|
|
@@ -34,41 +36,41 @@ class Post < ActiveRecord::Base
|
|
|
34
36
|
|
|
35
37
|
amoeba do
|
|
36
38
|
enable
|
|
37
|
-
clone [
|
|
39
|
+
clone %i[widgets notes]
|
|
38
40
|
prepend title: 'Copy of '
|
|
39
41
|
append contents: ' (copied version)'
|
|
40
42
|
regex contents: { replace: /dog/, with: 'cat' }
|
|
41
43
|
customize([
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
44
|
+
lambda do |orig_obj, copy_of_obj|
|
|
45
|
+
orig_obj.comments.each do |oc|
|
|
46
|
+
next unless oc.nerf == 'ratatat'
|
|
47
|
+
|
|
48
|
+
hash = oc.attributes
|
|
49
|
+
hash[:id] = nil
|
|
50
|
+
hash[:post_id] = nil
|
|
51
|
+
hash[:contents] = nil
|
|
52
|
+
|
|
53
|
+
cc = Comment.new(hash)
|
|
54
|
+
|
|
55
|
+
copy_of_obj.comments << cc
|
|
56
|
+
end
|
|
57
|
+
end,
|
|
58
|
+
lambda do |orig_obj, copy_of_obj|
|
|
59
|
+
orig_obj.comments.each do |oc|
|
|
60
|
+
next unless oc.nerf == 'bonk'
|
|
61
|
+
|
|
62
|
+
hash = oc.attributes
|
|
63
|
+
hash[:id] = nil
|
|
64
|
+
hash[:post_id] = nil
|
|
65
|
+
hash[:contents] = nil
|
|
66
|
+
hash[:nerf] = 'bonkers'
|
|
67
|
+
|
|
68
|
+
cc = Comment.new(hash)
|
|
69
|
+
|
|
70
|
+
copy_of_obj.comments << cc
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
])
|
|
72
74
|
end
|
|
73
75
|
|
|
74
76
|
def truthy?
|
|
@@ -97,16 +99,18 @@ class CustomThing < ActiveRecord::Base
|
|
|
97
99
|
def self.load(str)
|
|
98
100
|
return [] unless str.present?
|
|
99
101
|
return str if str.is_a?(Array)
|
|
102
|
+
|
|
100
103
|
str.split(',').map(&:to_i)
|
|
101
104
|
end
|
|
102
105
|
|
|
103
106
|
def self.dump(int_array)
|
|
104
107
|
return '' unless int_array.present?
|
|
108
|
+
|
|
105
109
|
int_array.join(',')
|
|
106
110
|
end
|
|
107
111
|
end
|
|
108
112
|
|
|
109
|
-
serialize :value, ArrayPack
|
|
113
|
+
serialize :value, coder: ArrayPack
|
|
110
114
|
|
|
111
115
|
before_create :hydrate_me
|
|
112
116
|
|
|
@@ -200,7 +204,7 @@ class Product < ActiveRecord::Base
|
|
|
200
204
|
has_many :images
|
|
201
205
|
has_and_belongs_to_many :sections
|
|
202
206
|
|
|
203
|
-
SECTION_COUNT_QUERY = 'SELECT COUNT(*) AS section_count FROM products_sections WHERE product_id = ?'
|
|
207
|
+
SECTION_COUNT_QUERY = 'SELECT COUNT(*) AS section_count FROM products_sections WHERE product_id = ?'
|
|
204
208
|
|
|
205
209
|
amoeba do
|
|
206
210
|
enable
|
|
@@ -216,6 +220,13 @@ class Section < ActiveRecord::Base
|
|
|
216
220
|
end
|
|
217
221
|
|
|
218
222
|
class Image < ActiveRecord::Base
|
|
223
|
+
def truthy?
|
|
224
|
+
true
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
def falsey?
|
|
228
|
+
false
|
|
229
|
+
end
|
|
219
230
|
end
|
|
220
231
|
|
|
221
232
|
class Shirt < Product
|
|
@@ -261,7 +272,7 @@ class Photo < ActiveRecord::Base
|
|
|
261
272
|
belongs_to :imageable, polymorphic: true
|
|
262
273
|
|
|
263
274
|
amoeba do
|
|
264
|
-
customize(lambda { |original_photo,new_photo|
|
|
275
|
+
customize(lambda { |original_photo, new_photo|
|
|
265
276
|
new_photo.name = original_photo.name.to_s + ' Copy'
|
|
266
277
|
})
|
|
267
278
|
end
|
|
@@ -273,7 +284,7 @@ class Company < ActiveRecord::Base
|
|
|
273
284
|
|
|
274
285
|
amoeba do
|
|
275
286
|
include_associations :employees,
|
|
276
|
-
|
|
287
|
+
:customers
|
|
277
288
|
end
|
|
278
289
|
end
|
|
279
290
|
|
|
@@ -283,9 +294,8 @@ class Employee < ActiveRecord::Base
|
|
|
283
294
|
belongs_to :company
|
|
284
295
|
|
|
285
296
|
amoeba do
|
|
286
|
-
include_associations [
|
|
297
|
+
include_associations %i[addresses photos]
|
|
287
298
|
end
|
|
288
|
-
|
|
289
299
|
end
|
|
290
300
|
|
|
291
301
|
class Customer < ActiveRecord::Base
|
|
@@ -313,7 +323,7 @@ class ObjectPrototype < MetalObject
|
|
|
313
323
|
end
|
|
314
324
|
|
|
315
325
|
def become_real
|
|
316
|
-
|
|
326
|
+
dup.becomes RealObject
|
|
317
327
|
end
|
|
318
328
|
|
|
319
329
|
def remap_subobjects(relation_name)
|
|
@@ -332,7 +342,7 @@ class SubobjectPrototype < MetalObject
|
|
|
332
342
|
end
|
|
333
343
|
|
|
334
344
|
def become_subobject
|
|
335
|
-
|
|
345
|
+
dup.becomes Subobject
|
|
336
346
|
end
|
|
337
347
|
end
|
|
338
348
|
|
|
@@ -360,7 +370,7 @@ class Box < ActiveRecord::Base
|
|
|
360
370
|
end
|
|
361
371
|
|
|
362
372
|
class BoxProduct < ActiveRecord::Base
|
|
363
|
-
belongs_to
|
|
373
|
+
belongs_to :box, class_name: 'Box'
|
|
364
374
|
|
|
365
375
|
amoeba do
|
|
366
376
|
enable
|
data/spec/support/schema.rb
CHANGED
metadata
CHANGED
|
@@ -1,100 +1,121 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: amoeba
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vaughn Draughon
|
|
8
8
|
- Oleksandr Simonov
|
|
9
|
-
|
|
9
|
+
- Joseph Haig
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
|
-
name:
|
|
15
|
+
name: rspec
|
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
|
17
17
|
requirements:
|
|
18
|
-
- - "
|
|
18
|
+
- - "~>"
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version:
|
|
20
|
+
version: 3.13.0
|
|
21
21
|
type: :development
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
|
-
- - "
|
|
25
|
+
- - "~>"
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version:
|
|
27
|
+
version: 3.13.0
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
|
-
name:
|
|
29
|
+
name: rubocop
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
31
31
|
requirements:
|
|
32
|
-
- - "
|
|
32
|
+
- - "~>"
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version:
|
|
34
|
+
version: 1.71.0
|
|
35
35
|
type: :development
|
|
36
36
|
prerelease: false
|
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
38
|
requirements:
|
|
39
|
-
- - "
|
|
39
|
+
- - "~>"
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version:
|
|
41
|
+
version: 1.71.0
|
|
42
42
|
- !ruby/object:Gem::Dependency
|
|
43
|
-
name:
|
|
43
|
+
name: rubocop-rake
|
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
|
45
45
|
requirements:
|
|
46
|
-
- - "
|
|
46
|
+
- - "~>"
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version:
|
|
48
|
+
version: 0.6.0
|
|
49
49
|
type: :development
|
|
50
50
|
prerelease: false
|
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
|
52
52
|
requirements:
|
|
53
|
-
- - "
|
|
53
|
+
- - "~>"
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version:
|
|
55
|
+
version: 0.6.0
|
|
56
|
+
- !ruby/object:Gem::Dependency
|
|
57
|
+
name: rubocop-rspec
|
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
|
59
|
+
requirements:
|
|
60
|
+
- - "~>"
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: 2.27.1
|
|
63
|
+
type: :development
|
|
64
|
+
prerelease: false
|
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
66
|
+
requirements:
|
|
67
|
+
- - "~>"
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: 2.27.1
|
|
56
70
|
- !ruby/object:Gem::Dependency
|
|
57
71
|
name: activerecord
|
|
58
72
|
requirement: !ruby/object:Gem::Requirement
|
|
59
73
|
requirements:
|
|
60
74
|
- - ">="
|
|
61
75
|
- !ruby/object:Gem::Version
|
|
62
|
-
version:
|
|
76
|
+
version: 6.1.0
|
|
63
77
|
type: :runtime
|
|
64
78
|
prerelease: false
|
|
65
79
|
version_requirements: !ruby/object:Gem::Requirement
|
|
66
80
|
requirements:
|
|
67
81
|
- - ">="
|
|
68
82
|
- !ruby/object:Gem::Version
|
|
69
|
-
version:
|
|
83
|
+
version: 6.1.0
|
|
70
84
|
description: |
|
|
71
85
|
An extension to ActiveRecord to allow the duplication method to also copy associated children, with recursive support for nested of grandchildren. The behavior is controllable with a simple DSL both on your rails models and on the fly, i.e. per instance. Numerous configuration styles and preprocessing directives are included for power and flexibility. Supports preprocessing of field values to prepend strings such as "Copy of ", to nullify or process field values with regular expressions. Supports most association types including has_one :through and has_many :through.
|
|
72
86
|
|
|
73
87
|
Tags: copy child associations, copy nested children, copy associated child records, nested copy, copy associations, copy relations, copy relationships, duplicate associations, duplicate associated records, duplicate child records, duplicate children, copy all, duplicate all, clone child associations, clone nested children, clone associated child records, nested clone, clone associations, clone relations, clone relationships, cloning child associations, cloning nested children, cloning associated child records, deep_cloning, nested cloning, cloning associations, cloning relations, cloning relationships, cloning child associations, cloning nested children, cloning associated child records, nested cloning, cloning associations, cloning relations, cloning relationships, cloning child associations, cloning nested children, cloning associated child records, deep_cloning, nested cloning, cloning associations, cloning relations, cloning relationships, duplicate child associations, duplicate nested children, duplicate associated child records, nested duplicate, duplicate associations, duplicate relations, duplicate relationships, duplicate child associations, duplicate nested children, duplicate associated child records, deep_duplicate, nested duplicate, duplicate associations, duplicate relations, duplicate relationships, deep_copy, deep_clone, deep_cloning, deep clone, deep cloning, has_one, has_many, has_and_belongs_to_many
|
|
74
|
-
email:
|
|
88
|
+
email: josephhaig@gmail.com
|
|
75
89
|
executables: []
|
|
76
90
|
extensions: []
|
|
77
91
|
extra_rdoc_files: []
|
|
78
92
|
files:
|
|
79
93
|
- ".cane"
|
|
94
|
+
- ".github/workflows/activerecord_head.yml"
|
|
95
|
+
- ".github/workflows/jruby.yml"
|
|
96
|
+
- ".github/workflows/rspec.yml"
|
|
97
|
+
- ".github/workflows/rubocop.yml"
|
|
80
98
|
- ".gitignore"
|
|
81
99
|
- ".rspec"
|
|
82
100
|
- ".rubocop.yml"
|
|
83
|
-
- ".
|
|
101
|
+
- ".rubocop_todo.yml"
|
|
84
102
|
- Appraisals
|
|
103
|
+
- CHANGELOG.md
|
|
85
104
|
- Gemfile
|
|
105
|
+
- LICENSE.md
|
|
86
106
|
- README.md
|
|
87
107
|
- Rakefile
|
|
88
108
|
- amoeba.gemspec
|
|
89
109
|
- defaults.reek
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
- gemfiles/activerecord_5.1.gemfile
|
|
93
|
-
- gemfiles/activerecord_5.2.gemfile
|
|
94
|
-
- gemfiles/activerecord_6.0.gemfile
|
|
110
|
+
- docs/contributing.md
|
|
111
|
+
- docs/test_refactor.md
|
|
95
112
|
- gemfiles/activerecord_6.1.gemfile
|
|
113
|
+
- gemfiles/activerecord_7.0.gemfile
|
|
114
|
+
- gemfiles/activerecord_7.1.gemfile
|
|
115
|
+
- gemfiles/activerecord_8.0.gemfile
|
|
116
|
+
- gemfiles/activerecord_8.1.gemfile
|
|
96
117
|
- gemfiles/activerecord_head.gemfile
|
|
97
|
-
- gemfiles/
|
|
118
|
+
- gemfiles/jruby_activerecord_7.0.gemfile
|
|
98
119
|
- gemfiles/jruby_activerecord_head.gemfile
|
|
99
120
|
- lib/amoeba.rb
|
|
100
121
|
- lib/amoeba/class_methods.rb
|
|
@@ -114,9 +135,8 @@ files:
|
|
|
114
135
|
- spec/support/schema.rb
|
|
115
136
|
homepage: http://github.com/amoeba-rb/amoeba
|
|
116
137
|
licenses:
|
|
117
|
-
- BSD
|
|
138
|
+
- BSD-2-Clause
|
|
118
139
|
metadata: {}
|
|
119
|
-
post_install_message:
|
|
120
140
|
rdoc_options: []
|
|
121
141
|
require_paths:
|
|
122
142
|
- lib
|
|
@@ -124,20 +144,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
124
144
|
requirements:
|
|
125
145
|
- - ">="
|
|
126
146
|
- !ruby/object:Gem::Version
|
|
127
|
-
version: '0'
|
|
147
|
+
version: '3.0'
|
|
128
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
149
|
requirements:
|
|
130
150
|
- - ">="
|
|
131
151
|
- !ruby/object:Gem::Version
|
|
132
152
|
version: '0'
|
|
133
153
|
requirements: []
|
|
134
|
-
rubygems_version:
|
|
135
|
-
signing_key:
|
|
154
|
+
rubygems_version: 4.0.16
|
|
136
155
|
specification_version: 4
|
|
137
156
|
summary: Easy copying of rails models and their child associations.
|
|
138
|
-
test_files:
|
|
139
|
-
- spec/lib/amoeba_spec.rb
|
|
140
|
-
- spec/spec_helper.rb
|
|
141
|
-
- spec/support/data.rb
|
|
142
|
-
- spec/support/models.rb
|
|
143
|
-
- spec/support/schema.rb
|
|
157
|
+
test_files: []
|
data/.travis.yml
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
rvm:
|
|
3
|
-
- 2.2
|
|
4
|
-
- 2.3
|
|
5
|
-
- 2.4
|
|
6
|
-
- 2.5
|
|
7
|
-
- 2.6
|
|
8
|
-
- 2.7
|
|
9
|
-
- 3.0
|
|
10
|
-
- ruby-head
|
|
11
|
-
- jruby
|
|
12
|
-
gemfile:
|
|
13
|
-
- gemfiles/activerecord_4.2.gemfile
|
|
14
|
-
- gemfiles/activerecord_5.0.gemfile
|
|
15
|
-
- gemfiles/activerecord_5.1.gemfile
|
|
16
|
-
- gemfiles/activerecord_5.2.gemfile
|
|
17
|
-
- gemfiles/activerecord_6.0.gemfile
|
|
18
|
-
- gemfiles/activerecord_6.1.gemfile
|
|
19
|
-
- gemfiles/jruby_activerecord_6.1.gemfile
|
|
20
|
-
- gemfiles/activerecord_head.gemfile
|
|
21
|
-
- gemfiles/jruby_activerecord_head.gemfile
|
|
22
|
-
matrix:
|
|
23
|
-
allow_failures:
|
|
24
|
-
- rvm: ruby-head
|
|
25
|
-
- rvm: jruby
|
|
26
|
-
# These may work if there is a new version of sqlite3 1.3.x supporting
|
|
27
|
-
# Ruby 3.0
|
|
28
|
-
- rvm: 3.0
|
|
29
|
-
gemfile: gemfiles/activerecord_5.0.gemfile
|
|
30
|
-
- rvm: 3.0
|
|
31
|
-
gemfile: gemfiles/activerecord_5.1.gemfile
|
|
32
|
-
- rvm: 3.0
|
|
33
|
-
gemfile: gemfiles/activerecord_5.2.gemfile
|
|
34
|
-
exclude:
|
|
35
|
-
- rvm: 2.2
|
|
36
|
-
gemfile: gemfiles/activerecord_6.0.gemfile
|
|
37
|
-
- rvm: 2.2
|
|
38
|
-
gemfile: gemfiles/activerecord_6.1.gemfile
|
|
39
|
-
- rvm: 2.2
|
|
40
|
-
gemfile: gemfiles/activerecord_head.gemfile
|
|
41
|
-
- rvm: 2.2
|
|
42
|
-
gemfile: gemfiles/jruby_activerecord_6.1.gemfile
|
|
43
|
-
- rvm: 2.2
|
|
44
|
-
gemfile: gemfiles/jruby_activerecord_head.gemfile
|
|
45
|
-
- rvm: 2.3
|
|
46
|
-
gemfile: gemfiles/activerecord_6.0.gemfile
|
|
47
|
-
- rvm: 2.3
|
|
48
|
-
gemfile: gemfiles/activerecord_6.1.gemfile
|
|
49
|
-
- rvm: 2.3
|
|
50
|
-
gemfile: gemfiles/activerecord_head.gemfile
|
|
51
|
-
- rvm: 2.3
|
|
52
|
-
gemfile: gemfiles/jruby_activerecord_6.1.gemfile
|
|
53
|
-
- rvm: 2.3
|
|
54
|
-
gemfile: gemfiles/jruby_activerecord_head.gemfile
|
|
55
|
-
- rvm: 2.4
|
|
56
|
-
gemfile: gemfiles/activerecord_6.0.gemfile
|
|
57
|
-
- rvm: 2.4
|
|
58
|
-
gemfile: gemfiles/activerecord_6.1.gemfile
|
|
59
|
-
- rvm: 2.4
|
|
60
|
-
gemfile: gemfiles/activerecord_head.gemfile
|
|
61
|
-
- rvm: 2.4
|
|
62
|
-
gemfile: gemfiles/jruby_activerecord_6.1.gemfile
|
|
63
|
-
- rvm: 2.4
|
|
64
|
-
gemfile: gemfiles/jruby_activerecord_head.gemfile
|
|
65
|
-
- rvm: 2.5
|
|
66
|
-
gemfile: gemfiles/activerecord_head.gemfile
|
|
67
|
-
- rvm: 2.5
|
|
68
|
-
gemfile: gemfiles/jruby_activerecord_6.1.gemfile
|
|
69
|
-
- rvm: 2.5
|
|
70
|
-
gemfile: gemfiles/jruby_activerecord_head.gemfile
|
|
71
|
-
- rvm: 2.6
|
|
72
|
-
gemfile: gemfiles/activerecord_head.gemfile
|
|
73
|
-
- rvm: 2.6
|
|
74
|
-
gemfile: gemfiles/jruby_activerecord_6.1.gemfile
|
|
75
|
-
- rvm: 2.6
|
|
76
|
-
gemfile: gemfiles/jruby_activerecord_head.gemfile
|
|
77
|
-
- rvm: 2.7
|
|
78
|
-
gemfile: gemfiles/activerecord_4.2.gemfile
|
|
79
|
-
- rvm: 2.7
|
|
80
|
-
gemfile: gemfiles/jruby_activerecord_6.1.gemfile
|
|
81
|
-
- rvm: 2.7
|
|
82
|
-
gemfile: gemfiles/jruby_activerecord_head.gemfile
|
|
83
|
-
- rvm: 3.0
|
|
84
|
-
gemfile: gemfiles/activerecord_4.2.gemfile
|
|
85
|
-
- rvm: 3.0
|
|
86
|
-
gemfile: gemfiles/jruby_activerecord_6.1.gemfile
|
|
87
|
-
- rvm: 3.0
|
|
88
|
-
gemfile: gemfiles/jruby_activerecord_head.gemfile
|
|
89
|
-
- rvm: ruby-head
|
|
90
|
-
gemfile: gemfiles/activerecord_4.2.gemfile
|
|
91
|
-
- rvm: ruby-head
|
|
92
|
-
gemfile: gemfiles/jruby_activerecord_6.1.gemfile
|
|
93
|
-
- rvm: ruby-head
|
|
94
|
-
gemfile: gemfiles/jruby_activerecord_head.gemfile
|
|
95
|
-
- rvm: jruby
|
|
96
|
-
gemfile: gemfiles/activerecord_4.2.gemfile
|
|
97
|
-
- rvm: jruby
|
|
98
|
-
gemfile: gemfiles/activerecord_5.0.gemfile
|
|
99
|
-
- rvm: jruby
|
|
100
|
-
gemfile: gemfiles/activerecord_5.1.gemfile
|
|
101
|
-
- rvm: jruby
|
|
102
|
-
gemfile: gemfiles/activerecord_5.2.gemfile
|
|
103
|
-
- rvm: jruby
|
|
104
|
-
gemfile: gemfiles/activerecord_6.0.gemfile
|
|
105
|
-
- rvm: jruby
|
|
106
|
-
gemfile: gemfiles/activerecord_6.1.gemfile
|
|
107
|
-
- rvm: jruby
|
|
108
|
-
gemfile: gemfiles/activerecord_head.gemfile
|
|
109
|
-
bundler_args: --without local_development
|
|
110
|
-
before_install: gem install bundler -v 1.17.3
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# This file was generated by Appraisal
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
gem "activerecord", "~> 4.2.0"
|
|
6
|
-
|
|
7
|
-
group :development, :test do
|
|
8
|
-
gem "rake"
|
|
9
|
-
gem "coveralls", require: false
|
|
10
|
-
gem "sqlite3", "~> 1.3.0"
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
group :local_development do
|
|
14
|
-
gem "pry"
|
|
15
|
-
gem "appraisal"
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
gemspec path: "../"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# This file was generated by Appraisal
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
gem "activerecord", "~> 5.0.0"
|
|
6
|
-
|
|
7
|
-
group :development, :test do
|
|
8
|
-
gem "rake"
|
|
9
|
-
gem "coveralls", require: false
|
|
10
|
-
gem "sqlite3", "~> 1.3.0"
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
group :local_development do
|
|
14
|
-
gem "pry"
|
|
15
|
-
gem "appraisal"
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
gemspec path: "../"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# This file was generated by Appraisal
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
gem "activerecord", "~> 5.1.0"
|
|
6
|
-
|
|
7
|
-
group :development, :test do
|
|
8
|
-
gem "rake"
|
|
9
|
-
gem "coveralls", require: false
|
|
10
|
-
gem "sqlite3", "~> 1.3.0"
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
group :local_development do
|
|
14
|
-
gem "pry"
|
|
15
|
-
gem "appraisal"
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
gemspec path: "../"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# This file was generated by Appraisal
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
gem "activerecord", "~> 5.2.0"
|
|
6
|
-
|
|
7
|
-
group :development, :test do
|
|
8
|
-
gem "rake"
|
|
9
|
-
gem "coveralls", require: false
|
|
10
|
-
gem "sqlite3", "~> 1.3.0"
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
group :local_development do
|
|
14
|
-
gem "pry"
|
|
15
|
-
gem "appraisal"
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
gemspec path: "../"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# This file was generated by Appraisal
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
gem "activerecord", "~> 6.0.0"
|
|
6
|
-
|
|
7
|
-
group :development, :test do
|
|
8
|
-
gem "rake"
|
|
9
|
-
gem "coveralls", require: false
|
|
10
|
-
gem "sqlite3", "~> 1.4.0"
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
group :local_development do
|
|
14
|
-
gem "pry"
|
|
15
|
-
gem "appraisal"
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
gemspec path: "../"
|