activerecord-bitemporal 2.0.0 → 2.2.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/.circleci/config.yml +30 -109
- data/.github/workflows/release.yml +37 -0
- data/CHANGELOG.md +34 -0
- data/lib/activerecord-bitemporal/bitemporal.rb +2 -0
- data/lib/activerecord-bitemporal/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f295f51427b6b8fad97d0c36e84946cb705aad3d1d8bbff9a18b92df60cc083
|
|
4
|
+
data.tar.gz: 44003988d2c2dd02e4133a4d6ffbd233167793a9d5fac5bd5d1056fff3c97f42
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2ebc5d5e6933952e285e3a88f5d8fc03a919ef9c79e0106845362c09c3e73520f24b863a404f9b9a9ef1cfc94e4af48184f7e82345dfa6544bbde5f06555b646
|
|
7
|
+
data.tar.gz: c83ffc5f27d54e8dfed0aaa051922a20b16b8bcba78c556d9568fc71fb15c7d54b0e9713984a150015001469188e826ee5cfb54e41e89d6bea37e1be7d8422ff
|
data/.circleci/config.yml
CHANGED
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
version: 2.1
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
docker:
|
|
6
|
-
- image: ruby:2.7.5
|
|
7
|
-
- image: circleci/postgres:11-alpine
|
|
8
|
-
|
|
9
|
-
ruby_3_0:
|
|
10
|
-
docker:
|
|
11
|
-
- image: ruby:3.0.3
|
|
12
|
-
- image: circleci/postgres:11-alpine
|
|
13
|
-
|
|
14
|
-
ruby_3_1:
|
|
15
|
-
docker:
|
|
16
|
-
- image: ruby:3.1.0
|
|
17
|
-
- image: circleci/postgres:11-alpine
|
|
18
|
-
|
|
19
|
-
commands:
|
|
20
|
-
run_rspec:
|
|
3
|
+
jobs:
|
|
4
|
+
rspec:
|
|
21
5
|
parameters:
|
|
6
|
+
ruby-version:
|
|
7
|
+
type: string
|
|
22
8
|
gemfile:
|
|
23
9
|
type: string
|
|
10
|
+
docker:
|
|
11
|
+
- image: ruby:<< parameters.ruby-version >>
|
|
12
|
+
- image: cimg/postgres:11.16
|
|
24
13
|
steps:
|
|
25
14
|
- checkout
|
|
26
15
|
- run: gem install bundler
|
|
@@ -28,96 +17,28 @@ commands:
|
|
|
28
17
|
- run: bundle exec appraisal << parameters.gemfile >> bundle install
|
|
29
18
|
- run: bundle exec appraisal << parameters.gemfile >> rspec
|
|
30
19
|
|
|
31
|
-
jobs:
|
|
32
|
-
ruby_2_7_rails_5_2:
|
|
33
|
-
executor: ruby_2_7
|
|
34
|
-
steps:
|
|
35
|
-
- run_rspec:
|
|
36
|
-
gemfile: rails-5.2
|
|
37
|
-
|
|
38
|
-
ruby_2_7_rails_6_0:
|
|
39
|
-
executor: ruby_2_7
|
|
40
|
-
steps:
|
|
41
|
-
- run_rspec:
|
|
42
|
-
gemfile: rails-6.0
|
|
43
|
-
|
|
44
|
-
ruby_2_7_rails_6_1:
|
|
45
|
-
executor: ruby_2_7
|
|
46
|
-
steps:
|
|
47
|
-
- run_rspec:
|
|
48
|
-
gemfile: rails-6.1
|
|
49
|
-
|
|
50
|
-
ruby_2_7_rails_7_0:
|
|
51
|
-
executor: ruby_2_7
|
|
52
|
-
steps:
|
|
53
|
-
- run_rspec:
|
|
54
|
-
gemfile: rails-7.0
|
|
55
|
-
|
|
56
|
-
ruby_2_7_rails_main:
|
|
57
|
-
executor: ruby_2_7
|
|
58
|
-
steps:
|
|
59
|
-
- run_rspec:
|
|
60
|
-
gemfile: rails-main
|
|
61
|
-
|
|
62
|
-
ruby_3_0_rails_6_1:
|
|
63
|
-
executor: ruby_3_0
|
|
64
|
-
steps:
|
|
65
|
-
- run_rspec:
|
|
66
|
-
gemfile: rails-6.1
|
|
67
|
-
|
|
68
|
-
ruby_3_0_rails_7_0:
|
|
69
|
-
executor: ruby_3_0
|
|
70
|
-
steps:
|
|
71
|
-
- run_rspec:
|
|
72
|
-
gemfile: rails-7.0
|
|
73
|
-
|
|
74
|
-
ruby_3_0_rails_main:
|
|
75
|
-
executor: ruby_3_0
|
|
76
|
-
steps:
|
|
77
|
-
- run_rspec:
|
|
78
|
-
gemfile: rails-main
|
|
79
|
-
|
|
80
|
-
ruby_3_1_rails_6_1:
|
|
81
|
-
executor: ruby_3_1
|
|
82
|
-
steps:
|
|
83
|
-
- run_rspec:
|
|
84
|
-
gemfile: rails-6.1
|
|
85
|
-
|
|
86
|
-
ruby_3_1_rails_7_0:
|
|
87
|
-
executor: ruby_3_1
|
|
88
|
-
steps:
|
|
89
|
-
- run_rspec:
|
|
90
|
-
gemfile: rails-7.0
|
|
91
|
-
|
|
92
|
-
ruby_3_1_rails_main:
|
|
93
|
-
executor: ruby_3_1
|
|
94
|
-
steps:
|
|
95
|
-
- run_rspec:
|
|
96
|
-
gemfile: rails-main
|
|
97
|
-
|
|
98
20
|
workflows:
|
|
99
|
-
version: 2
|
|
100
|
-
|
|
101
21
|
test:
|
|
102
|
-
jobs:
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
|
|
22
|
+
jobs:
|
|
23
|
+
- rspec:
|
|
24
|
+
matrix:
|
|
25
|
+
parameters:
|
|
26
|
+
ruby-version:
|
|
27
|
+
- '2.7'
|
|
28
|
+
- '3.0'
|
|
29
|
+
- '3.1'
|
|
30
|
+
gemfile:
|
|
31
|
+
- rails-5.2
|
|
32
|
+
- rails-6.0
|
|
33
|
+
- rails-6.1
|
|
34
|
+
- rails-7.0
|
|
35
|
+
- rails-main
|
|
36
|
+
exclude:
|
|
37
|
+
- ruby-version: '3.0'
|
|
38
|
+
gemfile: rails-5.2
|
|
39
|
+
- ruby-version: '3.0'
|
|
40
|
+
gemfile: rails-6.0
|
|
41
|
+
- ruby-version: '3.1'
|
|
42
|
+
gemfile: rails-5.2
|
|
43
|
+
- ruby-version: '3.1'
|
|
44
|
+
gemfile: rails-6.0
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Push to rubygems.org
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
rubygems-otp-code:
|
|
7
|
+
description: RubyGems OTP code
|
|
8
|
+
required: true
|
|
9
|
+
type: string
|
|
10
|
+
email:
|
|
11
|
+
description: Your email
|
|
12
|
+
required: true
|
|
13
|
+
type: string
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
release:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
env:
|
|
19
|
+
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
|
|
20
|
+
GEM_HOST_OTP_CODE: ${{ github.event.inputs.rubygems-otp-code }}
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v3
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
|
|
26
|
+
- uses: ruby/setup-ruby@v1
|
|
27
|
+
with:
|
|
28
|
+
ruby-version: '3.1'
|
|
29
|
+
bundler-cache: true
|
|
30
|
+
|
|
31
|
+
- name: config
|
|
32
|
+
run: |
|
|
33
|
+
git config --global user.email ${{ github.event.inputs.email }}
|
|
34
|
+
git config --global user.name ${{ github.actor }}
|
|
35
|
+
|
|
36
|
+
- name: release
|
|
37
|
+
run: bundle exec rake release
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
### Breaking Changed
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- [replace postgres docker image](https://github.com/kufu/activerecord-bitemporal/pull/103)
|
|
9
|
+
- [use Matrix Jobs in CircleCI](https://github.com/kufu/activerecord-bitemporal/pull/107)
|
|
10
|
+
- [Add support changing swapped_id, when called #destroy](https://github.com/kufu/activerecord-bitemporal/pull/110)
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
### Deprecated
|
|
15
|
+
|
|
16
|
+
### Removed
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
## 2.1.0
|
|
21
|
+
|
|
22
|
+
### Breaking Changed
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- [Update valid_to after #update](https://github.com/kufu/activerecord-bitemporal/pull/105)
|
|
26
|
+
- [Add GitHub Actions workflow to release to RubyGems.org](https://github.com/kufu/activerecord-bitemporal/pull/104)
|
|
27
|
+
- [migrate Scheduled workflows in CircleCI](https://github.com/kufu/activerecord-bitemporal/pull/106)
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
### Deprecated
|
|
32
|
+
|
|
33
|
+
### Removed
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
3
37
|
## 2.0.0
|
|
4
38
|
|
|
5
39
|
### Breaking Changed
|
|
@@ -321,6 +321,7 @@ module ActiveRecord
|
|
|
321
321
|
# update 後に新しく生成したインスタンスのデータを移行する
|
|
322
322
|
@_swapped_id = after_instance.swapped_id
|
|
323
323
|
self.valid_from = after_instance.valid_from
|
|
324
|
+
self.valid_to = after_instance.valid_to
|
|
324
325
|
|
|
325
326
|
1
|
|
326
327
|
# MEMO: Must return false instead of nil, if `#_update_row` failure.
|
|
@@ -344,6 +345,7 @@ module ActiveRecord
|
|
|
344
345
|
duplicated_instance.valid_to = target_datetime
|
|
345
346
|
duplicated_instance.transaction_from = current_time
|
|
346
347
|
duplicated_instance.save!(validate: false)
|
|
348
|
+
@_swapped_id = duplicated_instance.swapped_id if @destroyed
|
|
347
349
|
}
|
|
348
350
|
raise ActiveRecord::RecordInvalid unless @destroyed
|
|
349
351
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-bitemporal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SmartHR
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-01-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -145,6 +145,7 @@ extra_rdoc_files: []
|
|
|
145
145
|
files:
|
|
146
146
|
- ".circleci/config.yml"
|
|
147
147
|
- ".github/auto_assign.yml"
|
|
148
|
+
- ".github/workflows/release.yml"
|
|
148
149
|
- ".gitignore"
|
|
149
150
|
- Appraisals
|
|
150
151
|
- CHANGELOG.md
|
|
@@ -188,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
188
189
|
- !ruby/object:Gem::Version
|
|
189
190
|
version: '0'
|
|
190
191
|
requirements: []
|
|
191
|
-
rubygems_version: 3.3
|
|
192
|
+
rubygems_version: 3.4.3
|
|
192
193
|
signing_key:
|
|
193
194
|
specification_version: 4
|
|
194
195
|
summary: BiTemporal Data Model for ActiveRecord
|