super_settings 2.2.0 → 2.2.1

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: 967d15a431f463f295d1585a1db0f7891e1eca3e16096890d829559b232d3870
4
- data.tar.gz: 241ee0184528a02900ed05f2d21ac734bbfd635411fbe398bf694392d057cb08
3
+ metadata.gz: f2db5de763e2b71a248913369bf05dda818d328fdee379a703054164ecdb9f51
4
+ data.tar.gz: 5ca7f24e706c33d4b79363144eb98e41c8772e046709f6fc2bc7f21ba91ea592
5
5
  SHA512:
6
- metadata.gz: 682426a9592f6aa9bc2694dc38de649f4f31a714866298b59930c0ae81f1381eeafcd7faeb81e22288c71a0ba5edca4eb660c1f2bd04dd87cb872c5e434be0d3
7
- data.tar.gz: ac71245f56b5b4694906a8d8d36528a9b814b2af15ac544a11f8a009636d62aa1c235b22700bfdb1f73283fa9cdaad3bcd335e590ddbac228669794f7267e61c
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.0
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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Durand