amoeba 3.2.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/jruby.yml +27 -0
  3. data/.github/workflows/ruby_25.yml +30 -0
  4. data/.github/workflows/ruby_26.yml +30 -0
  5. data/.github/workflows/ruby_27.yml +30 -0
  6. data/.github/workflows/ruby_30.yml +34 -0
  7. data/.github/workflows/ruby_31.yml +34 -0
  8. data/.github/workflows/ruby_32.yml +34 -0
  9. data/.github/workflows/ruby_head.yml +34 -0
  10. data/.gitignore +1 -0
  11. data/.rubocop.yml +11 -7
  12. data/.rubocop_todo.yml +120 -0
  13. data/Appraisals +21 -38
  14. data/CHANGELOG.md +14 -0
  15. data/Gemfile +5 -2
  16. data/LICENSE.md +11 -0
  17. data/README.md +2 -16
  18. data/Rakefile +2 -0
  19. data/amoeba.gemspec +15 -12
  20. data/gemfiles/activerecord_5.2.gemfile +9 -8
  21. data/gemfiles/activerecord_6.0.gemfile +9 -8
  22. data/gemfiles/activerecord_6.1.gemfile +9 -8
  23. data/gemfiles/activerecord_7.0.gemfile +19 -0
  24. data/gemfiles/activerecord_head.gemfile +10 -13
  25. data/gemfiles/jruby_activerecord_7.0.gemfile +20 -0
  26. data/gemfiles/jruby_activerecord_head.gemfile +13 -15
  27. data/lib/amoeba/class_methods.rb +2 -0
  28. data/lib/amoeba/cloner.rb +11 -4
  29. data/lib/amoeba/config.rb +23 -51
  30. data/lib/amoeba/instance_methods.rb +3 -0
  31. data/lib/amoeba/macros/base.rb +4 -1
  32. data/lib/amoeba/macros/has_and_belongs_to_many.rb +2 -0
  33. data/lib/amoeba/macros/has_many.rb +2 -0
  34. data/lib/amoeba/macros/has_one.rb +4 -0
  35. data/lib/amoeba/macros.rb +2 -0
  36. data/lib/amoeba/version.rb +3 -1
  37. data/lib/amoeba.rb +6 -2
  38. data/spec/lib/amoeba_spec.rb +45 -31
  39. data/spec/spec_helper.rb +13 -5
  40. data/spec/support/data.rb +22 -15
  41. data/spec/support/models.rb +39 -38
  42. metadata +60 -29
  43. data/.travis.yml +0 -110
  44. data/gemfiles/activerecord_4.2.gemfile +0 -18
  45. data/gemfiles/activerecord_5.0.gemfile +0 -18
  46. data/gemfiles/activerecord_5.1.gemfile +0 -18
  47. data/gemfiles/jruby_activerecord_6.1.gemfile +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ae461133565a412e2338cfa8b4f2fd8cbed8fa5a4b5bd56724c8f583888312c
4
- data.tar.gz: 127513d887e21e276b1511c0b6556d311832df82d781f9bd46bac708d4a830d0
3
+ metadata.gz: 29529dad8414b04baff41f8ef9638dc79f118bf259c46ce6769ddb03919d484b
4
+ data.tar.gz: 6b3d0507d6c1a6fe325394ccbd620fab75cd73c570ca16275e90bb11234f5c0f
5
5
  SHA512:
