jekyll-attendease 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  module Jekyll
2
2
  module AttendeasePlugin
3
- VERSION = "0.6.3"
3
+ VERSION = "0.6.4"
4
4
  end
5
5
  end
6
6
 
@@ -5,13 +5,15 @@ RSpec.describe Jekyll::AttendeasePlugin::ScheduleGenerator do
5
5
  before(:all) do
6
6
  @schedule_generator = find_generator(described_class)
7
7
  @date = @schedule_generator.event['dates'].first['date']
8
+ @index_file = 'index.html'
8
9
  @session_slug = @schedule_generator.sessions.first['slug']
9
10
  @presenter_slug = @schedule_generator.presenters.first['slug']
11
+ @presenter_social = @schedule_generator.presenters.first['social']
10
12
  @venue_slug = Jekyll::AttendeasePlugin::Helpers.parameterize(@schedule_generator.venues.first['name'], '_') + '.html'
11
13
  end
12
14
 
13
15
  it 'creates a presenters index page' do
14
- file = File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], 'index.html')
16
+ file = File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], @index_file)
15
17
  expect(File.exists?(file)).to eq(true)
16
18
  expect(File.file?(file)).to eq(true)
17
19
  end
@@ -23,7 +25,7 @@ RSpec.describe Jekyll::AttendeasePlugin::ScheduleGenerator do
23
25
  end
24
26
 
25
27
  it 'creates a venue index page' do
26
- file = File.join(@site.config['destination'], @site.config['attendease']['venues_path_name'], 'index.html')
28
+ file = File.join(@site.config['destination'], @site.config['attendease']['venues_path_name'], @index_file)
27
29
  expect(File.exists?(file)).to eq(true)
28
30
  expect(File.file?(file)).to eq(true)
29
31
  end
@@ -35,20 +37,20 @@ RSpec.describe Jekyll::AttendeasePlugin::ScheduleGenerator do
35
37
  end
36
38
 
37
39
  it 'creates a schedule index page' do
38
- file = File.join(@site.config['destination'], @site.config['attendease']['schedule_path_name'], 'index.html')
40
+ file = File.join(@site.config['destination'], @site.config['attendease']['schedule_path_name'], @index_file)
39
41
  expect(File.exists?(file)).to eq(true)
40
42
  expect(File.file?(file)).to eq(true)
41
43
  end
42
44
 
43
45
  it 'creates a schedule day index page' do
44
- file = File.join(@site.config['destination'], @site.config['attendease']['schedule_path_name'], @date, 'index.html')
46
+ file = File.join(@site.config['destination'], @site.config['attendease']['schedule_path_name'], @date, @index_file)
45
47
  expect(File.exists?(file)).to eq(true)
46
48
  expect(File.file?(file)).to eq(true)
47
- expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['schedule_path_name'], 'index.html'))).to include 'attendease-session-and-instance'
49
+ expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['schedule_path_name'], @index_file))).to include 'attendease-session-and-instance'
48
50
  end
49
51
 
50
52
  it 'creates a schedule sessions index page' do
51
- file = File.join(@site.config['destination'], @site.config['attendease']['schedule_path_name'], 'sessions', 'index.html')
53
+ file = File.join(@site.config['destination'], @site.config['attendease']['schedule_path_name'], 'sessions', @index_file)
52
54
  expect(File.exists?(file)).to eq(true)
53
55
  expect(File.file?(file)).to eq(true)
54
56
  end
@@ -61,7 +63,7 @@ RSpec.describe Jekyll::AttendeasePlugin::ScheduleGenerator do
61
63
 
62
64
  context 'presenter linking' do
63
65
  it 'links presenters correctly from the presenter index page' do
64
- expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], 'index.html'))).to include @presenter_slug
66
+ expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], @index_file))).to include @presenter_slug
65
67
  end
66
68
 
67
69
  it 'links presenters correctly from the session page' do
@@ -69,9 +71,27 @@ RSpec.describe Jekyll::AttendeasePlugin::ScheduleGenerator do
69
71
  end
70
72
  end
71
73
 
