jekyll-attendease 0.6.18 → 0.6.19.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: a7815b49b3d439135b7919a804fdf8be4d949a45
4
- data.tar.gz: 254887cff948a78acb79e94e0eabe7a80b14258d
3
+ metadata.gz: adb1b87b00c536f03ba16ae50832f4c438432fef
4
+ data.tar.gz: e223b30ec085bb2546ff071246cc3ec0615e29c3
5
5
  SHA512:
6
- metadata.gz: 9e1222e8b7196c4d1cae3abe69a5cf20ab9e8bf524b15697b7ff93a862d72049b77d698be576b1c27f2d090c5a34f40b3d08498facc39ad1fcce976021a1bd24
7
- data.tar.gz: ab553510d0635986b845ce111662c3747d0810fe36a62e2f9b90e8a0100536ea2021c4bd475b03e11e1aa0a06f1d11149ce683204c968eacd398f05947dd737a
6
+ metadata.gz: edf924fd97d9eb8706e26d3afedd5c1f074d30ffc3a382e81e68739902721c82c5be2177a17379318fa00819896c607eaed8dea46dad29f93d5118b1d62d7bda
7
+ data.tar.gz: 0769ff2897beb16c98843f07cac9a8854ac0b633993846274ce97368a9d4c7624d0cf8bff1485150e6bad914317a3bd4af7eb7c99e66f01c7cd7ddc61354a8f1
@@ -34,7 +34,7 @@ module Jekyll
34
34
 
35
35
  FileUtils.mkdir_p(@attendease_data_path)
36
36
 
37
- data_files = %w{ site templates event sessions presenters rooms filters venues sponsors }.map { |m| "#{m}.json"} << 'lingo.yml'
37
+ data_files = %w{ site event sessions presenters rooms filters venues sponsors }.map { |m| "#{m}.json"} << 'lingo.yml'
38
38
 
39
39
  data_files.each do |file_name|
40
40
  update_data = true
@@ -24,11 +24,6 @@ module Jekyll
24
24
  def generate(site)
25
25
  Jekyll.logger.info "[Attendease] Generating theme templates..."
26
26
 
27
- # Template data from the Attendease event for overriding specific templates
28
- templates = JSON.parse(File.read(File.join(site.source, '_attendease', 'data', 'templates.json')))
29
-
30
- site.config['attendease']['templates'] = templates
31
-
32
27
  # Generate the template files if they don't yet exist.
33
28
  %w{ schedule presenters venues sponsors}.each do |p|
34
29
  path = File.join(site.source, '_attendease', 'templates', p)
@@ -62,17 +57,9 @@ EOF
62
57
  }.each do |page|
63
58
  destination_file = File.join(site.source, '_attendease', 'templates', "#{page}.html")
64
59
 
65
- if template_data = get_template(templates, page)
66
- unless template_data.start_with?('---')
67
- template_data = front_matter + template_data
68
- end
69
-
60
+ unless File.exists?(destination_file)
61
+ template_data = front_matter + File.read(File.join(template_path, "#{page}.html"))
70
62
  File.open(destination_file, 'w+') { |f| f.write(template_data) }
71
- else
72
- unless File.exists?(destination_file)
73
- template_data = front_matter + File.read(File.join(template_path, "#{page}.html"))
74
- File.open(destination_file, 'w+') { |f| f.write(template_data) }
75
- end
76
63
  end
77
64
  end
78
65
 
@@ -86,16 +73,8 @@ EOF
86
73
  File.open(destination_file, 'w+') { |f| f.write(template_data) }
87
74
  end
88
75
 
89
-
90
76
  end
91
77
 
92
- def get_template(templates, page)
93
- template = nil
94
- if t = templates.detect{|t| t['page'] == page}
95
- template = t['data']
96
- end
97
- template
98
- end
99
78
  end
100
79
  end
