structify 0.3.0 → 0.3.2
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/Gemfile.lock +2 -2
- data/lib/structify/model.rb +13 -0
- data/lib/structify/version.rb +1 -1
- data/structify.gemspec +1 -1
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16e507a19675f16dfdfdb0b4fe45b26552d208edf4bc69a7a4e488d9f6e179b9
|
4
|
+
data.tar.gz: 71a8122d19560c75032dbcb3108404eebfd6cc1177e8acd7a1d357b1a280baa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f7aa82f582fc526bd2b022cb143bf5cb1abf4bbd6be4f23ee8c8c4a156b048092d4f66b41329b37c56e060ef1869378bc0e79f5751316aaaa728f3401cb5d73
|
7
|
+
data.tar.gz: f748095a76f2532641414961b331ecb66ff73f57faa61550db9b4537d760c54b55adab04f89f28a744b391608b21d4ee45c1dea1e8e34cd7b5b6df6c89a74dab
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [0.3.2] - 2025-03-17
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
- Added `saved_change_to_extracted_data?` method that works with the configured `default_container_attribute`
|
10
|
+
|
5
11
|
## [0.3.0] - 2025-03-17
|
6
12
|
|
7
13
|
### Added
|
data/Gemfile.lock
CHANGED
data/lib/structify/model.rb
CHANGED
@@ -49,6 +49,19 @@ module Structify
|
|
49
49
|
record_data["version"] || 1
|
50
50
|
end
|
51
51
|
|
52
|
+
# Check if the extracted data has been changed since the record was last saved
|
53
|
+
# Respects the default_container_attribute configuration
|
54
|
+
#
|
55
|
+
# This provides a consistent method to check for changes regardless of the
|
56
|
+
# container attribute name that was configured.
|
57
|
+
#
|
58
|
+
# @return [Boolean] Whether the extracted data has changed
|
59
|
+
def saved_change_to_extracted_data?
|
60
|
+
container_attribute = self.class.attr_json_config.default_container_attribute
|
61
|
+
respond_to?("saved_change_to_#{container_attribute}?") &&
|
62
|
+
self.send("saved_change_to_#{container_attribute}?")
|
63
|
+
end
|
64
|
+
|
52
65
|
# Check if a version is within a given range/array of versions
|
53
66
|
# This is used in field accessors to check version compatibility
|
54
67
|
#
|
data/lib/structify/version.rb
CHANGED
data/structify.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: structify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kieran Klaassen
|
@@ -14,16 +14,22 @@ dependencies:
|
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '7.0'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
22
|
+
version: '9.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '7.0'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
32
|
+
version: '9.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: attr_json
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|