jekyll-attendease 0.9.9.5 → 0.9.9.6

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
  SHA1:
3
- metadata.gz: bfc26b099fa6ead6128c921b8ecd370a1839267a
4
- data.tar.gz: 3ec02054754f6d38c6076468341e197e921421ed
3
+ metadata.gz: 46e8707284c8b17f30a38284e1598992f7395a3f
4
+ data.tar.gz: 91c357817a6f786c3400a5c3acbe4b4565b3d5da
5
5
  SHA512:
6
- metadata.gz: 88d949098ba19b41c071b37b9625fcbccdb95c3ab938b8d5f25531562beeab16b6092841c1b15c67a2dbe256ae7cb44417e51139dc1c283b49eee3f5314d196a
7
- data.tar.gz: f9e63c649a8305c4933d9ad0a8224f61bfdd2f722aedc6cab4063d761ad781cecf251322925e53154690351da0b9eb663c0e63286172fdb5faa0efe8107dcfcd
6
+ metadata.gz: 3701c04f666d235d305549e7192d8369d12610b0ce8a31266930492bf341a4f347c7e87d89e391e4ed0097f578e25948a7c411ca911d0153bb62c913d4b15c03
7
+ data.tar.gz: b592f4e1f79bc3f90296e6846ef07fac577ac47ecf02a74c2be4060e4322b20c6389fbb25b50d4a142a8266f559149ecc8c6f7a5597cbf17e75311c78a5507c0
@@ -18,7 +18,7 @@ module Jekyll
18
18
 
19
19
  FileUtils.mkdir_p(@attendease_data_path) unless File.exists?(@attendease_data_path)
20
20
 
21
- data_files = %w{ pages site_settings }.map { |m| "#{m}.json"}
21
+ data_files = %w{ pages site_settings mappable }.map { |m| "#{m}.json"}
22
22
 
23
23
  data_files.each do |filename|
24
24
  update_data = true
@@ -47,6 +47,7 @@ module Jekyll
47
47
  options = {}
48
48
  options.merge!(:headers => {'X-User-Token' => site.config.attendease['access_token']})
49
49
 
50
+ url = "#{site.config.attendease['api_host']}api/#{filename}"
50
51
  response = get("#{site.config.attendease['api_host']}api/#{filename}", options)
51
52
 
52
53
  if (!response.nil? && response.response.is_a?(Net::HTTPOK))
@@ -74,6 +75,4 @@ module Jekyll
74
75
  end
75
76
  end
76
77
  end
77
- end
78
-
79
-
78
+ end
@@ -42,23 +42,22 @@ module Jekyll
42
42
  if page['block_instances'].length
43
43
  # create zone buckets
44
44
  page['block_instances'].each do |i|
45
- # go through all content
46
- if site.config.event?
47
- keys.each do |key|
48
- i[key].each do |k, v|
49
- if placeholder?(v)
50
- # maintain the {{ t.foo }} variables
51
- v.gsub!(/(\{\{\s*t\.[a-z_.]+\s*\}\})/, '{% raw %}\1{% endraw %}')
52
- i[key][k] = render_with_substitutions(v, 'event' => site.data['event'], 'mappable' => site.data['mappable'])
53
- end
45
+ # go through all content and perform substitutions
46
+ keys.each do |key|
47
+ i[key].each do |k, v|
48
+ if placeholder?(v)
49
+ # maintain the {{ t.foo }} variables
50
+ v.gsub!(/(\{\{\s*t\.[a-z_.]+\s*\}\})/, '{% raw %}\1{% endraw %}')
51
+ i[key][k] = render_with_substitutions(v, 'event' => site.data['event'], 'mappable' => site.data['mappable'])
54
52
  end
55
53
  end
54
+ end
56
55
 
57
- unless site.data['mappable'].nil? || site.data['mappable'].empty?
58
- perform_substitution!(i, 'mappable' => site.data['mappable'])
59
- end
56
+ unless site.data['mappable'].nil? || site.data['mappable'].empty?
57
+ perform_substitution!(i, 'mappable' => site.data['mappable'])
60
58
  end
61
59
 
60
+
62
61
  zones[i['zone']] = [] if zones[i['zone']].nil?
63
62
  zones[i['zone']] << i
64
63
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module AttendeasePlugin
3
- VERSION = '0.9.9.5'
3
+ VERSION = '0.9.9.6'
4
4
  end
5
5
  end
@@ -44,6 +44,11 @@ RSpec.describe Jekyll::AttendeasePlugin::EventDataGenerator do
44
44
  expect(site.data['pages'].length).to eq(7)
45
45
  end
46
46
 
47
+ it 'populates a site wide mappable array' do
48
+ expect(site.data['mappable'].class).to eq(Array)
49
+ expect(site.data['mappable'].length).to eq(1)
50
+ end
51
+
47
52
  it 'populates a site wide event object' do
48
53
  expect(site.data['event'].class).to eq(Hash)
49
54
  end
@@ -14,6 +14,11 @@ RSpec.describe Jekyll::AttendeasePlugin::OrganizationDataGenerator do
14
14
  expect(site.data['site_settings']['look_and_feel']['body_font_family']).to eq('serif')
15
15
  end
16
16
 
17
+ it 'populates a site wide mappable array' do
18
+ expect(site.data['mappable'].class).to eq(Array)
19
+ expect(site.data['mappable'].length).to eq(1)
20
+ end
21
+
17
22
  it 'responds to GET from HTTParty' do
18
23
  expect(subject).to respond_to(:get)
19
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-attendease
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9.5
4
+ version: 0.9.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Wood
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2023-02-28 00:00:00.000000000 Z
15
+ date: 2023-10-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: httparty