101
- end
80
+ end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module AttendeasePlugin
3
- VERSION = "0.6.18"
3
+ VERSION = "0.6.19.pre"
4
4
  end
5
5
  end
@@ -37,4 +37,3 @@ RSpec.describe Jekyll::AttendeasePlugin::PreZeroPointSixLinkRedirectGenerator do
37
37
  end
38
38
 
39
39
  end
40
-
@@ -198,7 +198,7 @@ RSpec.describe Jekyll::AttendeasePlugin::ScheduleGenerator do
198
198
  @site = build_site
199
199
 
200
200
  expect(@site.config['attendease']['event']['id']).to eq('foobar')
201
- %w{ site templates event sessions presenters rooms filters venues sponsors lingo }.each do |key|
201
+ %w{ site event sessions presenters rooms filters venues sponsors lingo }.each do |key|
202
202
  expect(@site.config['attendease'].include?(key)).to eq(true)
203
203
  end
204
204
  end
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,6 @@
1
1
  require 'jekyll'
2
+ require 'coveralls'
3
+ Coveralls.wear!
2
4
 
3
5
  # Requires supporting ruby files with custom matchers and macros, etc,
4
6
  # in spec/support/ and its subdirectories.
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.18
4
+ version: 0.6.19.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Wood
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-08-11 00:00:00.000000000 Z
14
+ date: 2015-11-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: httparty
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - "~>"
21
21
  - !ruby/object:Gem::Version
22
- version: 0.13.1
22
+ version: 0.13.5
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 0.13.1
29
+ version: 0.13.5
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: json
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -125,6 +125,20 @@ dependencies:
125
125
  - - '='
126
126
  - !ruby/object:Gem::Version
127
127
  version: 1.5.1
128
+ - !ruby/object:Gem::Dependency
129
+ name: coveralls
130
+ requirement: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
135
+ type: :development
136
+ prerelease: false
137
+ version_requirements: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - ">="
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
128
142
  description: Bring your event data into Jekyll for amazing event websites.
129
143
  email: support@attendease.com
130
144
  executables: []
@@ -162,7 +176,6 @@ files:
162
176
  - spec/lib/jekyll/attendease_plugin/event_template_generator_spec.rb
163
177
  - spec/lib/jekyll/attendease_plugin/filters_spec.rb
164
178
  - spec/lib/jekyll/attendease_plugin/helpers_spec.rb
165
- - spec/lib/jekyll/attendease_plugin/home_page_generator_spec.rb
166
179
  - spec/lib/jekyll/attendease_plugin/pre_zero_point_six_link_redirect_generator_spec.rb
167
180
  - spec/lib/jekyll/attendease_plugin/schedule_generator_spec.rb
168
181
  - spec/lib/jekyll/attendease_plugin/sponsor_generator_spec.rb
@@ -197,9 +210,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
197
210
  version: '0'
198
211
  required_rubygems_version: !ruby/object:Gem::Requirement
199
212
  requirements:
200
- - - ">="
213
+ - - ">"
201
214
  - !ruby/object:Gem::Version
202
- version: '0'
215
+ version: 1.3.1
203
216
  requirements: []
204
217
  rubyforge_project:
205
218
  rubygems_version: 2.2.3
@@ -212,7 +225,6 @@ test_files:
212
225
  - spec/lib/jekyll/attendease_plugin/event_template_generator_spec.rb
213
226
  - spec/lib/jekyll/attendease_plugin/filters_spec.rb
214
227
  - spec/lib/jekyll/attendease_plugin/helpers_spec.rb
215
- - spec/lib/jekyll/attendease_plugin/home_page_generator_spec.rb
216
228
  - spec/lib/jekyll/attendease_plugin/pre_zero_point_six_link_redirect_generator_spec.rb
217
229
  - spec/lib/jekyll/attendease_plugin/schedule_generator_spec.rb
218
230
  - spec/lib/jekyll/attendease_plugin/sponsor_generator_spec.rb
@@ -1,53 +0,0 @@
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