6
- metadata.gz: c5e8515376b4a6cb533630fb17980bc72ba46b916e40a8bd66e99944e31dd5603d63a5a33d4fc5aeed09ea59e4750f94a8a70ded31c2d0b596c82ca290603947
7
- data.tar.gz: dd2e5f454c30535c68a704b1488a8de0e33bfe237130a79a57584cd5ae4bb1437ba99fef0f5e1dd1784750d64a9a8ac753c1064d35cdb4ea8a635dcdfbafec0c
6
+ metadata.gz: 27bcd19c86d54a1cf5af027aa29ed1e81b79bf21d54459b438789be81999a915950e26311011b38d9b79c0106b8537cf01287f3f89a1974f4b10dfcd56429f7b
7
+ data.tar.gz: 86586b2a76dec19a36d3bae63a16cda9301c9659cabb50b0d7b66afe946effd35f7ebe38748ac0f9c398a835f1429d29a5661c94e52187f59db89b1278502cbc
@@ -0,0 +1,27 @@
1
+ name: JRuby
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ env:
13
+ BUNDLE_GEMFILE: gemfiles/jruby_activerecord_7.0.gemfile
14
+ JRUBY_OPTS: --debug
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - name: Set up Ruby
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: jruby
21
+ bundler-cache: true
22
+ - name: Run tests
23
+ run: bundle exec rspec
24
+ - name: Coveralls
25
+ uses: coverallsapp/github-action@master
26
+ with:
27
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,30 @@
1
+ name: Ruby 2.5
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1 ]
16
+ env:
17
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Set up Ruby
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: 2.5
24
+ bundler-cache: true
25
+ - name: Run tests
26
+ run: bundle exec rspec
27
+ - name: Coveralls
28
+ uses: coverallsapp/github-action@master
29
+ with:
30
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,30 @@
1
+ name: Ruby 2.6
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1 ]
16
+ env:
17
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Set up Ruby
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: 2.6
24
+ bundler-cache: true
25
+ - name: Run tests
26
+ run: bundle exec rspec
27
+ - name: Coveralls
28
+ uses: coverallsapp/github-action@master
29
+ with:
30
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,30 @@
1
+ name: Ruby 2.7
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1, activerecord_7.0, activerecord_head ]
16
+ env:
17
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Set up Ruby
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: 2.7
24
+ bundler-cache: true
25
+ - name: Run tests
26
+ run: bundle exec rspec
27
+ - name: Coveralls
28
+ uses: coverallsapp/github-action@master
29
+ with:
30
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,34 @@
1
+ name: Ruby 3.0
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ gemfile: [ activerecord_6.0, activerecord_6.1, activerecord_7.0, activerecord_head ]
16
+ # sqlite 1.3 is not compatible with Ruby 3.0+. If this changes or
17
+ # sqlite is no longer a dependency then the Active Record 5.2 tests
18
+ # can be added:
19
+ # gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1, activerecord_head ]
20
+ env:
21
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - name: Set up Ruby
25
+ uses: ruby/setup-ruby@v1
26
+ with:
27
+ ruby-version: 3.0
28
+ bundler-cache: true
29
+ - name: Run tests
30
+ run: bundle exec rspec
31
+ - name: Coveralls
32
+ uses: coverallsapp/github-action@master
33
+ with:
34
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,34 @@
1
+ name: Ruby 3.1
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ gemfile: [ activerecord_6.0, activerecord_6.1, activerecord_7.0, activerecord_head ]
16
+ # sqlite 1.3 is not compatible with Ruby 3.0+. If this changes or
17
+ # sqlite is no longer a dependency then the Active Record 5.2 tests
18
+ # can be added:
19
+ # gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1, activerecord_head ]
20
+ env:
21
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - name: Set up Ruby
25
+ uses: ruby/setup-ruby@v1
26
+ with:
27
+ ruby-version: 3.1
28
+ bundler-cache: true
29
+ - name: Run tests
30
+ run: bundle exec rspec
31
+ - name: Coveralls
32
+ uses: coverallsapp/github-action@master
33
+ with:
34
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,34 @@
1
+ name: Ruby 3.2
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ gemfile: [ activerecord_6.0, activerecord_6.1, activerecord_7.0, activerecord_head ]
16
+ # sqlite 1.3 is not compatible with Ruby 3.0+. If this changes or
17
+ # sqlite is no longer a dependency then the Active Record 5.2 tests
18
+ # can be added:
19
+ # gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1, activerecord_head ]
20
+ env:
21
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - name: Set up Ruby
25
+ uses: ruby/setup-ruby@v1
26
+ with:
27
+ ruby-version: 3.2
28
+ bundler-cache: true
29
+ - name: Run tests
30
+ run: bundle exec rspec
31
+ - name: Coveralls
32
+ uses: coverallsapp/github-action@master
33
+ with:
34
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,34 @@
1
+ name: Ruby head
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ gemfile: [ activerecord_6.0, activerecord_6.1, activerecord_7.0, activerecord_head ]
16
+ # sqlite 1.3 is not compatible with Ruby 3.0+. If this changes or
17
+ # sqlite is no longer a dependency then the Active Record 5.2 tests
18
+ # can be added:
19
+ # gemfile: [ activerecord_5.2, activerecord_6.0, activerecord_6.1, activerecord_head ]
20
+ env:
21
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - name: Set up Ruby
25
+ uses: ruby/setup-ruby@v1
26
+ with:
27
+ ruby-version: head
28
+ bundler-cache: true
29
+ - name: Run tests
30
+ run: bundle exec rspec
31
+ - name: Coveralls
32
+ uses: coverallsapp/github-action@master
33
+ with:
34
+ github-token: ${{ secrets.GITHUB_TOKEN }}
data/.gitignore CHANGED
@@ -6,3 +6,4 @@ spec/test.sqlite3
6
6
  coverage
