operator_recordable 1.1.0 → 1.2.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: 7a738b794ff45332a5df918bcec227d8c22683cefca6505b4127d53ca664ae78
4
- data.tar.gz: 2d895a62c309fc3b45d5b1dc8c9c31eeadf43e580e0fbea8ccb1b565beb50887
3
+ metadata.gz: ab283fd134cf058f9e80fd77978564891460512b16d25dcad77f36ce07675b6c
4
+ data.tar.gz: fbfd74ee91030399f4637ab535ce38b7163b377a69cc9797b5261a211ee96b93
5
5
  SHA512:
6
- metadata.gz: df72ca9f3c177e9f237bd8af23bbb9ac03df004dfc46a4db268cae137a91a9a80cbcc04c564406d04cb3ae92e51c050ba92ca94d8ebf6ebb7be38e52b03ea4c3
7
- data.tar.gz: cb82594ea68b88414faf85d8ab556f6e58b44ee971b9886d1d34617c0618c290163761309b5e279fd8f4e589f8a7acca0397ef566215f391ea5697d0de94bf32
6
+ metadata.gz: d8777d0962188046f0cc556f1a9d399117d6a695b6f5b6e46d96b1cad036dd8de274cc6da2421788046e6dbe7fc5fde56169e75162767f77b3f513b75b1f8e58
7
+ data.tar.gz: 052113312da2cacdd349e15c47b2c993baeb05c4b7f40f1b06f5cf83e8864015594dd54bffe75dea1946c18a5e4dd3d780f1695b0fe15809a40f60dd5fddb920
@@ -59,15 +59,6 @@ jobs:
59
59
  activerecord: '5.2'
60
60
  plugin: '_with_request_store'
61
61
  experimental: false
62
- # Rails 7.0.1 will start supporting Ruby 3.1, but Rails 7.0.1 has not been released yet
63
- - ruby: '3.1'
64
- activerecord: '7.0'
65
- plugin: ''
66
- experimental: false
67
- - ruby: '3.1'
68
- activerecord: '7.0'
69
- plugin: '_with_request_store'
70
- experimental: false
71
62
  include:
72
63
  - ruby: '2.7'
73
64
  activerecord: '5.2'
data/Appraisals CHANGED
@@ -32,12 +32,12 @@ appraise "activerecord_6.1_with_request_store" do
32
32
  end
33
33
 
34
34
  appraise "activerecord_7.0" do
35
- gem "activerecord", "~> 7.0.0"
35
+ gem "activerecord", "~> 7.0.1"
36
36
  gem "sqlite3", "~> 1.4"
37
37
  end
38
38
 
39
39
  appraise "activerecord_7.0_with_request_store" do
40
- gem "activerecord", "~> 7.0.0"
40
+ gem "activerecord", "~> 7.0.1"
41
41
  gem "request_store"
42
42
  gem "sqlite3", "~> 1.4"
43
43
  end
data/CHANGELOG.md CHANGED
@@ -1,20 +1,46 @@
1
1
  ## Unreleased
2
2
 
3
+
4
+ ## 1.2.0 (2022-04-26)
5
+
6
+ ### Changes
7
+
8
+ * Make associations optional
9
+ + [PR#28](https://github.com/yujideveloper/operator_recordable/pull/25)
10
+
11
+ ### Misc
12
+
13
+ * CI against for Rails 7.0 running on Ruby 3.1
14
+ + [PR#26](https://github.com/yujideveloper/operator_recordable/pull/26)
15
+ * Call `super` in `OperatorRecordable::Recorder#initialize`
16
+ + [PR#30](https://github.com/yujideveloper/operator_recordable/pull/30)
17
+
18
+
3
19
  ## 1.1.0 (2022-01-07)
4
20
 
5
21
  ### Changes
6
22
 
7
23
  * Add gem metadata
24
+ + [PR#24](https://github.com/yujideveloper/operator_recordable/pull/24)
8
25
  * Drop Ruby 2.4 support
26
+ + [PR#25](https://github.com/yujideveloper/operator_recordable/pull/25)
9
27
  * Drop ActiveRecord 5.0 and 5.1 support
28
+ + [PR#25](https://github.com/yujideveloper/operator_recordable/pull/25)
10
29
 
11
30
  ### Misc
12
31
 
13
32
  * Introduce Appraisal
33
+ + [PR#19](https://github.com/yujideveloper/operator_recordable/pull/19)
14
34
  * CI against for ActiveRecord 6.1 and 7.0
35
+ + [PR#19](https://github.com/yujideveloper/operator_recordable/pull/19)
36
+ + [PR#22](https://github.com/yujideveloper/operator_recordable/pull/22)
15
37
  * Use GitHub Actions and stop using Travis CI
38
+ + [PR#20](https://github.com/yujideveloper/operator_recordable/pull/20)
16
39
  * CI against for Ruby 3.0 and 3.1
40
+ + [PR#23](https://github.com/yujideveloper/operator_recordable/pull/23)
41
+ + [PR#25](https://github.com/yujideveloper/operator_recordable/pull/25)
17
42
  * Require MFA to release gem
43
+ + [PR#24](https://github.com/yujideveloper/operator_recordable/pull/24)
18
44
 
19
45
 
20
46
  ## 1.0.0 (2020-10-16)
@@ -22,6 +48,7 @@
22
48
  ### Changes
23
49
 
24
50
  * Support Ruby 2.7
51
+ + [PR#14](https://github.com/yujideveloper/operator_recordable/pull/14)
25
52
 
26
53
 
27
54
  ## 0.4.0 (2019-08-22)
@@ -29,10 +56,12 @@
29
56
  ### Changes
30
57
 
31
58
  * Support ActiveRecord 6.0.0
59
+ + [PR#13](https://github.com/yujideveloper/operator_recordable/pull/13)
32
60
 
33
61
  ### Misc
34
62
 
35
63
  * Improve rspec and CI
64
+ + [PR#11](https://github.com/yujideveloper/operator_recordable/pull/11)
36
65
 
37
66
 
38
67
  ## 0.3.0 (2018-10-05)
@@ -40,6 +69,7 @@
40
69
  ### Breaking changes
41
70
 
42
71
  * Change mixin module from `OperatorRecordable` to `OperatorRecordable::Extension`
72
+ + [PR#5](https://github.com/yujideveloper/operator_recordable/pull/5)
43
73
 
44
74
 
45
75
  ## 0.2.0 (2018-09-27)
@@ -47,11 +77,14 @@
47
77
  ### Changes
48
78
 
49
79
  * Add association name options
80
+ + [PR#2](https://github.com/yujideveloper/operator_recordable/pull/2)
50
81
  * Modify not to define unnecessary class methods for ActiveRecord model
82
+ + [PR#3](https://github.com/yujideveloper/operator_recordable/pull/3)
51
83
 
52
84
  ### Misc
53
85
 
54
86
  * Remove unecessary `require`
87
+ + [PR#4](https://github.com/yujideveloper/operator_recordable/pull/4)
55
88
 
56
89
 
57
90
  ## 0.1.1 (2018-09-19)
@@ -59,6 +92,7 @@
59
92
  ### Misc
60
93
 
61
94
  * Refactor internal structures
95
+ + [PR#1](https://github.com/yujideveloper/operator_recordable/pull/1)
62
96
 
63
97
 
64
98
  ## 0.1.0 (2018-09-14)
data/README.md CHANGED
@@ -19,7 +19,7 @@ gem 'operator_recordable'
19
19
 
20
20
  And then execute:
21
21
 
22
- $ bundle
22
+ $ bundle install
23
23
 
24
24
  Or install it yourself as:
25
25
 
@@ -58,7 +58,7 @@ OperatorRecordable.config = {
58
58
  | `creator_association_name` | String | association name of creator. | `"creator"` |
59
59
  | `updater_association_name` | String | association name of updater. | `"updater"` |
60
60
  | `deleter_association_name` | String | association name of deleter. | `"deleter"` |
61
- | `operator_association_options` | Hash | options of operator associations. e.g. `{ optional: true }` | `{}` |
61
+ | `operator_association_options` | Hash | options of operator associations. e.g. `{ touch: true }` | `{}` |
62
62
  | `operator_association_scope` | Proc | The scope of operator associations. e.g. `-> { with_deleted }` | `nil` |
63
63
  | `store` | Enum | operator store. any value of `:thread_store`, `:request_store` or `:current_attributes_store` | `:thread_store` |
64
64
 
@@ -99,7 +99,7 @@ This is default store.
99
99
  This store is implemented by using [RequestStore gem](https://github.com/steveklabnik/request_store).
100
100
  So, this requires RequestStore gem.
101
101
 
102
- RequestStore must be required before OperatorRecordable.
102
+ RequestStore must be loaded before OperatorRecordable.
103
103
 
104
104
  ``` ruby
105
105
  gem "request_store"
@@ -112,7 +112,7 @@ require "request_store"
112
112
  require "operator_recordable"
113
113
  ```
114
114
 
115
- Otherwise, you need to require it yourself.
115
+ Otherwise, you need to load it yourself.
116
116
  ``` ruby
117
117
  require "operator_recordable/store/request_store"
118
118
  ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "~> 7.0.0"
5
+ gem "activerecord", "~> 7.0.1"
6
6
  gem "sqlite3", "~> 1.4"
7
7
 
8
8
  gemspec path: "../"
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "~> 7.0.0"
5
+ gem "activerecord", "~> 7.0.1"
6
6
  gem "request_store"
7
7
  gem "sqlite3", "~> 1.4"
8
8
 
@@ -5,6 +5,7 @@ require "operator_recordable/configuration"
5
5
  module OperatorRecordable
6
6
  class Recorder < ::Module
7
7
  def initialize(config)
8
+ super()
8
9
  define_activate_method(config)
9
10
  end
10
11
 
@@ -52,7 +53,8 @@ module OperatorRecordable
52
53
  klass.belongs_to config.association_name_for(type).to_sym,
53
54
  config.operator_association_scope,
54
55
  **{ foreign_key: config.column_name_for(type),
55
- class_name: config.operator_class_name }.merge(config.operator_association_options)
56
+ class_name: config.operator_class_name,
57
+ optional: true }.merge(config.operator_association_options)
56
58
  end
57
59
 
58
60
  def define_creator_instance_methods(klass, config)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OperatorRecordable
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.0"
5
5
  end
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
34
34
 
35
35
  # Specify which files should be added to the gem when it is released.
36
36
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
37
- spec.files = Dir.chdir(__dir__) do
37
+ spec.files = Dir.chdir(__dir__) do
38
38
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
39
39
  end
40
40
  spec.bindir = "exe"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: operator_recordable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Hanamura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-06 00:00:00.000000000 Z
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  requirements: []
189
- rubygems_version: 3.2.21
189
+ rubygems_version: 3.1.6
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: OperatorRecordable is a Rails plugin to set created_by, updated_by, and deleted_by