attr_default 0.9.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1cb48a0f8b0c2fd53ee4bcac3dc9f1359a15528a870f3ea0dfcf1f4585a551a0
4
- data.tar.gz: '09a5aade7a24100adf01d0524ff9295fa75a56c5b6fb8f73088a707942e9954b'
3
+ metadata.gz: f0718fb54818d290d7698ab692b6bea9749abeb0d4f26b20ef058725943a2ee4
4
+ data.tar.gz: 963fbf95a53857783ef889444b0340106569ff069f41a7006f79034e3bcbf840
5
5
  SHA512:
6
- metadata.gz: 38809db98ff436ece844b1b5982bbcfc3a2489aa6562056e4bbcf12c7045b9f109ab96ee58b3578ee7544bb05544932fbd5b8b4d62de3746497b60ade1b088eb
7
- data.tar.gz: c2103f9c9b7d3688a4fc299b36b16a1d7336e0064cdea34ef9fff02defc6d6c8510cb2969bed36279c42b2776459f50384f7c2ed08d07e075322b16640cc5f51
6
+ metadata.gz: 74e9f7735f5af01f2e58c1221e06eae267dbd434dc01056e50c19ebf7d77e0136aa0ef7ecd74a679faff77d0554c770d556ead60f4b7aa569c1239eac3658d16
7
+ data.tar.gz: 3632d1d1ea7fb0e56e48ec68f7a61400ab40764faa48ff2d785d5a0ceca610add0ac90d17fe24269ffedfd077ed557be10db7865cf695cbbad4af491f27a54f3
@@ -0,0 +1,33 @@
1
+ ---
2
+ version: 2
3
+ registries:
4
+ gem-fury:
5
+ type: rubygems-server
6
+ url: https://gem.fury.io/invoca
7
+ token: ${{secrets.BUNDLE_GEM__FURY__IO}}
8
+ replaces-base: true
9
+ updates:
10
+ - package-ecosystem: bundler
11
+ directory: "/"
12
+ registries: "*"
13
+ schedule:
14
+ interval: weekly
15
+ day: monday
16
+ time: "08:00"
17
+ timezone: PST8PDT
18
+ open-pull-requests-limit: 10
19
+ versioning-strategy: auto
20
+ commit-message:
21
+ prefix: No-Jira
22
+ include: scope
23
+ groups:
24
+ minor-patch-versions: # Group together minor / patch updates.
25
+ applies-to: "version-updates"
26
+ update-types:
27
+ - "minor"
28
+ - "patch"
29
+ minor-patch-security:
30
+ applies-to: "security-updates"
31
+ update-types:
32
+ - "minor"
33
+ - "patch"
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: Pipeline
3
+ on: [push]
4
+ jobs:
5
+ tests:
6
+ name: Unit Tests
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby: [3.1, 3.2, 3.3]
12
+ gemfile:
13
+ - gemfiles/rails_6_0.gemfile
14
+ - gemfiles/rails_6_1.gemfile
15
+ - gemfiles/rails_7_0.gemfile
16
+ - gemfiles/rails_7_1.gemfile
17
+ env:
18
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
19
+ steps:
20
+ - uses: actions/checkout@v2
21
+ - uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby }}
24
+ bundler: 2.2.29
25
+ bundler-cache: true
26
+ - name: Unit tests
27
+ run: bundle exec rake
28
+
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: Dependabot auto-merge
3
+ on: pull_request
4
+ permissions:
5
+ contents: write
6
+ pull-requests: write
7
+ jobs:
8
+ dependabot:
9
+ runs-on: ubuntu-latest
10
+ if: github.actor == 'dependabot[bot]'
11
+ steps:
12
+ - name: Enable auto-merge for Dependabot PRs
13
+ run: gh pr merge --auto --merge "$PR_URL"
14
+ env:
15
+ PR_URL: ${{github.event.pull_request.html_url}}
16
+ GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: Update Appraisals
3
+ on:
4
+ push: ~
5
+ schedule:
6
+ - cron: '0 13 * * 0' # Every Sunday at 1PM UTC
7
+ permissions:
8
+ contents: write
9
+ jobs:
10
+ update:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ - uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: 3.2
17
+ - name: Update Appraisal Gemfiles
18
+ run: bundle install && bundle exec appraisal install
19
+ - name: Commit & Push changes
20
+ run: |
21
+ git config --global user.name 'Invoca Automation'
22
+ git config --global user.email 'octothorpe@users.noreply.github.com'
23
+ git commit -am "non-production: Update Appraisal Gemfiles" || exit 0
24
+ git push
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  *.gem
2
2
  *.rbc
