jekyll-action-network 0.4.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6642127c779f04abf773f92eeee8f0418c38b69201f1c59a2035998a94ade8b
|
4
|
+
data.tar.gz: ff912cb78227719963dd86eb228d658cc9d0fe6cb21413a56ec4cb454952c045
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c41f8a8468faea577d67861277321bef382fa625ab6c11b923e1b2e6574b05e6e772e384be60705634b513d3540b7ea778247a98f11c257186102db323d1735
|
7
|
+
data.tar.gz: 8ad50b0bef30b87e4cd27b5bc34d06228ae877f9c2076103150145baa4f6112bc037dfb6984d073c9d3761561cb9a62feac75c2efc58fd974115e4e6b91e98aa
|
@@ -45,7 +45,21 @@ module Jekyll
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def actions
|
48
|
-
@actions
|
48
|
+
return @actions if @actions
|
49
|
+
|
50
|
+
@actions = @client.send(@name).all
|
51
|
+
@actions.concat(all_ec_events) if @name == "events" && config["include_event_campaigns"]
|
52
|
+
@actions.uniq(&:action_network_id)
|
53
|
+
end
|
54
|
+
|
55
|
+
def all_ec_events
|
56
|
+
event_campaigns = @client.event_campaigns.all
|
57
|
+
events = []
|
58
|
+
event_campaigns.each do |event_campaign|
|
59
|
+
ec_client = @client.event_campaigns(event_campaign.action_network_id)
|
60
|
+
events.concat(ec_client.events.all)
|
61
|
+
end
|
62
|
+
events
|
49
63
|
end
|
50
64
|
|
51
65
|
def filters
|
@@ -25,6 +25,7 @@ module Jekyll
|
|
25
25
|
return unless authenticate
|
26
26
|
|
27
27
|
make_collections
|
28
|
+
# site.config['action_network']['generated'] = true
|
28
29
|
end
|
29
30
|
|
30
31
|
def make_collections
|
@@ -106,11 +107,12 @@ module Jekyll
|
|
106
107
|
@page_size ||= @entry_point["max_page_size"]
|
107
108
|
end
|
108
109
|
|
109
|
-
def get_full_list(name)
|
110
|
+
def get_full_list(name, client = nil)
|
111
|
+
client ||= @client
|
110
112
|
page = 1
|
111
113
|
actions = []
|
112
114
|
loop do
|
113
|
-
action_page =
|
115
|
+
action_page = client.send(name).list(page: page)
|
114
116
|
actions.concat(action_page)
|
115
117
|
break if action_page.size < page_size
|
116
118
|
|
@@ -49,12 +49,13 @@ defaults:
|
|
49
49
|
petition_text: petition_text
|
50
50
|
browser_url: browser_url
|
51
51
|
featured_image_url: image
|
52
|
-
target:
|
52
|
+
target: petition_target
|
53
53
|
"action_network:sponsor": sponsor
|
54
54
|
events:
|
55
55
|
collection: events
|
56
56
|
layout: an-event
|
57
57
|
content: description
|
58
|
+
include_event_campaigns: true
|
58
59
|
mappings:
|
59
60
|
title: title
|
60
61
|
description: description
|
@@ -81,38 +82,38 @@ defaults:
|
|
81
82
|
total_events: total_events
|
82
83
|
total_rsvps: total_rsvps
|
83
84
|
"action_network:sponsor": sponsor
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
85
|
+
advocacy_campaigns:
|
86
|
+
collection: advocacy_campaigns
|
87
|
+
layout: an-advocacy_campaign
|
88
|
+
content: description
|
89
|
+
mappings:
|
90
|
+
title: title
|
91
|
+
description: description
|
92
|
+
type: categories
|
93
|
+
browser_url: browser_url
|
94
|
+
featured_image_url: image
|
95
|
+
"action_network:sponsor": sponsor
|
96
|
+
targets: targets
|
97
|
+
total_outreaches: total_outreaches
|
98
|
+
forms:
|
99
|
+
collection: forms
|
100
|
+
layout: an-form
|
101
|
+
content: description
|
102
|
+
mappings:
|
103
|
+
title: title
|
104
|
+
description: description
|
105
|
+
call_to_action: call_to_action
|
106
|
+
browser_url: browser_url
|
107
|
+
featured_image_url: image
|
108
|
+
"action_network:sponsor": sponsor
|
109
|
+
campaigns:
|
110
|
+
collection: campaigns
|
111
|
+
layout: an-campaign
|
112
|
+
content: description
|
113
|
+
mappings:
|
114
|
+
title: title
|
115
|
+
description: description
|
116
|
+
browser_url: browser_url
|
117
|
+
featured_image_url: image
|
118
|
+
actions: actions
|
119
|
+
"action_network:sponsor": sponsor
|
@@ -18,6 +18,8 @@ module Jekyll
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def make_embed_code(browser_url, style = nil)
|
21
|
+
return unless browser_url
|
22
|
+
|
21
23
|
relative_url = browser_url.split("://")[1].sub("actionnetwork.org/", "")
|
22
24
|
split_url = relative_url.split("/")
|
23
25
|
css = settings["embed"]["styles"][style] if style
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-action-network
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Irving
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: action_network_rest
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.11.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.11.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: dotenv
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|