7
7
  .idea
8
8
  gemfiles/*.lock
9
+ .ruby-version
data/.rubocop.yml CHANGED
@@ -1,17 +1,21 @@
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-rake
4
+
5
+ inherit_from: .rubocop_todo.yml
6
+
1
7
  AllCops:
2
- Include:
3
- - '**/Rakefile'
4
- Exclude:
5
- - 'spec/**/*'
6
- Metrics/LineLength:
8
+ TargetRubyVersion: 2.5
9
+ NewCops: enable
10
+ Layout/LineLength:
7
11
  Max: 99
8
- Style/FileName:
12
+ Naming/FileName:
9
13
  Enabled: false
10
14
  Style/ModuleFunction:
11
15
  Enabled: false
12
16
  Style/Encoding:
13
17
  Enabled: false
14
- Documentation:
18
+ Style/Documentation:
15
19
  Enabled: false
16
20
  Metrics/MethodLength:
17
21
  Max: 15
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,120 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2021-07-10 17:38:28 UTC using RuboCop version 1.16.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 10
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
12
+ # URISchemes: http, https
13
+ Layout/LineLength:
14
+ Max: 110
15
+
16
+ # Offense count: 1
17
+ Lint/MissingSuper:
18
+ Exclude:
19
+ - 'lib/amoeba/macros/base.rb'
20
+
21
+ # Offense count: 17
22
+ Lint/UselessAssignment:
23
+ Exclude:
24
+ - 'spec/support/data.rb'
25
+
26
+ # Offense count: 8
27
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
28
+ # IgnoredMethods: refine
29
+ Metrics/BlockLength:
30
+ Max: 339
31
+
32
+ # Offense count: 2
33
+ # Configuration parameters: CountComments, CountAsOne.
34
+ Metrics/ClassLength:
35
+ Max: 141
36
+
37
+ # Offense count: 3
38
+ # Configuration parameters: ForbiddenDelimiters.
39
+ # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
40
+ Naming/HeredocDelimiterNaming:
41
+ Exclude:
42
+ - 'lib/amoeba/config.rb'
43
+
44
+ # Offense count: 2
45
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
46
+ # SupportedStyles: snake_case, normalcase, non_integer
47
+ # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
48
+ Naming/VariableNumber:
49
+ Exclude:
50
+ - 'spec/support/data.rb'
51
+
52
+ # Offense count: 1
53
+ RSpec/BeforeAfterAll:
54
+ Exclude:
55
+ - 'spec/spec_helper.rb'
56
+ - 'spec/rails_helper.rb'
57
+ - 'spec/support/**/*.rb'
58
+ - 'spec/lib/amoeba_spec.rb'
59
+
60
+ # Offense count: 12
61
+ # Configuration parameters: Prefixes.
62
+ # Prefixes: when, with, without
63
+ RSpec/ContextWording:
64
+ Exclude:
65
+ - 'spec/lib/amoeba_spec.rb'
66
+
67
+ # Offense count: 1
68
+ # Configuration parameters: IgnoredMetadata.
69
+ RSpec/DescribeClass:
70
+ Exclude:
71
+ - 'spec/lib/amoeba_spec.rb'
72
+
73
+ # Offense count: 3
74
+ # Configuration parameters: CountAsOne.
75
+ RSpec/ExampleLength:
76
+ Max: 134
77
+
78
+ # Offense count: 1
79
+ # Configuration parameters: .
80
+ # SupportedStyles: have_received, receive
81
+ RSpec/MessageSpies:
82
+ EnforcedStyle: receive
83
+
84
+ # Offense count: 7
85
+ RSpec/MultipleExpectations:
86
+ Max: 55
87
+
88
+ # Offense count: 18
89
+ # Configuration parameters: IgnoreSharedExamples.
90
+ RSpec/NamedSubject:
91
+ Exclude:
92
+ - 'spec/lib/amoeba_spec.rb'
93
+
94
+ # Offense count: 1
95
+ # Cop supports --auto-correct.
96
+ # Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers.
97
+ # SupportedStyles: inflected, explicit
98
+ RSpec/PredicateMatcher:
99
+ Exclude:
100
+ - 'spec/lib/amoeba_spec.rb'
101
+
102
+ # Offense count: 5
103
+ # Cop supports --auto-correct.
104
+ # Configuration parameters: EnforcedStyle.
105
+ # SupportedStyles: always, always_true, never
106
+ Style/FrozenStringLiteralComment:
107
+ Exclude:
108
+ - 'spec/lib/amoeba_spec.rb'
109
+ - 'spec/spec_helper.rb'
110
+ - 'spec/support/data.rb'
111
+ - 'spec/support/models.rb'
112
+ - 'spec/support/schema.rb'
113
+
114
+ # Offense count: 5
115
+ # Cop supports --auto-correct.
116
+ Style/StringConcatenation:
117
+ Exclude:
118
+ - 'spec/lib/amoeba_spec.rb'
119
+ - 'spec/spec_helper.rb'
120
+ - 'spec/support/models.rb'
data/Appraisals CHANGED
@@ -1,76 +1,59 @@
1
- appraise 'activerecord-4.2' do
2
- gem 'activerecord', '~> 4.2.0'
3
- group :development, :test do
4
- gem "sqlite3", "~> 1.3.0"
5
- end
6
- end
7
-
8
- appraise 'activerecord-5.0' do
9
- gem 'activerecord', '~> 5.0.0'
10
- group :development, :test do
11
- gem "sqlite3", "~> 1.3.0"
12
- end
13
- end
14
-
15
- appraise 'activerecord-5.1' do
16
- gem 'activerecord', '~> 5.1.0'
17
- group :development, :test do
18
- gem "sqlite3", "~> 1.3.0"
19
- end
20
- end
1
+ # frozen_string_literal: true
21
2
 
