jekyll-attendease 0.6.12 → 0.6.13.pre

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b01d2d9787bdbee33addde92ac2524b15fc1960b
4
- data.tar.gz: 853ad735cad88411abeafec85e8d06b5d8949836
3
+ metadata.gz: 41e285d44f84c4fed8801830f0621f175006e6bb
4
+ data.tar.gz: d84f9a7d8e2d30891a581f54ecf8161f82f47058
5
5
  SHA512:
6
- metadata.gz: 901b851c3da5228e84e08ee7e144fef5293a67f6a7c72ca86f13cdc732d52d670b0a716a1a65962b9994648d199aabe7f5425a7c8460c66abd8a3370b921a80a
7
- data.tar.gz: a6fc033d84e0f5d795c7c4a024aae763867e6b33c0767a2411c783f59851feb6eea40aa47745b99bdd2c36231244b1c6cec4543f38fe87a3e65533550e76fdc7
6
+ metadata.gz: 93f0417495f1fb122d1976a98b54c04ddaf2f7dd9549aaf40f048faeaef96ced80ce07bef01bef786272fa59b40ddc69a7528557bd3a31f03def240d5fff34ea
7
+ data.tar.gz: 53db4493ed18c0d844e8c73136676338020fd8829e0e0b59af0dbd13afdf35e248ca6337a98ef8544a70196c9115f02dffc84062aefbbb2e15b813751c642769
@@ -11,6 +11,6 @@ Liquid::Template.register_tag('attendease_scheduler_script', Jekyll::AttendeaseP
11
11
  Liquid::Template.register_tag('attendease_locales_script', Jekyll::AttendeasePlugin::LocalesScriptTag)
12
12
  Liquid::Template.register_tag('attendease_auth_account', Jekyll::AttendeasePlugin::AuthAccountTag)
13
13
  Liquid::Template.register_tag('attendease_auth_action', Jekyll::AttendeasePlugin::AuthActionTag)
14
- Liquid::Template.register_tag('t', Jekyll::AttendeasePlugin::TranslateTag)
14
+ Liquid::Template.register_tag('attendease_t', Jekyll::AttendeasePlugin::TranslateTag)
15
15
 
16
16
  Liquid::Template.register_filter(Jekyll::AttendeasePlugin::Filters)
@@ -1,6 +1,6 @@
1
1
  module Jekyll
2
2
  module AttendeasePlugin
3
- VERSION = "0.6.12"
3
+ VERSION = "0.6.13.pre"
4
4
  end
5
5
  end
6
6
 
@@ -1,15 +1,20 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  RSpec.describe "Jekyll Attendease filters" do
4
- let(:context) { { :registers => { :site => @site, :page => {} } } }
4
+ let(:page_data) { @page.data['foo'] }
5
5
 
6
6
  def render(content)
7
- ::Liquid::Template.parse(content).render({}, context)
7
+ ::Liquid::Template.parse(content).render({'page' => @page.data})
8
8
  end
9
9
 
10
10
  context "{{ 'foo Bar bat' | slugify %}" do
11
11
  subject { render("{{ 'foo Bar bat' | slugify }}") }
12
12
  it { is_expected.to eq "foo_bar_bat" }
13
13
  end
14
+
15
+ context "{{ page.foo | json %}" do
16
+ subject { render("{{ page.foo | json }}") }
17
+ it { is_expected.to eq(page_data.to_json) }
18
+ end
14
19
  end
15
20
 
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  require 'spec_helper'
2
3
 
3
4
  RSpec.describe Jekyll::AttendeasePlugin::Helpers do
@@ -1,53 +1,53 @@
1
- require 'spec_helper'
2
-
3
- RSpec.describe Jekyll::AttendeasePlugin::HomePageGenerator do
4
-
5
- #context 'Using the default homepage template in the gem' do
6
- # before do
7
- # # Ensure no custom templates are being used.
8
- # templates_json = File.join(@site.config['source'], '_attendease', 'data', 'templates.json')
9
- # File.open(templates_json, 'w') { |file| file.write([].to_json) }
10
- # #File.delete(@site.config['source'], '_attendease', 'templates', 'index.html')
11
- # @site = build_site
12
- # end
13
- #
14
- # it 'creates the home page' do
15
- # template_files = Dir.chdir(@template_root) { Dir.glob('*/**.html') }
16
- #
17
- # expect(File.exists?(File.join(@site.config['destination'], 'index.html'))).to eq(true)
18
- # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<h2>WHO</h2>"
19
- # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<div class=\"info\">#{@site.config['attendease']['data']['event_host']}</div>"
20
- # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<h2>WHEN</h2>"
21
- # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<div class=\"info\">#{@site.config['attendease']['data']['event_dates']}</div>"
22
- # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<h2>WHERE</h2>"
23
- # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<div class=\"info\">#{@site.config['attendease']['data']['event_location']}</div>"
24
- # end
25
- #end
26
-
27
- context 'Using a custom homepage template from the Attendease API' do
28
- before do
29
- templates_json = File.join(@site.config['source'], '_attendease', 'data', 'templates.json')
30
-
31
- templates = [
32
- {
33
- :data => "<h1>This is a custom homepage for Attendease</h1>",
34
- :id => "544e905b0bdb82e3ac000002",
35
- :page => 'index',
36
- :section => 'website'
37
- }
38
- ]
39
-
40
- File.open(templates_json, 'w') { |file| file.write(templates.to_json) }
41
-
42
- @site = build_site
43
- end
44
-
45
- it 'creates the home page' do
46
- template_files = Dir.chdir(@template_root) { Dir.glob('*/**.html') }
47
-
48
- expect(File.exists?(File.join(@site.config['destination'], 'index.html'))).to eq(true)
49
- expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<h1>This is a custom homepage for #{@site.config['attendease']['data']['event_host']}</h1>"
50
- end
51
- end
52
-
53
- end
1
+ # require 'spec_helper'
2
+ #
3
+ # RSpec.describe Jekyll::AttendeasePlugin::HomePageGenerator do
4
+ #
5
+ # #context 'Using the default homepage template in the gem' do
6
+ # # before do
7
+ # # # Ensure no custom templates are being used.
8
+ # # templates_json = File.join(@site.config['source'], '_attendease', 'data', 'templates.json')
9
+ # # File.open(templates_json, 'w') { |file| file.write([].to_json) }
10
+ # # #File.delete(@site.config['source'], '_attendease', 'templates', 'index.html')
11
+ # # @site = build_site
12
+ # # end
13
+ # #
14
+ # # it 'creates the home page' do
15
+ # # template_files = Dir.chdir(@template_root) { Dir.glob('*/**.html') }
16
+ # #
17
+ # # expect(File.exists?(File.join(@site.config['destination'], 'index.html'))).to eq(true)
18
+ # # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<h2>WHO</h2>"
19
+ # # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<div class=\"info\">#{@site.config['attendease']['data']['event_host']}</div>"
20
+ # # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<h2>WHEN</h2>"
21
+ # # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<div class=\"info\">#{@site.config['attendease']['data']['event_dates']}</div>"
22
+ # # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<h2>WHERE</h2>"
23
+ # # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<div class=\"info\">#{@site.config['attendease']['data']['event_location']}</div>"
24
+ # # end
25
+ # #end
26
+ #
27
+ # context 'Using a custom homepage template from the Attendease API' do
28
+ # before do
29
+ # templates_json = File.join(@site.config['source'], '_attendease', 'data', 'templates.json')
30
+ #
31
+ # templates = [
32
+ # {
33
+ # :data => "<h1>This is a custom homepage for Attendease</h1>",
34
+ # :id => "544e905b0bdb82e3ac000002",
35
+ # :page => 'index',
36
+ # :section => 'website'
37
+ # }
38
+ # ]
39
+ #
40
+ # File.open(templates_json, 'w') { |file| file.write(templates.to_json) }
41
+ #
42
+ # @site = build_site
43
+ # end
44
+ #
45
+ # it 'creates the home page' do
46
+ # template_files = Dir.chdir(@template_root) { Dir.glob('*/**.html') }
47
+ #
48
+ # expect(File.exists?(File.join(@site.config['destination'], 'index.html'))).to eq(true)
49
+ # expect(File.read(File.join(@site.config['destination'], 'index.html'))).to include "<h1>This is a custom homepage for #{@site.config['attendease']['data']['event_host']}</h1>"
50
+ # end
51
+ # end
52
+ #
53
+ # end
@@ -103,10 +103,10 @@ RSpec.describe Jekyll::AttendeasePlugin::ScheduleGenerator do
103
103
  end
104
104
  end
105
105
 
106
- context 'in a site with attendease.show_day_index = true' do
107
- it 'creates the day index page' do
108
- site = build_site({ 'attendease' => { 'show_day_index' => true } })
109
- expect(File.read(File.join(site.config['destination'], site.config['attendease']['schedule_path_name'], @index_file))).to_not include 'attendease-session-and-instance'
106
+ context 'in a site with attendease.show_schedule_index = true' do
107
+ it 'creates the day index page and show schedule widget' do
108
+ site = build_site({ 'attendease' => { 'show_schedule_index' => true } })
109
+ expect(File.read(File.join(site.config['destination'], site.config['attendease']['schedule_path_name'], @index_file))).to include 'attendease-schedule-widget'
110
110
  end
111
111
  end
112
112
 
@@ -22,13 +22,13 @@ RSpec.describe "Jekyll Attendease tags" do
22
22
  it { is_expected.to include "/api/lingo.json" }
23
23
  end
24
24
 
25
- context "{% t event.lingo.sponsors %}" do
26
- subject { render("{% t event.lingo.sponsors %}") }
25
+ context "{% attendease_t event.lingo.sponsors %}" do
26
+ subject { render("{% attendease_t event.lingo.sponsors %}") }
27
27
  it { is_expected.to eq "Sponsors" }
28
28
  end
29
29
 
30
- context "{% t event.lingo.sponsors, t_size: 1 %}" do
31
- subject { render("{% t event.lingo.sponsors, t_size: 1 %}") }
30
+ context "{% attendease_t event.lingo.sponsors, t_size: 1 %}" do
31
+ subject { render("{% attendease_t event.lingo.sponsors, t_size: 1 %}") }
32
32
  it { is_expected.to eq "Sponsor" }
33
33
  end
34
34
 
@@ -110,4 +110,4 @@ def schedule_widget_data
110
110
  </div>
111
111
  </div>
112
112
  eos
113
- end
113
+ end
data/spec/spec_helper.rb CHANGED
@@ -23,6 +23,7 @@ RSpec.configure do |config|
23
23
 
24
24
  FileUtils.touch Dir.glob(File.join(File.dirname(__FILE__), 'fixtures', '_attendease', 'data', '*.*'))
25
25
  @site = build_site
26
+ @page = Jekyll::Page.new(@site, File.join(File.dirname(__FILE__), 'fixtures'), '', 'page.html')
26
27
  end
27
28
 
28
29
  def test_dir(*subdirs)
@@ -60,7 +60,7 @@
60
60
  <div class="attendease-sessions attendease-schedule">
61
61
  {% if site.attendease.data.event_session_times_heading == true %}
62
62
  {% assign t_size = page.presenter.sessions.size %}
63
- <h2 class="attendease-sessions-heading">{% t event.lingo.sessions %}</h2>
63
+ <h2 class="attendease-sessions-heading">{% attendease_t event.lingo.sessions %}</h2>
64
64
  {% endif %}
65
65
 
66
66
  {% for session in page.presenter.sessions %}
@@ -14,7 +14,7 @@
14
14
  <div class="attendease-instances">
15
15
  {% if site.attendease.data.event_session_times_heading == true %}
16
16
  {% assign t_size = page.session.instances.size %}
17
- <h2 class="attendease-times-heading">{% t event.lingo.times %}</h2>
17
+ <h2 class="attendease-times-heading">{% attendease_t event.lingo.times %}</h2>
18
18
  {% endif %}
19
19
 
20
20
  {% for instance in page.session.instances %}
@@ -64,7 +64,7 @@
64
64
  <div class="attendease-presenters attendease-meta-item">
65
65
  {% if site.attendease.data.event_session_presenters_heading == true %}
66
66
  {% assign t_size = page.session.presenters.size %}
67
- <h2 class="attendease-presenter-heading">{% t event.lingo.presenters %}</h2>
67
+ <h2 class="attendease-presenter-heading">{% attendease_t event.lingo.presenters %}</h2>
68
68
  {% endif %}
69
69
 
70
70
  {% for presenter in page.session.presenters %}
@@ -93,7 +93,7 @@
93
93
  {% if site.attendease.data.event_session_filters_heading == true %}
94
94
  {% assign t_size = page.session.filters.size %}
95
95
  {% if t_size > 0 %}
96
- <h2 class="attendease-filter-heading">{% t event.lingo.filters %}</h2>
96
+ <h2 class="attendease-filter-heading">{% attendease_t event.lingo.filters %}</h2>
97
97
  {% endif %}
98
98
  {% endif %}
99
99
 
@@ -1,6 +1,6 @@
1
1
  <div class="attendease-sponsors">
2
2
  <div class="attendease-header">
3
- <h1>{% t event.lingo.sponsors %}</h1>
3
+ <h1>{% attendease_t event.lingo.sponsors %}</h1>
4
4
  </div>
5
5
 
6
6
  {% for level in page.sponsor_levels %}
@@ -1,7 +1,7 @@
1
1
  <div class="attendease-venues">
2
2
  <div class="attendease-header">
3
3
  {% assign t_size = page.venues.size %}
4
- <h1>{% t event.lingo.venues %}</h2>
4
+ <h1>{% attendease_t event.lingo.venues %}</h2>
5
5
  </div>
6
6
 
7
7
  {% for venue in page.venues %}
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.6.12
4
+ version: 0.6.13.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Wood
@@ -16,98 +16,98 @@ dependencies:
16
16
  name: httparty
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - "~>"
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
21
  version: 0.13.1
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
28
  version: 0.13.1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: json
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - "~>"
33
+ - - ~>
34
34
  - !ruby/object:Gem::Version
35
35
  version: 1.8.1
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
42
  version: 1.8.1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: i18n
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
47
+ - - ~>
48
48
  - !ruby/object:Gem::Version
49
49
  version: 0.6.9
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
56
  version: 0.6.9
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: redcarpet
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
61
+ - - ~>
62
62
  - !ruby/object:Gem::Version
63
63
  version: 2.3.0
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - "~>"
68
+ - - ~>
69
69
  - !ruby/object:Gem::Version
70
70
  version: 2.3.0
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: bundler
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - "~>"
75
+ - - ~>
76
76
  - !ruby/object:Gem::Version
77
77
  version: '1.3'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - "~>"
82
+ - - ~>
83
83
  - !ruby/object:Gem::Version
84
84
  version: '1.3'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: rake
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ">="
89
+ - - '>='
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - ">="
96
+ - - '>='
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: rspec
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - ">="
103
+ - - '>='
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - ">="
110
+ - - '>='
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  - !ruby/object:Gem::Dependency
@@ -130,8 +130,6 @@ executables: []
130
130
  extensions: []
131
131
  extra_rdoc_files: []
132
132
  files:
133
- - lib/jekyll-attendease.rb
134
- - lib/jekyll/attendease_plugin.rb
135
133
  - lib/jekyll/attendease_plugin/event_data_generator.rb
136
134
  - lib/jekyll/attendease_plugin/event_layout_generator.rb
137
135
  - lib/jekyll/attendease_plugin/event_layout_page.rb
@@ -156,18 +154,8 @@ files:
156
154
  - lib/jekyll/attendease_plugin/venue_page.rb
157
155
  - lib/jekyll/attendease_plugin/venues_index_page.rb
158
156
  - lib/jekyll/attendease_plugin/version.rb
159
- - spec/lib/jekyll/attendease_plugin/event_data_generator_spec.rb
160
- - spec/lib/jekyll/attendease_plugin/event_layout_generator_spec.rb
161
- - spec/lib/jekyll/attendease_plugin/event_template_generator_spec.rb
162
- - spec/lib/jekyll/attendease_plugin/filters_spec.rb
163
- - spec/lib/jekyll/attendease_plugin/helpers_spec.rb
164
- - spec/lib/jekyll/attendease_plugin/home_page_generator_spec.rb
165
- - spec/lib/jekyll/attendease_plugin/pre_zero_point_six_link_redirect_generator_spec.rb
166
- - spec/lib/jekyll/attendease_plugin/schedule_generator_spec.rb
167
- - spec/lib/jekyll/attendease_plugin/sponsor_generator_spec.rb
168
- - spec/lib/jekyll/attendease_plugin/tags_spec.rb
169
- - spec/spec_helper.rb
170
- - spec/support/fixtures_helpers.rb
157
+ - lib/jekyll/attendease_plugin.rb
158
+ - lib/jekyll-attendease.rb
171
159
  - templates/attendease/index.html
172
160
  - templates/attendease/presenters/index.html
173
161
  - templates/attendease/presenters/presenter.html
@@ -181,6 +169,18 @@ files:
181
169
  - templates/attendease/venues/venue.html
182
170
  - templates/layout.html
183
171
  - templates/redirect.html
172
+ - spec/lib/jekyll/attendease_plugin/event_data_generator_spec.rb
173
+ - spec/lib/jekyll/attendease_plugin/event_layout_generator_spec.rb
174
+ - spec/lib/jekyll/attendease_plugin/event_template_generator_spec.rb
175
+ - spec/lib/jekyll/attendease_plugin/filters_spec.rb
176
+ - spec/lib/jekyll/attendease_plugin/helpers_spec.rb
177
+ - spec/lib/jekyll/attendease_plugin/home_page_generator_spec.rb
178
+ - spec/lib/jekyll/attendease_plugin/pre_zero_point_six_link_redirect_generator_spec.rb
179
+ - spec/lib/jekyll/attendease_plugin/schedule_generator_spec.rb
180
+ - spec/lib/jekyll/attendease_plugin/sponsor_generator_spec.rb
181
+ - spec/lib/jekyll/attendease_plugin/tags_spec.rb
182
+ - spec/spec_helper.rb
183
+ - spec/support/fixtures_helpers.rb
184
184
  homepage: https://attendease.com/
185
185
  licenses:
186
186
  - MIT
@@ -191,17 +191,17 @@ require_paths:
191
191
  - lib
192
192
  required_ruby_version: !ruby/object:Gem::Requirement
193
193
  requirements:
194
- - - ">="
194
+ - - '>='
195
195
  - !ruby/object:Gem::Version
196
196
  version: '0'
197
197
  required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ">="
199
+ - - '>'
200
200
  - !ruby/object:Gem::Version
201
- version: '0'
201
+ version: 1.3.1
202
202
  requirements: []
203
203
  rubyforge_project:
204
- rubygems_version: 2.2.2
204
+ rubygems_version: 2.0.14
205
205
  signing_key:
206
206
  specification_version: 4
207
207
  summary: Attendease event helper for Jekyll