super_settings 2.2.0 → 2.2.1
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 +6 -0
- data/VERSION +1 -1
- data/lib/super_settings/setting.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2db5de763e2b71a248913369bf05dda818d328fdee379a703054164ecdb9f51
|
4
|
+
data.tar.gz: 5ca7f24e706c33d4b79363144eb98e41c8772e046709f6fc2bc7f21ba91ea592
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3c45f9701cf13c981de225ea0fbe157709aab31cea37e967b33deeb0a9e382d2d0fe8e1a4afae889d572743f4bd40ad21e206ec6db34f74cff493c1a2560130
|
7
|
+
data.tar.gz: 5923794e1704cabf9885e6e7ff90420302158c77911efa9b47441a0d14c0e1326c0f0ca6699dc523898a08f0eb9375ceada0bf6414367eb5fa0995166ea2b1d5
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## 2.2.1
|
8
|
+
|
9
|
+
### Added
|
10
|
+
|
11
|
+
- Added `SuperSettings::Setting#value_changed?` helper method to return true if the value of the setting has changed.
|
12
|
+
|
7
13
|
## 2.2.0
|
8
14
|
|
9
15
|
### Changed
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.1
|
@@ -575,6 +575,14 @@ module SuperSettings
|
|
575
575
|
@changes.dup
|
576
576
|
end
|
577
577
|
|
578
|
+
# Return true if the value of the setting has changed. In addition to changing the value,
|
579
|
+
# this will be triggered if the key changed or if the setting was marked as deleted.
|
580
|
+
#
|
581
|
+
# @return [Boolean]
|
582
|
+
def value_changed?
|
583
|
+
(@changes.keys & %w[key raw_value deleted]).any?
|
584
|
+
end
|
585
|
+
|
578
586
|
private
|
579
587
|
|
580
588
|
# Coerce a value for the appropriate value type.
|