22
3
  appraise 'activerecord-5.2' do
23
4
  gem 'activerecord', '~> 5.2.0'
24
5
  group :development, :test do
25
- gem "sqlite3", "~> 1.3.0"
6
+ gem 'sqlite3', '~> 1.3.0'
26
7
  end
27
8
  end
28
9
 
29
10
  appraise 'activerecord-6.0' do
30
11
  gem 'activerecord', '~> 6.0.0'
31
12
  group :development, :test do
32
- gem "sqlite3", "~> 1.4.0"
13
+ gem 'sqlite3', '~> 1.6.0'
33
14
  end
34
15
  end
35
16
 
36
17
  appraise 'activerecord-6.1' do
37
18
  gem 'activerecord', '~> 6.1.0'
38
19
  group :development, :test do
39
- gem "sqlite3", "~> 1.4.0"
20
+ gem 'sqlite3', '~> 1.6.0'
40
21
  end
41
22
  end
42
23
 
43
- appraise 'jruby-activerecord-6.1' do
44
- gem 'activerecord', '~> 6.1.0'
24
+ appraise 'activerecord-7.0' do
25
+ gem 'activerecord', '~> 7.0.0'
45
26
  group :development, :test do
46
- gem 'activerecord-jdbc-adapter', '~> 61.0'
47
- gem 'activerecord-jdbcsqlite3-adapter', '~> 61.0'
27
+ gem 'sqlite3', '~> 1.6.0'
48
28
  end
49
29
  end
50
30
 
51
- appraise 'activerecord-head' do
52
- git 'git://github.com/rails/arel.git' do
53
- gem 'arel'
31
+ appraise 'jruby-activerecord-7.0' do
32
+ gem 'activerecord', '~> 7.0.0'
33
+ group :development, :test do
34
+ gem 'activerecord-jdbc-adapter', '~> 70.1'
35
+ gem 'activerecord-jdbcsqlite3-adapter', '~> 70.1'
54
36
  end
55
- git 'git://github.com/rails/rails.git', branch: 'main' do
37
+ end
38
+
39
+ appraise 'activerecord-head' do
40
+ git 'https://github.com/rails/rails.git', branch: 'main' do
56
41
  gem 'activerecord'
57
42
  end
58
43
  group :development, :test do
59
- gem "sqlite3", "~> 1.4.0"
44
+ gem 'sqlite3', '~> 1.6.0'
60
45
  end
61
46
  end
62
47
 
63
48
  appraise 'jruby-activerecord-head' do
64
- git 'git://github.com/rails/arel.git' do
65
- gem 'arel'
66
- end
67
- git 'git://github.com/rails/rails.git', branch: 'main' do
49
+ git 'https://github.com/rails/rails.git', branch: 'main' do
68
50
  gem 'activerecord'
69
51
  end
70
52
  group :development, :test do
