card-mod-rules 0.16.0 → 0.17.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/type/setting.rb +4 -0
- data/set/type_plus_right/set/setting.rb +0 -3
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1d5b16be933300849a53f9ee7f3b0ff204541b6b4f9c7b395c50018db122b8a
|
4
|
+
data.tar.gz: 8f21676966452f825a54512ddad0a7ea26ddc7c19ac663717a8b466d0f4e5b99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0441a6f90c3f7862773b1aa403f6c2befb5a7d83f3aac95795a245d1617ed7a8ef1ba975a685315be59e9b79da8bf963cbef96d39c8353296e1f20403faf023
|
7
|
+
data.tar.gz: c4046d4da43c583395d702532e79ee834b4c9444275c3cf58bc6b66b7ab1537e13c481141dfde3a78708a65f05ffe5d3a223d5eec5ba6f4672a03e749273961b
|
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/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.17.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-06-12 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.107.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.107.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.17.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.17.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.17.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.17.0
|
57
57
|
description: ''
|
58
58
|
email:
|
59
59
|
- info@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.10
|
136
136
|
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: rules
|