card-mod-follow 0.18.1 → 0.19.0
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/card/follower_stash.rb +1 -1
- data/set/all/follow/follow_link.rb +2 -0
- data/set/all/follow/followed_by.rb +1 -1
- data/set/all/follow/start_follow_link.rb +1 -0
- data/set/all/follow/stop_follow_link.rb +1 -0
- data/set/all/notify/base_views.rb +5 -9
- data/set/right/account.rb +6 -0
- data/set/right/follow.rb +3 -3
- data/set/type_plus_right/user/follow/follow_editor_helper.rb +2 -2
- data/set/type_plus_right/user/follow.rb +1 -1
- metadata +9 -12
- /data/data/files/{mod_follow_script_asset_output → mod_follow/script/asset_output}/file.js +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c907940506e593ebd411755b26203d96a7ba9c40e56970cafa7abdd55abe6cdf
|
4
|
+
data.tar.gz: 54cdb4b39907d2076507bf31d420eae1c3a8af449c515213fe26ae267cca328e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbd1e847b0b5ed2f7b23b083a5cc9175f3d41d72d6a0ac7e22b03c6256448f61c4a033fe08a2f2ef1d8152accbd4f6fc2226489a585b6f645b839481f8dc62dd
|
7
|
+
data.tar.gz: a35da2f16c934a4ed2cedf7a31c3a1d5ce96eb6b66bf18a419629487e1fb6bd2f3227c0ccfa43783debe8215d2675e4c54d5c4d3c57a809309746c907ae5e4e8
|
data/lib/card/follower_stash.rb
CHANGED
@@ -16,7 +16,7 @@ end
|
|
16
16
|
# returns true if according to the follow_field_rule followers of self also
|
17
17
|
# follow changes of field_card
|
18
18
|
def followed_field? field_card
|
19
|
-
return unless (follow_field_rule = rule_card(:follow_fields))
|
19
|
+
return false unless (follow_field_rule = rule_card(:follow_fields))
|
20
20
|
|
21
21
|
follow_field_rule.item_names(context: self).find do |item|
|
22
22
|
case item.to_name.key
|
@@ -1,7 +1,11 @@
|
|
1
|
+
RELEVANT_FIELDS_BY_ACTION = { create: %i[cardtype content],
|
2
|
+
update: %i[name cardtype content],
|
3
|
+
delete: %i[content] }.freeze
|
4
|
+
|
1
5
|
format do
|
2
6
|
view :list_of_changes, denial: :blank, cache: :never do
|
3
7
|
action = notification_action voo.action_id
|
4
|
-
|
8
|
+
RELEVANT_FIELDS_BY_ACTION[action.action_type].map do |type|
|
5
9
|
edit_info_for(type, action)
|
6
10
|
end.compact.join
|
7
11
|
end
|
@@ -50,14 +54,6 @@ format do
|
|
50
54
|
card: { subcards: { rule_name => :never.cardname } })
|
51
55
|
end
|
52
56
|
|
53
|
-
def relevant_fields action
|
54
|
-
case action.action_type
|
55
|
-
when :create then %i[cardtype content]
|
56
|
-
when :update then %i[name cardtype content]
|
57
|
-
when :delete then %i[content]
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
57
|
def name_before_action action
|
62
58
|
(action.value(:name) && action.previous_value(:name)) || card.name
|
63
59
|
end
|
data/set/right/account.rb
CHANGED
@@ -6,6 +6,12 @@ def send_change_notice act, followed_set, follow_option
|
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
|
+
def changes_visible? act
|
10
|
+
act.actions_affecting(act.card).any? { |action| action.card.ok? :read }
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
9
15
|
def notify_of_act act
|
10
16
|
Auth.as(left.id) do
|
11
17
|
Card[:follower_notification_email].deliver(
|
data/set/right/follow.rb
CHANGED
@@ -44,13 +44,13 @@ def permit action, verb=nil
|
|
44
44
|
if action.in?(%i[create delete update]) && allowed_to_change_follow_status?
|
45
45
|
true
|
46
46
|
else
|
47
|
-
super
|
47
|
+
super
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
51
|
def allowed_to_change_follow_status?
|
52
|
-
Auth.signed_in? &&
|
53
|
-
((user = rule_user) && Auth.current_id == user.id) || Auth.always_ok?
|
52
|
+
(Auth.signed_in? &&
|
53
|
+
((user = rule_user) && Auth.current_id == user.id)) || Auth.always_ok?
|
54
54
|
end
|
55
55
|
|
56
56
|
format :html do
|
@@ -8,7 +8,7 @@ format :html do
|
|
8
8
|
rule_opt_array = following_rule_options_hash.map do |key, val|
|
9
9
|
[(Card.fetch key, new: {}), val]
|
10
10
|
end
|
11
|
-
rules_and_options_by_set_pattern
|
11
|
+
rules_and_options_by_set_pattern rule_opt_array.to_h, &block
|
12
12
|
end
|
13
13
|
|
14
14
|
# constructs hash of rules/options for "Ignore" tab
|
@@ -25,7 +25,7 @@ format :html do
|
|
25
25
|
def ignore_rules
|
26
26
|
never = :never.cardname.key
|
27
27
|
card.item_cards.select do |follow_rule|
|
28
|
-
follow_rule.item_names.
|
28
|
+
follow_rule.item_names.any? { |n| n.key == never }
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
metadata
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-follow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
8
8
|
- Philipp Kühl
|
9
9
|
- Gerry Gleason
|
10
|
-
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: card
|
@@ -18,28 +17,28 @@ dependencies:
|
|
18
17
|
requirements:
|
19
18
|
- - '='
|
20
19
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
20
|
+
version: 1.109.0
|
22
21
|
type: :runtime
|
23
22
|
prerelease: false
|
24
23
|
version_requirements: !ruby/object:Gem::Requirement
|
25
24
|
requirements:
|
26
25
|
- - '='
|
27
26
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.
|
27
|
+
version: 1.109.0
|
29
28
|
- !ruby/object:Gem::Dependency
|
30
29
|
name: card-mod-carrierwave
|
31
30
|
requirement: !ruby/object:Gem::Requirement
|
32
31
|
requirements:
|
33
32
|
- - '='
|
34
33
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.
|
34
|
+
version: 0.19.0
|
36
35
|
type: :runtime
|
37
36
|
prerelease: false
|
38
37
|
version_requirements: !ruby/object:Gem::Requirement
|
39
38
|
requirements:
|
40
39
|
- - '='
|
41
40
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.
|
41
|
+
version: 0.19.0
|
43
42
|
description: ''
|
44
43
|
email:
|
45
44
|
- info@decko.org
|
@@ -52,7 +51,7 @@ files:
|
|
52
51
|
- assets/script/follow.js.coffee
|
53
52
|
- assets/style/follow.scss
|
54
53
|
- config/admin.yml
|
55
|
-
- data/files/
|
54
|
+
- data/files/mod_follow/script/asset_output/file.js
|
56
55
|
- data/real.yml
|
57
56
|
- data/test.yml
|
58
57
|
- data/test/rules.yml
|
@@ -105,7 +104,6 @@ metadata:
|
|
105
104
|
documentation_url: http://docs.decko.org/
|
106
105
|
card-mod: follow
|
107
106
|
card-mod-group: gem-defaults
|
108
|
-
post_install_message:
|
109
107
|
rdoc_options: []
|
110
108
|
require_paths:
|
111
109
|
- lib
|
@@ -113,15 +111,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
113
111
|
requirements:
|
114
112
|
- - ">="
|
115
113
|
- !ruby/object:Gem::Version
|
116
|
-
version: '3.
|
114
|
+
version: '3.2'
|
117
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
116
|
requirements:
|
119
117
|
- - ">="
|
120
118
|
- !ruby/object:Gem::Version
|
121
119
|
version: '0'
|
122
120
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
124
|
-
signing_key:
|
121
|
+
rubygems_version: 3.6.8
|
125
122
|
specification_version: 4
|
126
123
|
summary: follower notifications
|
127
124
|
test_files: []
|
File without changes
|