71
- git 'git://github.com/jruby/activerecord-jdbc-adapter' do
53
+ git 'https://github.com/jruby/activerecord-jdbc-adapter' do
72
54
  gem 'activerecord-jdbc-adapter'
73
- gem 'activerecord-jdbcsqlite3-adapter', glob: 'activerecord-jdbcsqlite3-adapter/activerecord-jdbcsqlite3-adapter.gemspec'
55
+ gem 'activerecord-jdbcsqlite3-adapter',
56
+ glob: 'activerecord-jdbcsqlite3-adapter/activerecord-jdbcsqlite3-adapter.gemspec'
74
57
  end
75
58
  end
76
59
  end
data/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ ### 3.3.0
2
+
3
+ * Move test pipelines from Travis to Github Actions.
4
+ * `include_field` and `exclude_field` configuration options have been removed.
5
+ These had been marked as deprecated in version 2 and replaced by
6
+ `include_association` and `exclude_association`.
7
+ * Official support dropped for Rails 5.1 and earlier. Test pipelines now run
8
+ for Rails 5.2 up to 7.0 as well as the current development head.
9
+ * Official support dropped for Ruby 2.4 and earlier. Test pipelines now run for
10
+ Ruby 2.5 up to 3.2 as well as the current development head.
11
+ * Ambiguous 'BSD' license replaced with 'BSD 2-Claus "Simplified" License'.
12
+ * Fix copy-and-paste mistake in documenation. Thanks @budu.
13
+ * Use lazy load hooks to extend ActiveRecord::Base. This is to ensure
14
+ compatibility with Factory Bot Rails 6.4.0. Thanks @tagliala.
data/Gemfile CHANGED
@@ -1,12 +1,15 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
  gemspec
3
5
 
4
6
  group :development, :test do
5
7
  gem 'rake'
6
- gem 'coveralls', require: false
8
+ gem 'simplecov', '~> 0.21.2'
9
+ gem 'simplecov-lcov', '~> 0.8.0'
7
10
  end
8
11
 
9
12
  group :local_development do
10
- gem 'pry'
11
13
  gem 'appraisal'
14
+ gem 'pry'
12
15
  end
data/LICENSE.md ADDED
@@ -0,0 +1,11 @@
1
+ [The 2-Clause BSD License](http://www.opensource.org/licenses/bsd-license.php)
2
+
3
+ Copyright (c) 2012, Vaughn Draughon
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
9
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
10
+
11
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md CHANGED
@@ -16,7 +16,7 @@ This gem is named "Amoeba" because amoebas are (small life forms that are) good
16
16
 
17
17
  An ActiveRecord extension gem to allow the duplication of associated child record objects when duplicating an active record model.
18
18
 
19
- Rails 4.x, 5.0, 5.1, 5.2, 6.0, 6.1 compatible.
19
+ Rails 5.2, 6.0, 6.1 compatible. For Rails 4.2 to 5.1 use version 3.x.
20
20
 
21
21
  ### Features
22
22
 
@@ -1131,7 +1131,7 @@ end
1131
1131
 
1132
1132
  #### append
1133
1133
 
1134
- Append some text to a field. This only works for string fields. Accepts a hash of fields to prepend. The keys are the field names and the values are the prefix strings. An example would be to add " (copied version)" to your description field. Don't forget to add a leading space if you want it. Passing a hash will add each key value pair to the list of append directives. If you wish to empty the list of directives, you may pass the hash inside of an array like this `[{:contents => " (copied version)"}]`.
1134
+ Append some text to a field. This only works for string fields. Accepts a hash of fields to append. The keys are the field names and the values are the prefix strings. An example would be to add " (copied version)" to your description field. Don't forget to add a leading space if you want it. Passing a hash will add each key value pair to the list of append directives. If you wish to empty the list of directives, you may pass the hash inside of an array like this `[{:contents => " (copied version)"}]`.
1135
1135
 
1136
1136
  #### set
1137
1137
 
@@ -1173,17 +1173,3 @@ bundle exec rspec spec
1173
1173
 
1174
1174
  * add ability to cancel further processing from within an override block
1175
1175
  * write some spec for the override method
1176
-
1177
- ## License
1178
-
1179
- [The BSD License](http://www.opensource.org/licenses/bsd-license.php)
1180
-
1181
- Copyright (c) 2012, Vaughn Draughon
1182
- All rights reserved.
1183
-
1184
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1185
-
1186
- - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
1187
- - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
1188
-
1189
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5