card-mod-rules 0.16.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/set/rule/bar_view.rb +1 -2
- data/set/rule/editor.rb +11 -13
- data/set/rule/quick_editor/set_info.haml +1 -1
- data/set/rule/rules.rb +1 -1
- data/set/type/setting.rb +4 -0
- data/set/type_plus_right/set/setting.rb +0 -3
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0dd8113a3ffd88b1ec7875889a5ff673a5a60dca9b37b983f2bffcdb6cbcdc28
|
4
|
+
data.tar.gz: 36b8212e3426a1757bb75b6650ee38aeb1d16222b0e48afa00b57270e16d948b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfbdba5d4fbad2554ebe204eb4e6e0cf38408f7da5a677d4c3e338375103add571c6b235c65bb968e0990b87e6df9f6c402990f6a0cd02ecfe73c5b7d88604ed
|
7
|
+
data.tar.gz: 074b00d49ce28046185d32066a8263797eb4153fd2230c2a0506a03ef57d18b4d24511d868e549ff0c5ea091b2541c8680398c326f20031c11563f6585ae5f7c
|
data/set/rule/bar_view.rb
CHANGED
@@ -3,7 +3,7 @@ format :html do
|
|
3
3
|
bar_cols 5, 4, 3
|
4
4
|
|
5
5
|
def existing_rule_card
|
6
|
-
@existing_rule_card ||= find_existing_rule_card
|
6
|
+
@existing_rule_card ||= card.find_existing_rule_card
|
7
7
|
end
|
8
8
|
|
9
9
|
view :bar, unknown: true do
|
@@ -46,7 +46,6 @@ format :html do
|
|
46
46
|
|
47
47
|
def rule_short_content
|
48
48
|
return "" unless existing_rule_card
|
49
|
-
|
50
49
|
nest existing_rule_card,
|
51
50
|
{ view: :one_line_content },
|
52
51
|
{ set_context: card.name.trunk_name }
|
data/set/rule/editor.rb
CHANGED
@@ -71,7 +71,7 @@ format :html do
|
|
71
71
|
def current_rule
|
72
72
|
if params[:assign]
|
73
73
|
card
|
74
|
-
elsif (existing = find_existing_rule_card)
|
74
|
+
elsif (existing = card.find_existing_rule_card)
|
75
75
|
existing
|
76
76
|
else
|
77
77
|
card
|
@@ -114,19 +114,17 @@ format :html do
|
|
114
114
|
def current_set_key
|
115
115
|
card.new_card? ? Card.quick_fetch(:all).name.key : card.rule_set_key
|
116
116
|
end
|
117
|
+
end
|
117
118
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
card.new_card? ? existing_rule_from_prototype : card
|
122
|
-
end
|
119
|
+
def find_existing_rule_card
|
120
|
+
new_card? ? existing_rule_from_prototype : self
|
121
|
+
end
|
123
122
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
123
|
+
# self.card is a POTENTIAL rule; it quacks like a rule but may or may not exist.
|
124
|
+
# This generates a prototypical member of the POTENTIAL rule's set
|
125
|
+
# and returns that member's ACTUAL rule for the POTENTIAL rule's setting
|
126
|
+
def existing_rule_from_prototype
|
127
|
+
return unless (setting = right)
|
129
128
|
|
130
|
-
|
131
|
-
end
|
129
|
+
set_prototype.rule_card setting.codename, user: rule_user
|
132
130
|
end
|
data/set/rule/rules.rb
CHANGED
data/set/type/setting.rb
CHANGED
@@ -20,6 +20,10 @@ def set_classes_with_rules
|
|
20
20
|
end.compact
|
21
21
|
end
|
22
22
|
|
23
|
+
def scoping_rule_card
|
24
|
+
Card.fetch([self, :right, :update], new: {})
|
25
|
+
end
|
26
|
+
|
23
27
|
def rules_for_set_class set_class
|
24
28
|
cql = { left: { type: SetID }, right: id, sort_by: %w[content name], limit: 0 }
|
25
29
|
cql[:left][(set_class.anchorless? ? :id : :right_id)] = set_class.pattern_id
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-rules
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-10-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,42 +18,42 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.108.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.
|
28
|
+
version: 1.108.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: card-mod-format
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.
|
35
|
+
version: 0.18.0
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.
|
42
|
+
version: 0.18.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: card-mod-search
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.18.0
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.18.0
|
57
57
|
description: ''
|
58
58
|
email:
|
59
59
|
- info@decko.org
|
@@ -108,7 +108,7 @@ files:
|
|
108
108
|
- set/type_plus_right/set/structure.rb
|
109
109
|
homepage: https://decko.org
|
110
110
|
licenses:
|
111
|
-
- GPL-3.0
|
111
|
+
- GPL-3.0-or-later
|
112
112
|
metadata:
|
113
113
|
source_code_uri: https://github.com/decko-commons/decko
|
114
114
|
homepage_uri: https://decko.org
|
@@ -125,14 +125,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
125
125
|
requirements:
|
126
126
|
- - ">="
|
127
127
|
- !ruby/object:Gem::Version
|
128
|
-
version: '
|
128
|
+
version: '3.0'
|
129
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
131
|
- - ">="
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: '0'
|
134
134
|
requirements: []
|
135
|
-
rubygems_version: 3.
|
135
|
+
rubygems_version: 3.5.7
|
136
136
|
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: rules
|