3
3
  *.sqlite3
4
+ *.sqlite3-shm
4
5
  .bundle
5
6
  .config
6
7
  .yardoc
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.1
1
+ 3.1.6
data/Appraisals CHANGED
@@ -1,16 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise 'rails-4' do
4
- gem 'rails', '~> 4.2'
5
- gem 'sqlite3', '~> 1.3.0'
6
- end
7
-
8
- appraise 'rails-5' do
9
- gem 'rails', '~> 5.2'
10
- gem 'sqlite3', '~> 1.4'
11
- end
3
+ require 'appraisal/matrix'
12
4
 
13
- appraise 'rails-6' do
14
- gem 'rails', '~> 6.0'
5
+ appraisal_matrix(rails: "6.0") do
15
6
  gem 'sqlite3', '~> 1.4'
16
7
  end
data/CHANGELOG.md CHANGED
@@ -4,6 +4,17 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
5
  Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 1.0.0 - 2024-06-01
8
+ ### Removed
9
+ - Removed support for EOL versions of Ruby (< 3.1) and Rails (< 6.0)
10
+
11
+ ## [0.10.0] - Unreleased
12
+ ### Added
13
+ - Added explicit support for Ruby 2.7, 3.0, and 3.1
14
+
15
+ ### Removed
16
+ - Removed explicit support for Rails 4
17
+
7
18
  ## [0.9.0] - 2020-05-15
8
19
  ### Added
9
20
  - Added support for rails 5 and 6.
data/Gemfile CHANGED
@@ -5,9 +5,10 @@ source 'https://rubygems.org'
5
5
  gemspec
6
6
 
7
7
  gem 'appraisal'
8
+ gem 'appraisal-matrix'
8
9
  gem 'pry'
9
10
  gem 'rake'
10
- gem 'sqlite3'
11
+ gem 'sqlite3', '~> 1.4'
11
12
 
12
13
  gem 'minitest'
13
14
  gem 'minitest-reporters'
