no_fly_list 0.7.2 → 0.7.3
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/lib/no_fly_list/taggable_record.rb +6 -1
- data/lib/no_fly_list/tagging_proxy.rb +6 -5
- data/lib/no_fly_list/version.rb +1 -1
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5faaa3eaa7a8bc8f8186f8ee0dd10971f0c187963a4b9ef93cf2ef00963bedc0
|
4
|
+
data.tar.gz: 575274c475a0a13b4b94194f904aeec4e4d6d7795cd36db6b12ad6eff28a64f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a98397336ebfc91db71338a108df13b48af0fdc1287c2c3e9ce98569394fc05cfe8b4450d1ef2272c15b7a077966b21671c6817c4aa2ae55972f4683545f5032
|
7
|
+
data.tar.gz: 1cb1ec3ffcfb380fd616dabf5e5551e5ec5c5f52f24ab966aa68542c6f60f4770b293bdba8ee5841583e93b7a9d8a20a7ef25a02627473382ad2c84baaa9f88c
|
@@ -59,7 +59,12 @@ module NoFlyList
|
|
59
59
|
|
60
60
|
proxy = instance_variable_get(var)
|
61
61
|
next if proxy.nil?
|
62
|
-
|
62
|
+
unless proxy.save
|
63
|
+
proxy.errors.each do |error|
|
64
|
+
errors.add(:base, error.message)
|
65
|
+
end
|
66
|
+
throw :abort
|
67
|
+
end
|
63
68
|
end
|
64
69
|
true
|
65
70
|
ensure
|
@@ -332,11 +332,12 @@ module NoFlyList
|
|
332
332
|
|
333
333
|
def current_list_from_database
|
334
334
|
if setup[:polymorphic]
|
335
|
-
|
335
|
+
tagging_klass = setup[:tagging_class_name].constantize
|
336
|
+
tagging_table = tagging_klass.arel_table
|
337
|
+
|
336
338
|
@model.send(@context.to_s)
|
337
|
-
.
|
338
|
-
.where(
|
339
|
-
@model.class.name, @model.id)
|
339
|
+
.where(tagging_table[:taggable_type].eq(@model.class.name))
|
340
|
+
.where(tagging_table[:taggable_id].eq(@model.id))
|
340
341
|
.pluck(:name)
|
341
342
|
else
|
342
343
|
@model.send(@context.to_s).pluck(:name)
|
@@ -345,7 +346,7 @@ module NoFlyList
|
|
345
346
|
|
346
347
|
def set_list(_context, value)
|
347
348
|
@clear_operation = false
|
348
|
-
@pending_changes = transformer.parse_tags(value)
|
349
|
+
@pending_changes = transformer.parse_tags(value).uniq.reject(&:blank?)
|
349
350
|
mark_record_dirty
|
350
351
|
valid? # Just check validity without raising
|
351
352
|
self
|
data/lib/no_fly_list/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: no_fly_list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abdelkader Boudih
|
@@ -23,7 +23,8 @@ dependencies:
|
|
23
23
|
- - ">="
|
24
24
|
- !ruby/object:Gem::Version
|
25
25
|
version: '7.2'
|
26
|
-
description:
|
26
|
+
description: A flexible, high-performance tagging system for Rails applications with
|
27
|
+
support for polymorphic tags, custom transformers, and database-specific optimizations
|
27
28
|
email:
|
28
29
|
- terminale@gmail.com
|
29
30
|
executables: []
|
@@ -66,7 +67,12 @@ homepage: https://github.com/contriboss/no_fly_list
|
|
66
67
|
licenses:
|
67
68
|
- MIT
|
68
69
|
metadata:
|
70
|
+
homepage_uri: https://github.com/contriboss/no_fly_list
|
71
|
+
source_code_uri: https://github.com/contriboss/no_fly_list
|
72
|
+
changelog_uri: https://github.com/contriboss/no_fly_list/blob/master/CHANGELOG.md
|
73
|
+
bug_tracker_uri: https://github.com/contriboss/no_fly_list/issues
|
69
74
|
rubygems_mfa_required: 'true'
|
75
|
+
github_repo: ssh://github.com/contriboss/no_fly_list
|
70
76
|
rdoc_options: []
|
71
77
|
require_paths:
|
72
78
|
- lib
|
@@ -83,5 +89,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
89
|
requirements: []
|
84
90
|
rubygems_version: 3.6.9
|
85
91
|
specification_version: 4
|
86
|
-
summary:
|
92
|
+
summary: Modern tagging system for Rails 7.2+ applications
|
87
93
|
test_files: []
|