jekyll-attendease 0.6.26e → 0.6.26f

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: 8514ba50f31f521220c6ce095b97e241d56d2b9d
4
- data.tar.gz: cc969ad1eba291537c5082de46a606c17677f546
3
+ metadata.gz: 0844353a2904ae30967b8d89082b67dd85689c6c
4
+ data.tar.gz: 5d4b9461c72c403e80991a52bb50114572dee213
5
5
  SHA512:
6
- metadata.gz: f897a374ef09075350456a1954de9d3f3689a0a1c71fbc4d94392313b30610bb6c6b20379e7f1746a655b04c5c5eff2238c91d74f5b9e1aec912517495a365b6
7
- data.tar.gz: 5e1d1d48dc32e200a276be4d3ccbb935c85f943c30bb30adcffd0db7ce6bcb9ab26d937761aea1d903615c35f68e90de5ec7750d749685236d13292fc0de7612
6
+ metadata.gz: 4307c512679b1a03ccfca0a938aceab2d12b3fcfbf0acb1400f322b0f5897a37a6e4914d03c5fdfc6f9ec68db68c71dcfbaf4df4bdf8ab5b613cea13397e174c
7
+ data.tar.gz: 8bf169e03af6b771ce9e9fcf5a3f3ae53a7b0bd90859a99e8fb86024f246a19972210dee47992fb56727da265406b9bd40b51209e175f9b6c7ccb13bcec060d7
@@ -5,11 +5,9 @@ module Jekyll
5
5
 
6
6
  priority :highest
7
7
 
8
- include HTTParty
9
-
10
8
  def get(url, options = {})
11
9
  begin
12
- self.class.get(url, options)
10
+ HTTParty.get(url, options)
13
11
  rescue => e
14
12
  Jekyll.logger.error "Could not connect to #{url}."
15
13
  puts e.inspect
@@ -5,7 +5,7 @@ module Jekyll
5
5
 
6
6
  def generate(site)
7
7
  site.data['pages'].each do |page|
8
- if !page['permanent']
8
+ if !page['permanent'] && !page['external']
9
9
  site.pages << SitePage.new(site, site.source, page)
10
10
 
11
11
  zones = {}
@@ -30,21 +30,7 @@ module Jekyll
30
30
  zones[i['zone']] << i
31
31
  end
32
32
 
33
- # sort each bucket by widget weightILTO="pgib@me.com"
34
- # ACCESS_KEY_ID="AKIAJYFM5LRNS3YG3MMA"
35
- # SECRET_ACCESS_KEY="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"
36
- # SLACK_WEBHOOK_URL="https://hooks.slack.com/services/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"
37
- # QUIET="yes"
38
- #
39
- # #0 0 * * * /usr/local/bin/imapsync --syncinternaldates --host1 mail.me.com --user1 pgib --password1 m0bile42 --ssl1 --authmech1 LOGIN --host2 localhost --user2 pgib@me.com --password2 backup42
40
- #
41
- # #0 0 * * * /home/camera/garage/clean_yesterday.sh
42
- #
43
- # 0 1 * * * /usr/local/etc/asterisk/backup_asterisk_db.sh >/dev/null 2>/dev/null
44
- #
45
- # #* * * * * /home/patrick/bin/keep-my-ip.sh >/dev/null
46
- # * * * * * /home/patrick/bin/keep-my-ip ZW8Q92H776T13 home
47
- #
33
+ # sort each bucket by widget weight
48
34
  zones.each do |k, zone|
49
35
  zone.sort! { |x, y| x['weight'] <=> y['weight'] }
50
36
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module AttendeasePlugin
3
- VERSION = '0.6.26e'
3
+ VERSION = '0.6.26f'
4
4
  end
5
5
  end
@@ -41,7 +41,7 @@ RSpec.describe Jekyll::AttendeasePlugin::EventDataGenerator do
41
41
 
42
42
  it 'populates a site wide pages array' do
43
43
  expect(site.data['pages'].class).to eq(Array)
44
- expect(site.data['pages'].length).to eq(5)
44
+ expect(site.data['pages'].length).to eq(6)
45
45
  end
46
46
 
47
47
  it 'populates a site wide event object' do
@@ -59,7 +59,7 @@ RSpec.describe Jekyll::AttendeasePlugin::EventDataGenerator do
59
59
 
60
60
  it 'populates a site wide pages array' do
61
61
  expect(site.data['pages'].class).to eq(Array)
62
- expect(site.data['pages'].length).to eq(5)
62
+ expect(site.data['pages'].length).to eq(6)
63
63
  end
64
64
 
65
65
  it 'populates a site wide event object' do
@@ -6,13 +6,17 @@ RSpec.describe Jekyll::AttendeasePlugin::OrganizationDataGenerator do
6
6
 
7
7
  it 'populates a site wide pages array' do
8
8
  expect(site.data['pages'].class).to eq(Array)
9
- expect(site.data['pages'].length).to eq(5)
9
+ expect(site.data['pages'].length).to eq(6)
10
10
  end
11
11
 
12
12
  it 'populates a site wide settings object' do
13
13
  expect(site.data['site_settings'].class).to eq(Hash)
14
14
  expect(site.data['site_settings']['look_and_feel']['body_font_family']).to eq('serif')
15
15
  end
16
+
17
+ it 'responds to GET from HTTParty' do
18
+ expect(subject).to respond_to(:get)
19
+ end
16
20
  end
17
21
  end
18
22
 
@@ -1,22 +1,32 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  RSpec.describe Jekyll::AttendeasePlugin::SitePagesGenerator do
4
- let (:site) { build_site }
5
- let (:site_pages_generator) { find_generator(site, described_class) }
6
- let(:index_file) { 'index.html' }
4
+ let(:site) { build_site }
5
+ let(:site_pages_generator) { find_generator(site, described_class) }
6
+ let(:index_file) { 'index.html' }
7
+ let(:page) { site.data['pages'].detect { |p| p['slug'] == 'test' } }
8
+ let(:external_page) { site.data['pages'].detect { |p| p['external'] == true } }
7
9
 
8
- it 'creates a page using the provided slug' do
9
- slug = site.data['pages'].last['slug']
10
- file = File.join(site.config['destination'], slug, 'index.html')
11
- expect(File.exists?(file)).to eq(true)
12
- expect(File.file?(file)).to eq(true)
13
- expect(File.read(file)).to include '<title>Test Page</title>'
10
+ context 'regular page' do
11
+ it 'creates a page using the provided slug' do
12
+ slug = page['slug']
13
+ file = File.join(site.config['destination'], slug, 'index.html')
14
+ expect(File.exists?(file)).to eq(true)
15
+ expect(File.file?(file)).to eq(true)
16
+ expect(File.read(file)).to include '<title>Test Page</title>'
17
+ end
18
+
19
+ it 'creates a block instance json file using the provided slug' do
20
+ slug = page['slug']
21
+ file = File.join(site.config['destination'], slug, 'index.json')
22
+ expect(File.exists?(file)).to eq(true)
23
+ expect(File.file?(file)).to eq(true)
24
+ end
14
25
  end
15
26
 
16
- it 'creates a block instance json file using the provided slug' do
17
- slug = site.data['pages'].last['slug']
18
- file = File.join(site.config['destination'], slug, 'index.json')
19
- expect(File.exists?(file)).to eq(true)
20
- expect(File.file?(file)).to eq(true)
27
+ context 'external page' do
28
+ it 'does not create a page using the provided slug' do
29
+
30
+ end
21
31
  end
22
32
  end
@@ -61,7 +61,7 @@ RSpec.describe "Jekyll Attendease tags" do
61
61
 
62
62
  context "{% attendease_nav %}" do
63
63
  subject { render("{% attendease_nav %}{% raw %}<li><a href=\"{{ page.href }}\">{{ page.name }}</a></li>{% endraw %}{% endattendease_nav %}") }
64
- it { is_expected.to match(/<li><a href="\/schedule\/"/) }
64
+ it { is_expected.to match(/<li><a href="\/agenda\/"/) }
65
65
 
66
66
  # hidden page
67
67
  it { is_expected.to_not match(/<li><a href="\/test\/"/) }
data/spec/spec_helper.rb CHANGED
@@ -98,15 +98,18 @@ RSpec.configure do |config|
98
98
  build_site({ 'attendease' => { 'mode' => 'organization', 'jekyll33' => true } })
99
99
  end
100
100
 
101
- config.after(:each) do
101
+ config.after(:each) do |foo|
102
+ puts "Removing #{dest}"
102
103
  dest.rmtree if dest.exist?
103
104
  fixtures_path.join('_attendease', 'templates').rmtree if File.exists?(fixtures_path.join('_attendease', 'templates'))
104
105
  fixtures_path.join('attendease_layouts').rmtree if File.exists?(fixtures_path.join('attendease_layouts'))
105
106
  unless @site.nil?
106
107
  Dir.glob(File.join(@site.source, '**', 'index.json')).map do |i|
107
- puts "Removing #{Pathname.new(i).parent}"
108
-
109
- FileUtils.rm_r Pathname.new(i).parent
108
+ if (Pathname.new(i).parent == fixtures_path)
109
+ FileUtils.rm i
110
+ else
111
+ FileUtils.rm_r Pathname.new(i).parent
112
+ end
110
113
  end
111
114
  end
112
115
  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.6.26e
4
+ version: 0.6.26f
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Wood
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  version: 1.3.1
240
240
  requirements: []
241
241
  rubyforge_project:
242
- rubygems_version: 2.4.5.2
242
+ rubygems_version: 2.2.5
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: Attendease event helper for Jekyll