data/Gemfile.lock CHANGED
@@ -1,165 +1,218 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- attr_default (0.9.0)
5
- rails (>= 4.2, < 7)
4
+ attr_default (1.0.0)
5
+ rails (>= 6.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actioncable (6.0.3)
11
- actionpack (= 6.0.3)
10
+ actioncable (7.1.3.4)
11
+ actionpack (= 7.1.3.4)
12
+ activesupport (= 7.1.3.4)
12
13
  nio4r (~> 2.0)
13
14
  websocket-driver (>= 0.6.1)
14
- actionmailbox (6.0.3)
15
- actionpack (= 6.0.3)
16
- activejob (= 6.0.3)
17
- activerecord (= 6.0.3)
18
- activestorage (= 6.0.3)
19
- activesupport (= 6.0.3)
15
+ zeitwerk (~> 2.6)
16
+ actionmailbox (7.1.3.4)
17
+ actionpack (= 7.1.3.4)
18
+ activejob (= 7.1.3.4)
19
+ activerecord (= 7.1.3.4)
20
+ activestorage (= 7.1.3.4)
21
+ activesupport (= 7.1.3.4)
20
22
  mail (>= 2.7.1)
21
- actionmailer (6.0.3)
22
- actionpack (= 6.0.3)
23
- actionview (= 6.0.3)
24
- activejob (= 6.0.3)
23
+ net-imap
24
+ net-pop
25
+ net-smtp
26
+ actionmailer (7.1.3.4)
27
+ actionpack (= 7.1.3.4)
28
+ actionview (= 7.1.3.4)
29
+ activejob (= 7.1.3.4)
30
+ activesupport (= 7.1.3.4)
25
31
  mail (~> 2.5, >= 2.5.4)
26
- rails-dom-testing (~> 2.0)
27
- actionpack (6.0.3)
28
- actionview (= 6.0.3)
29
- activesupport (= 6.0.3)
30
- rack (~> 2.0, >= 2.0.8)
32
+ net-imap
33
+ net-pop
34
+ net-smtp
35
+ rails-dom-testing (~> 2.2)
36
+ actionpack (7.1.3.4)
37
+ actionview (= 7.1.3.4)
38
+ activesupport (= 7.1.3.4)
39
+ nokogiri (>= 1.8.5)
40
+ racc
41
+ rack (>= 2.2.4)
42
+ rack-session (>= 1.0.1)
31
43
  rack-test (>= 0.6.3)
32
- rails-dom-testing (~> 2.0)
33
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
34
- actiontext (6.0.3)
35
- actionpack (= 6.0.3)
36
- activerecord (= 6.0.3)
37
- activestorage (= 6.0.3)
38
- activesupport (= 6.0.3)
44
+ rails-dom-testing (~> 2.2)
45
+ rails-html-sanitizer (~> 1.6)
46
+ actiontext (7.1.3.4)
47
+ actionpack (= 7.1.3.4)
48
+ activerecord (= 7.1.3.4)
49
+ activestorage (= 7.1.3.4)
50
+ activesupport (= 7.1.3.4)
51
+ globalid (>= 0.6.0)
39
52
  nokogiri (>= 1.8.5)
40
- actionview (6.0.3)
41
- activesupport (= 6.0.3)
53
+ actionview (7.1.3.4)
54
+ activesupport (= 7.1.3.4)
42
55
  builder (~> 3.1)
43
- erubi (~> 1.4)
44
- rails-dom-testing (~> 2.0)
45
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
46
- activejob (6.0.3)
47
- activesupport (= 6.0.3)
56
+ erubi (~> 1.11)
57
+ rails-dom-testing (~> 2.2)
58
+ rails-html-sanitizer (~> 1.6)
59
+ activejob (7.1.3.4)
60
+ activesupport (= 7.1.3.4)
48
61
  globalid (>= 0.3.6)
49
- activemodel (6.0.3)
50
- activesupport (= 6.0.3)
51
- activerecord (6.0.3)
52
- activemodel (= 6.0.3)
53
- activesupport (= 6.0.3)
54
- activestorage (6.0.3)
55
- actionpack (= 6.0.3)
56
- activejob (= 6.0.3)
57
- activerecord (= 6.0.3)
58
- marcel (~> 0.3.1)
59
- activesupport (6.0.3)
62
+ activemodel (7.1.3.4)
63
+ activesupport (= 7.1.3.4)
64
+ activerecord (7.1.3.4)
65
+ activemodel (= 7.1.3.4)
66
+ activesupport (= 7.1.3.4)
67
+ timeout (>= 0.4.0)
68
+ activestorage (7.1.3.4)
69
+ actionpack (= 7.1.3.4)
70
+ activejob (= 7.1.3.4)
71
+ activerecord (= 7.1.3.4)
72
+ activesupport (= 7.1.3.4)
73
+ marcel (~> 1.0)
74
+ activesupport (7.1.3.4)
75
+ base64
76
+ bigdecimal
60
77
  concurrent-ruby (~> 1.0, >= 1.0.2)
61
- i18n (>= 0.7, < 2)
62
- minitest (~> 5.1)
63
- tzinfo (~> 1.1)
64
- zeitwerk (~> 2.2, >= 2.2.2)
78
+ connection_pool (>= 2.2.5)
79
+ drb
80
+ i18n (>= 1.6, < 2)
81
+ minitest (>= 5.1)
82
+ mutex_m
83
+ tzinfo (~> 2.0)
65
84
  ansi (1.5.0)
66
- appraisal (2.2.0)
85
+ appraisal (2.5.0)
67
86
  bundler
68
87
  rake
69
88
  thor (>= 0.14.0)
70
- builder (3.2.3)
71
- coderay (1.1.1)
72
- concurrent-ruby (1.1.6)
89
+ appraisal-matrix (0.1.0)
90
+ appraisal (~> 2.2)
91
+ base64 (0.2.0)
92
+ bigdecimal (3.1.8)
93
+ builder (3.3.0)
94
+ coderay (1.1.3)
95
+ concurrent-ruby (1.3.3)
96
+ connection_pool (2.4.1)
73
97
  crass (1.0.6)
74
- erubi (1.9.0)
75
- globalid (0.4.2)
76
- activesupport (>= 4.2.0)
77
- i18n (1.8.2)
98
+ date (3.3.4)
99
+ drb (2.2.1)
100
+ erubi (1.13.0)
101
+ globalid (1.2.1)
102
+ activesupport (>= 6.1)
103
+ i18n (1.14.5)
78
104
  concurrent-ruby (~> 1.0)
79
- loofah (2.5.0)
105
+ io-console (0.7.2)
106
+ irb (1.13.2)
107
+ rdoc (>= 4.0.0)
108
+ reline (>= 0.4.2)
109
+ loofah (2.22.0)
80
110
  crass (~> 1.0.2)
81
- nokogiri (>= 1.5.9)
82
- mail (2.7.1)
111
+ nokogiri (>= 1.12.0)
112
+ mail (2.8.1)
83
113
  mini_mime (>= 0.1.1)
84
- marcel (0.3.3)
85
- mimemagic (~> 0.3.2)
86
- method_source (0.8.2)
87
- mimemagic (0.3.5)
88
- mini_mime (1.0.2)
89
- mini_portile2 (2.4.0)
90
- minitest (5.11.3)
91
- minitest-reporters (1.4.2)
114
+ net-imap
115
+ net-pop
116
+ net-smtp
117
+ marcel (1.0.4)
118
+ method_source (1.1.0)
119
+ mini_mime (1.1.5)
120
+ minitest (5.24.1)
121
+ minitest-reporters (1.7.1)
92
122
  ansi
93
123
  builder
94
124
  minitest (>= 5.0)
95
125
  ruby-progressbar
96
- nio4r (2.5.2)
97
- nokogiri (1.10.9)
98
- mini_portile2 (~> 2.4.0)
99
- pry (0.10.4)
100
- coderay (~> 1.1.0)
101
- method_source (~> 0.8.1)
102
- slop (~> 3.4)
103
- rack (2.2.2)
104
- rack-test (1.1.0)
105
- rack (>= 1.0, < 3)
106
- rails (6.0.3)
107
- actioncable (= 6.0.3)
108
- actionmailbox (= 6.0.3)
109
- actionmailer (= 6.0.3)
110
- actionpack (= 6.0.3)
111
- actiontext (= 6.0.3)
112
- actionview (= 6.0.3)
113
- activejob (= 6.0.3)
114
- activemodel (= 6.0.3)
115
- activerecord (= 6.0.3)
116
- activestorage (= 6.0.3)
117
- activesupport (= 6.0.3)
118
- bundler (>= 1.3.0)
119
- railties (= 6.0.3)
120
- sprockets-rails (>= 2.0.0)
121
- rails-dom-testing (2.0.3)
122
- activesupport (>= 4.2.0)
126
+ mutex_m (0.2.0)
127
+ net-imap (0.4.14)
128
+ date
129
+ net-protocol
130
+ net-pop (0.1.2)
131
+ net-protocol
132
+ net-protocol (0.2.2)
133
+ timeout
134
+ net-smtp (0.5.0)
135
+ net-protocol
136
+ nio4r (2.7.3)
137
+ nokogiri (1.16.6-x86_64-darwin)
138
+ racc (~> 1.4)
139
+ nokogiri (1.16.6-x86_64-linux)
140
+ racc (~> 1.4)
141
+ pry (0.14.2)
142
+ coderay (~> 1.1)
143
+ method_source (~> 1.0)
144
+ psych (5.1.2)
145
+ stringio
146
+ racc (1.8.0)
147
+ rack (3.1.4)
148
+ rack-session (2.0.0)
149
+ rack (>= 3.0.0)
150
+ rack-test (2.1.0)
151
+ rack (>= 1.3)
152
+ rackup (2.1.0)
153
+ rack (>= 3)
154
+ webrick (~> 1.8)
155
+ rails (7.1.3.4)
156
+ actioncable (= 7.1.3.4)
157
+ actionmailbox (= 7.1.3.4)
158
+ actionmailer (= 7.1.3.4)
159
+ actionpack (= 7.1.3.4)
160
+ actiontext (= 7.1.3.4)
161
+ actionview (= 7.1.3.4)
162
+ activejob (= 7.1.3.4)
163
+ activemodel (= 7.1.3.4)
164
+ activerecord (= 7.1.3.4)
165
+ activestorage (= 7.1.3.4)
166
+ activesupport (= 7.1.3.4)
167
+ bundler (>= 1.15.0)
168
+ railties (= 7.1.3.4)
169
+ rails-dom-testing (2.2.0)
170
+ activesupport (>= 5.0.0)
171
+ minitest
123
172
  nokogiri (>= 1.6)
124
- rails-html-sanitizer (1.3.0)
125
- loofah (~> 2.3)
126
- railties (6.0.3)
127
- actionpack (= 6.0.3)
128
- activesupport (= 6.0.3)
129
- method_source
130
- rake (>= 0.8.7)
131
- thor (>= 0.20.3, < 2.0)
132
- rake (13.0.1)
133
- ruby-progressbar (1.10.1)
134
- slop (3.6.0)
135
- sprockets (4.0.0)
173
+ rails-html-sanitizer (1.6.0)
174
+ loofah (~> 2.21)
175
+ nokogiri (~> 1.14)
176
+ railties (7.1.3.4)
177
+ actionpack (= 7.1.3.4)
178
+ activesupport (= 7.1.3.4)
179
+ irb
180
+ rackup (>= 1.0.0)
181
+ rake (>= 12.2)
182
+ thor (~> 1.0, >= 1.2.2)
183
+ zeitwerk (~> 2.6)
184
+ rake (13.2.1)
185
+ rdoc (6.7.0)
186
+ psych (>= 4.0.0)
187
+ reline (0.5.9)
188
+ io-console (~> 0.5)
189
+ ruby-progressbar (1.13.0)
190
+ sqlite3 (1.7.3-x86_64-darwin)
191
+ sqlite3 (1.7.3-x86_64-linux)
192
+ stringio (3.1.1)
193
+ thor (1.3.1)
194
+ timeout (0.4.1)
195
+ tzinfo (2.0.6)
136
196
  concurrent-ruby (~> 1.0)
137
- rack (> 1, < 3)
138
- sprockets-rails (3.2.1)
139
- actionpack (>= 4.0)
140
- activesupport (>= 4.0)
141
- sprockets (>= 3.0.0)
142
- sqlite3 (1.4.2)
143
- thor (1.0.1)
144
- thread_safe (0.3.6)
145
- tzinfo (1.2.7)
146
- thread_safe (~> 0.1)
147
- websocket-driver (0.7.1)
197
+ webrick (1.8.1)
198
+ websocket-driver (0.7.6)
148
199
  websocket-extensions (>= 0.1.0)
149
- websocket-extensions (0.1.4)
150
- zeitwerk (2.3.0)
200
+ websocket-extensions (0.1.5)
201
+ zeitwerk (2.6.16)
151
202
 
152
203
  PLATFORMS
153
- ruby
204
+ x86_64-darwin-23
205
+ x86_64-linux
154
206
 
155
207
  DEPENDENCIES
156
208
  appraisal
209
+ appraisal-matrix
157
210
  attr_default!
158
211
  minitest
159
212
  minitest-reporters
160
213
  pry
161
214
  rake
162
- sqlite3
215
+ sqlite3 (~> 1.4)
163
216
 
164
217
  BUNDLED WITH
165
- 1.17.2
218
+ 2.3.27
data/attr_default.gemspec CHANGED
@@ -20,5 +20,7 @@ Gem::Specification.new do |gem|
20
20
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
21
21
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/.*\.rb})
22
22
 
