userstamper 4.0.0 → 4.1.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/CHANGELOG.md +3 -0
- data/Gemfile.lock +2 -2
- data/README.md +3 -1
- data/lib/userstamper/stampable.rb +2 -2
- data/userstamper.gemspec +3 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53cdf4e167d19a8a7e0ed93abfc88131a97e9310c6e25653a9c6b82073f0dd80
|
4
|
+
data.tar.gz: 871ef897ab542c1bfd43de2b9c5f24ad8797946d708e8071733df7de063e9dc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cfc6e8c46b8d44ec49c99d005720e289e52c0a04dfd357c028cf091aec1835f82dc2e865ab9d6cf998f77875ebbb7cfaf9849ba5e45d16e5d2bb308cbbf42bd
|
7
|
+
data.tar.gz: 100b5bef5667ccbe4a91d3ccae8677e2719bf74870cd8f0a16f9fc64a7a4e1b91d29b7fbb00b22511b0aab6d70b64d7d98fae2892f0e5eda8ce9f6365b8fc073
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -9,7 +9,8 @@ method is used in models that are responsible for creating or updating other obj
|
|
9
9
|
Typically this would be the `User` model of your application. The `stampable` method is used in
|
10
10
|
models that are subject to being created or updated by stampers.
|
11
11
|
|
12
|
-
Gem
|
12
|
+
Gem was latest tested with Ruby 3.1.3 and Rails 7.0.3
|
13
|
+
In history the gem has been tested with Ruby 2.7.2, 2.7.3 and Rails 6.1.3.1.
|
13
14
|
|
14
15
|
## Features
|
15
16
|
to result in a `belongs_to` relation which looks like:
|
@@ -140,3 +141,4 @@ In addition to these, some ideas are cherry picked from the following forks:
|
|
140
141
|
- [Thomas von Deyen](https://github.com/tvdeyen)
|
141
142
|
- [Joel Low](http://joelsplace.sg)
|
142
143
|
- [Priit Tark](https://github.com/priit)
|
144
|
+
- [Carsten Reinke](https://github.com/reinkcar)
|
@@ -73,8 +73,8 @@ module Userstamper::Stampable
|
|
73
73
|
klass = stamper_class.try(:name)
|
74
74
|
relation_options = options.reverse_merge(class_name: klass)
|
75
75
|
|
76
|
-
belongs_to :creator, relation_options.reverse_merge(foreign_key: config.creator_attribute, required: false) if associations.first
|
77
|
-
belongs_to :updater, relation_options.reverse_merge(foreign_key: config.updater_attribute, required: false) if associations.second
|
76
|
+
belongs_to :creator, **relation_options.reverse_merge(foreign_key: config.creator_attribute, required: false) if associations.first
|
77
|
+
belongs_to :updater, **relation_options.reverse_merge(foreign_key: config.updater_attribute, required: false) if associations.second
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
data/userstamper.gemspec
CHANGED
@@ -4,13 +4,13 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'userstamper'
|
7
|
-
s.version = '4.
|
7
|
+
s.version = '4.1.0'
|
8
8
|
s.authors = ['Joel Low', 'Priit Tark']
|
9
|
-
s.email = ['joel@joelsplace.sg', 'priit@
|
9
|
+
s.email = ['joel@joelsplace.sg', 'priit@domify.io']
|
10
10
|
|
11
11
|
s.summary = 'Adds magic creator and updater attributes to your ActiveRecord models.'
|
12
12
|
s.description = 'This gem extends ActiveRecord::Base to add automatic updating of created_by and updated_by attributes of your models in much the same way that the ActiveRecord::Timestamp module updates created_(at/on) and updated_(at/on) attributes.'
|
13
|
-
s.homepage = 'https://github.com/
|
13
|
+
s.homepage = 'https://github.com/domify/userstamper'
|
14
14
|
s.license = 'MIT'
|
15
15
|
|
16
16
|
s.files = `git ls-files`.split("\n")
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: userstamper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Low
|
8
8
|
- Priit Tark
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-01-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -170,7 +170,7 @@ description: This gem extends ActiveRecord::Base to add automatic updating of cr
|
|
170
170
|
module updates created_(at/on) and updated_(at/on) attributes.
|
171
171
|
email:
|
172
172
|
- joel@joelsplace.sg
|
173
|
-
- priit@
|
173
|
+
- priit@domify.io
|
174
174
|
executables: []
|
175
175
|
extensions: []
|
176
176
|
extra_rdoc_files: []
|
@@ -253,11 +253,11 @@ files:
|
|
253
253
|
- spec/support/database_helpers.rb
|
254
254
|
- spec/support/with_temporary_table.rb
|
255
255
|
- userstamper.gemspec
|
256
|
-
homepage: https://github.com/
|
256
|
+
homepage: https://github.com/domify/userstamper
|
257
257
|
licenses:
|
258
258
|
- MIT
|
259
259
|
metadata: {}
|
260
|
-
post_install_message:
|
260
|
+
post_install_message:
|
261
261
|
rdoc_options: []
|
262
262
|
require_paths:
|
263
263
|
- lib
|
@@ -272,8 +272,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
272
272
|
- !ruby/object:Gem::Version
|
273
273
|
version: '0'
|
274
274
|
requirements: []
|
275
|
-
rubygems_version: 3.
|
276
|
-
signing_key:
|
275
|
+
rubygems_version: 3.3.26
|
276
|
+
signing_key:
|
277
277
|
specification_version: 4
|
278
278
|
summary: Adds magic creator and updater attributes to your ActiveRecord models.
|
279
279
|
test_files: []
|