74
+ context 'presenter social links' do
75
+ it 'includes the included social links' do
76
+ expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], @index_file))).to include "twitter.com/#{@presenter_social['twitter']}"
77
+ expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], @index_file))).to include "facebook.com/#{@presenter_social['facebook']}"
78
+
79
+ expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], @presenter_slug))).to include "twitter.com/#{@presenter_social['twitter']}"
80
+ expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], @presenter_slug))).to include "facebook.com/#{@presenter_social['facebook']}"
81
+ end
82
+
83
+ it 'does not include social links that are not there' do
84
+ expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], @index_file))).to_not include "linkedin"
85
+ expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], @index_file))).to_not include "googleplus"
86
+
87
+ expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], @presenter_slug))).to_not include "linkedin"
88
+ expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['presenters_path_name'], @presenter_slug))).to_not include "googleplus"
89
+ end
90
+ end
91
+
72
92
  context 'venue linking' do
73
93
  it 'links venues correctly from the venue index page' do
74
- expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['venues_path_name'], 'index.html'))).to include @venue_slug
94
+ expect(File.read(File.join(@site.config['destination'], @site.config['attendease']['venues_path_name'], @index_file))).to include @venue_slug
75
95
  end
76
96
 
77
97
  it 'links venues correctly from the presenter page' do
@@ -86,7 +106,7 @@ RSpec.describe Jekyll::AttendeasePlugin::ScheduleGenerator do
86
106
  context 'in a site with attendease.show_day_index = true' do
87
107
  it 'creates the day index page' do
88
108
  site = build_site({ 'attendease' => { 'show_day_index' => true } })
89
- expect(File.read(File.join(site.config['destination'], site.config['attendease']['schedule_path_name'], 'index.html'))).to_not include 'attendease-session-and-instance'
109
+ expect(File.read(File.join(site.config['destination'], site.config['attendease']['schedule_path_name'], @index_file))).to_not include 'attendease-session-and-instance'
90
110
  end
91
111
  end
92
112
 
@@ -26,16 +26,34 @@
26
26
  {% if presenter.social %}
27
27
  <div class="attendease-presenter-social">
28
28
  {% if presenter.social.twitter and presenter.social.twitter != '' %}
29
- <a class="social-icon twitter" href="https://twitter.com/{{ presenter.social.twitter }}" target="_blank"><i class="fa fa-twitter-square fa-3"></i></a>
29
+ <a class="attendease-social-icon twitter" href="https://twitter.com/{{ presenter.social.twitter }}" target="_blank">
30
+ <i class="fa fa-twitter-square fa-3"></i>
31
+ <span class="attendease-social-network">Twitter</span>
32
+ <span class="attendease-social-handle">@{{ presenter.social.twitter }}</span>
33
+ <span class="attendease-social-url">https://twitter.com/{{ presenter.social.twitter }}</span>
34
+ </a>
30
35
  {% endif %}
31
36
  {% if presenter.social.facebook and presenter.social.facebook != '' %}
32
- <a class="social-icon facebook" href="https://www.facebook.com/{{ presenter.social.facebook }}" target="_blank"><i class="fa fa-facebook-square fa-3"></i></a>
37
+ <a class="attendease-social-icon facebook" href="https://www.facebook.com/{{ presenter.social.facebook }}" target="_blank">
38
+ <i class="fa fa-facebook-square fa-3"></i>
39
+ <span class="attendease-social-network">Facebook</span>
40
+ <span class="attendease-social-handle">{{ presenter.social.facebook }}</span>
41
+ <span class="attendease-social-url">https://www.facebook.com/{{ presenter.social.facebook }}</span>
42
+ </a>
33
43
  {% endif %}
34
44
  {% if presenter.social.linkedin and presenter.social.linkedin != '' %}
35
- <a class="social-icon linkedin" href="{{ presenter.social.linkedin }}" target="_blank"><i class="fa fa-linkedin-square"></i></a>
45
+ <a class="attendease-social-icon linkedin" href="{{ presenter.social.linkedin }}" target="_blank">
46
+ <i class="fa fa-linkedin-square"></i>
47
+ <span class="attendease-social-network">LinkedIn</span>
48
+ <span class="attendease-social-url">{{ presenter.social.linkedin }}</span>
49
+ </a>
36
50
  {% endif %}