23
- gem.add_dependency 'rails', '>= 4.2', '< 7'
23
+ gem.required_ruby_version = '>= 3.1'
24
+
25
+ gem.add_dependency 'rails', '>= 6.0'
24
26
  end
data/catalog-info.yaml ADDED
@@ -0,0 +1,31 @@
1
+ # This file is partially auto-generated by the invoca-backstage-tools gem
2
+ # The following fields should not be edited manually as they are auto-generated
3
+ # based on the contents of the repo:
4
+ # - metadata.name
5
+ # - metadata.title
6
+ # - metadata.description
7
+ # - annotations.github.com/project-slug
8
+ # - invoca.com/version-repository-location
9
+ # - invoca.com/version-repository-name
10
+ # - spec.type
11
+ # - spec.owner
12
+ ---
13
+ apiVersion: backstage.io/v1alpha1
14
+ kind: Component
15
+ metadata:
16
+ name: attr_default-gem
17
+ title: AttrDefault
18
+ description: Dynamic Ruby defaults for ActiveRecord attributes
19
+ tags:
20
+ - ruby
21
+ - gem
22
+ annotations:
23
+ buildkite.com/project-slug: Invoca/attr_default
24
+ github.com/project-slug: Invoca/attr_default
25
+ invoca.com/version-repository-location: rubygems
26
+ invoca.com/version-repository-name: attr_default
27
+ spec:
28
+ type: library
29
+ lifecycle: production
30
+ owner: octothorpe
31
+ dependsOn: []
@@ -3,11 +3,12 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal"
6
+ gem "appraisal-matrix"
6
7
  gem "pry"
7
8
  gem "rake"
8
9
  gem "sqlite3", "~> 1.4"
9
10
  gem "minitest"
10
11
  gem "minitest-reporters"
11
- gem "rails", "~> 6.0"
12
+ gem "rails", "~> 6.0.0"
12
13
 
13
14
  gemspec path: "../"
@@ -3,11 +3,12 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal"
6
+ gem "appraisal-matrix"
6
7
  gem "pry"
7
8
  gem "rake"
8
9
  gem "sqlite3", "~> 1.4"
9
10
  gem "minitest"
10
11
  gem "minitest-reporters"
11
- gem "rails", "~> 5.2"
12
+ gem "rails", "~> 6.1.0"
12
13
 
13
14
  gemspec path: "../"
@@ -3,11 +3,12 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal"
6
+ gem "appraisal-matrix"
6
7
  gem "pry"
7
8
  gem "rake"
8
- gem "sqlite3", "~> 1.3.0"
9
+ gem "sqlite3", "~> 1.4"
9
10
  gem "minitest"
10
11
  gem "minitest-reporters"
11
- gem "rails", "~> 4.2"
12
+ gem "rails", "~> 7.0.0"
12
13
 
13
14
  gemspec path: "../"
@@ -0,0 +1,14 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "appraisal-matrix"
7
+ gem "pry"
8
+ gem "rake"
9
+ gem "sqlite3", "~> 1.4"
10
+ gem "minitest"
11
+ gem "minitest-reporters"
12
+ gem "rails", "~> 7.1.0"
13
+
14
+ gemspec path: "../"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AttrDefault
4
- VERSION = '0.9.0'
4
+ VERSION = '1.0.0'
5
5
  end
@@ -149,7 +149,7 @@ class AttrDefaultTest < Minitest::Test
149
149
  # not touched or saved yet, still SQL default
150
150
  assert_equal "domain.com", domain.read_attribute(:domain)
151
151
 
152
- domain.save(SAVE_NO_VALIDATE)
152
+ domain.save(validate: false)
153
153
 
154
154
  # now it should be set to Ruby default
155
155
  assert_equal "initial.com", domain.read_attribute(:domain)
@@ -6,13 +6,6 @@ else
6
6
  database_adapter = "sqlite3"
7
7
  end
8
8
 
9
- SAVE_NO_VALIDATE =
10
- if Gem.loaded_specs['activesupport'].version >= Gem::Version.new('3.0')
11
- {:validate => false}
12
- else
13
- false
14
- end
15
-
16
9
  DUP_METHODS =
17
10
  if Gem.loaded_specs['activesupport'].version >= Gem::Version.new('4.0')
18
11
  [:dup]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attr_default
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca Development
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-15 00:00:00.000000000 Z
11
+ date: 2024-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,20 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '7'
19
+ version: '6.0'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: '4.2'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '7'
26
+ version: '6.0'
33
27
  description: Dynamic Ruby defaults for ActiveRecord attributes
34
28
  email:
35
29
  - development@invoca.com
@@ -38,9 +32,11 @@ extensions: []
38
32
  extra_rdoc_files: []
39
33
  files:
40
34
  - ".dependabot/config.yml"
35
+ - ".github/dependabot.yml"
36
+ - ".github/workflows/build.yml"
37
+ - ".github/workflows/dependabot_automerge.yml"
38
+ - ".github/workflows/update_appraisals.yml"
41
39
  - ".gitignore"
42
- - ".jenkins/Jenkinsfile"
43
- - ".jenkins/ruby_build_pod.yml"
44
40
  - ".ruby-version"
45
41
  - Appraisals
46
42
  - CHANGELOG.md
@@ -50,13 +46,14 @@ files:
50
46
  - README.rdoc
51
47
  - Rakefile
52
48
  - attr_default.gemspec
53
- - gemfiles/rails_4.gemfile
54
- - gemfiles/rails_5.gemfile
55
- - gemfiles/rails_6.gemfile
49
+ - catalog-info.yaml
50
+ - gemfiles/rails_6_0.gemfile
51
+ - gemfiles/rails_6_1.gemfile
52
+ - gemfiles/rails_7_0.gemfile
53
+ - gemfiles/rails_7_1.gemfile
56
54
  - lib/attr_default.rb
57
55
  - lib/attr_default/railtie.rb
58
56
  - lib/attr_default/version.rb
59
- - semaphore_ci/setup.sh
60
57
  - test/attr_default_test.rb
61
58
  - test/database_schema.rb
62
59
  - test/test_helper.rb
@@ -65,7 +62,7 @@ homepage: https://github.com/Invoca/attr_default
65
62
  licenses: []
66
63
  metadata:
67
64
  allowed_push_host: https://rubygems.org
68
- post_install_message:
65
+ post_install_message:
69
66
  rdoc_options: []
70
67
  require_paths:
71
68
  - lib
@@ -73,15 +70,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
70
  requirements:
74
71
  - - ">="
75
72
  - !ruby/object:Gem::Version
76
- version: '0'
73
+ version: '3.1'
77
74
  required_rubygems_version: !ruby/object:Gem::Requirement
78
75
  requirements:
79
76
  - - ">="
80
77
  - !ruby/object:Gem::Version
81
78
  version: '0'
82
79
  requirements: []
83
- rubygems_version: 3.0.1
84
- signing_key:
80
+ rubygems_version: 3.3.27
81
+ signing_key:
85
82
  specification_version: 4
86
83
  summary: 'Dynamic Ruby defaults for ActiveRecord attributes. These are lazy evaluated
87
84
  just in time: when first accessed, or just before validation or save. This allows
data/.jenkins/Jenkinsfile DELETED
@@ -1,74 +0,0 @@
1
- #!/usr/bin/groovy
2
- @Library('jenkins-pipeline@v0.4.4')
3
- import com.invoca.utils.*;
4
-
5
- pipeline {
6
- agent {
7
- kubernetes {
8
- defaultContainer 'ruby'
9
- yamlFile '.jenkins/ruby_build_pod.yml'
10
- }
11
- }
12
-
13
- environment { GITHUB_TOKEN = credentials('github_token') }
14
-
15
- stages {
16
- stage('Setup') {
17
- steps {
18
- updateGitHubStatus('clean-build', 'pending', 'Unit tests.')
19
- sh 'bundle install'
20
- sh 'bundle exec appraisal install'
21
- }
22
- }
23
-
24
- stage('Appraisals') {
25
- parallel {
26
- stage('Current') {
27
- steps {
28
- sh 'SQLITE3_FILE_PATH=test/test.current.sqlite3 JUNIT_OUTPUT_DIR=test/reports/current bundle exec rake'
29
- }
30
- post { always { junit 'test/reports/current/*.xml' } }
31
- }
32
-
33
- stage('Rails 4') {
34
- steps {
35
- sh 'SQLITE3_FILE_PATH=test/test.rails4.sqlite3 JUNIT_OUTPUT_DIR=test/reports/rails4 bundle exec appraisal rails-4 rake'
36
- }
37
- post { always { junit 'test/reports/rails4/*.xml' } }
38
- }
39
-
40
- stage('Rails 5') {
41
- steps {
42
- sh 'SQLITE3_FILE_PATH=test/test.rails5.sqlite3 JUNIT_OUTPUT_DIR=test/reports/rails5 bundle exec appraisal rails-5 rake'
43
- }
44
- post { always { junit 'test/reports/rails5/*.xml' } }
45
- }
46
-
47
- stage('Rails 6') {
48
- steps {
49
- sh 'SQLITE3_FILE_PATH=test/test.rails6.sqlite3 JUNIT_OUTPUT_DIR=test/reports/rails6 bundle exec appraisal rails-6 rake'
50
- }
51
- post { always { junit 'test/reports/rails6/*.xml' } }
52
- }
53
- }
54
- }
55
- }
56
-
57
- post {
58
- success { updateGitHubStatus('clean-build', 'success', 'Unit tests.') }
59
- failure { updateGitHubStatus('clean-build', 'failure', 'Unit tests.') }
60
- always { notifySlack(currentBuild.result) }
61
- }
62
- }
63
-
64
- void updateGitHubStatus(String context, String status, String description) {
65
- gitHubStatus([
66
- repoSlug: 'Invoca/attr_default',
67
- sha: env.GIT_COMMIT,
68
- description: description,
69
- context: context,
70
- targetURL: env.RUN_DISPLAY_URL,
71
- token: env.GITHUB_TOKEN,
72
- status: status
73
- ])
74
- }
@@ -1,18 +0,0 @@
1
- ---
2
- apiVersion: v1
3
- kind: Pod
4
- metadata:
5
- labels:
6
- jenkins/attr_default: 'true'
7
- namespace: jenkins
8
- name: attr_default
9
- spec:
10
- containers:
11
- - name: ruby
12
- image: ruby:2.6.1
13
- tty: true
14
- resources:
15
- requests:
16
- memory: "100Mi"
17
- command:
18
- - cat
@@ -1,3 +0,0 @@
1
- #!/bin/sh -x
2
-
3
- bundle install --path vendor/bundle