37
51
  {% if presenter.social.googleplus and presenter.social.googleplus != '' %}
38
- <a class="social-icon googleplus" href="{{ presenter.social.googleplus }}" target="_blank"><i class="fa fa-google-plus-square"></i></a>
52
+ <a class="attendease-social-icon googleplus" href="{{ presenter.social.googleplus }}" target="_blank">
53
+ <i class="fa fa-google-plus-square"></i>
54
+ <span class="attendease-social-network">Google+</span>
55
+ <span class="attendease-social-url">{{ presenter.social.googleplus }}</span>
56
+ </a>
39
57
  {% endif %}
40
58
  </div>
41
59
  {% endif %}
@@ -19,16 +19,34 @@
19
19
  {% if page.presenter.social %}
20
20
  <div class="attendease-presenter-social">
21
21
  {% if page.presenter.social.twitter and page.presenter.social.twitter != '' %}
22
- <a class="social-icon twitter" href="https://twitter.com/{{ page.presenter.social.twitter }}" target="_blank"><i class="fa fa-twitter-square fa-3"></i></a>
22
+ <a class="attendease-social-icon twitter" href="https://twitter.com/{{ page.presenter.social.twitter }}" target="_blank">
23
+ <i class="fa fa-twitter-square fa-3"></i>
24
+ <span class="attendease-social-network">Twitter</span>
25
+ <span class="attendease-social-handle">@{{ page.presenter.social.twitter }}</span>
26
+ <span class="attendease-social-url">https://twitter.com/{{ page.presenter.social.twitter }}</span>
27
+ </a>
23
28
  {% endif %}
24
29
  {% if page.presenter.social.facebook and page.presenter.social.facebook != '' %}
25
- <a class="social-icon facebook" href="https://www.facebook.com/{{ page.presenter.social.facebook }}" target="_blank"><i class="fa fa-facebook-square fa-3"></i></a>
30
+ <a class="attendease-social-icon facebook" href="https://www.facebook.com/{{ page.presenter.social.facebook }}" target="_blank">
31
+ <i class="fa fa-facebook-square fa-3"></i>
32
+ <span class="attendease-social-network">Facebook</span>
33
+ <span class="attendease-social-handle">{{ page.presenter.social.facebook }}</span>
34
+ <span class="attendease-social-url">https://www.facebook.com/{{ page.presenter.social.facebook }}</span>
35
+ </a>
26
36
  {% endif %}
27
37
  {% if page.presenter.social.linkedin and page.presenter.social.linkedin != '' %}
28
- <a class="social-icon linkedin" href="{{ page.presenter.social.linkedin }}" target="_blank"><i class="fa fa-linkedin-square"></i></a>
38
+ <a class="attendease-social-icon linkedin" href="{{ page.presenter.social.linkedin }}" target="_blank">
39
+ <i class="fa fa-linkedin-square"></i>
40
+ <span class="attendease-social-network">LinkedIn</span>
41
+ <span class="attendease-social-url">{{ page.presenter.social.linkedin }}</span>
42
+ </a>
29
43
  {% endif %}
30
44
  {% if page.presenter.social.googleplus and page.presenter.social.googleplus != '' %}
31
- <a class="social-icon googleplus" href="{{ page.presenter.social.googleplus }}" target="_blank"><i class="fa fa-google-plus-square"></i></a>
45
+ <a class="attendease-social-icon googleplus" href="{{ page.presenter.social.googleplus }}" target="_blank">
46
+ <i class="fa fa-google-plus-square"></i>
47
+ <span class="attendease-social-network">Google+</span>
48
+ <span class="attendease-social-url">{{ page.presenter.social.googleplus }}</span>
49
+ </a>
32
50
  {% endif %}
33
51
  </div>
34
52
  {% endif %}
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.3
4
+ version: 0.6.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: