jekyll-attendease 0.6.26f → 0.6.26g

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: 0844353a2904ae30967b8d89082b67dd85689c6c
4
- data.tar.gz: 5d4b9461c72c403e80991a52bb50114572dee213
3
+ metadata.gz: 3801098fe322dcb018ebf7f94f9b5941f15945a0
4
+ data.tar.gz: 52b883649eee0224f7417f92560c7074e91208b4
5
5
  SHA512:
6
- metadata.gz: 4307c512679b1a03ccfca0a938aceab2d12b3fcfbf0acb1400f322b0f5897a37a6e4914d03c5fdfc6f9ec68db68c71dcfbaf4df4bdf8ab5b613cea13397e174c
7
- data.tar.gz: 8bf169e03af6b771ce9e9fcf5a3f3ae53a7b0bd90859a99e8fb86024f246a19972210dee47992fb56727da265406b9bd40b51209e175f9b6c7ccb13bcec060d7
6
+ metadata.gz: 23381e4b92c34d2b4266e00ac1c82f903fb0f00e0bb96f73e723a529d630788f2daab60ee065fa17d319b69a7befc176eb2e1871127f554738ef0ab8de3cdffa
7
+ data.tar.gz: 2f37f4bf699298e532996a17a06adadd53ce58648f2be3d22676635db6efb07ad5ec098dfec5a2afad022d360d6e7c77ba5ad032bf8c3c3dbe0bd7bcc00c5840
@@ -40,10 +40,14 @@ module Jekyll
40
40
  end
41
41
 
42
42
  if update_data
43
+ unless site.config.attendease['access_token']
44
+ raise "Missing user access_token in the attendease section of _config.yml"
45
+ end
46
+
43
47
  options = {}
44
- options.merge!(:headers => {'X-Organization-Token' => site.config.attendease['access_token']}) if site.config.attendease['access_token']
48
+ options.merge!(:headers => {'X-User-Token' => site.config.attendease['access_token']})
45
49
 
46
- response = get("#{site.config.attendease['api_host']}api/v2/#{filename}", options)
50
+ response = get("#{site.config.attendease['api_host']}api/#{filename}", options)
47
51
 
48
52
  if (!response.nil? && response.response.is_a?(Net::HTTPOK))
49
53
  Jekyll.logger.info "[Attendease] Saving #{filename} data..."
@@ -55,7 +59,12 @@ module Jekyll
55
59
  File.open(file, 'w') { |f| f.write(response.body) }
56
60
  end
57
61
  else
58
- raise "Request failed for #{site.config.attendease['api_host']}api/v2/#{filename}. Is your Attendease api_host site properly in _config.yml?"
62
+ case response.code
63
+ when 403
64
+ raise "#{response.code} Access token invalid for #{site.config.attendease['api_host']}api/#{filename}"
65
+ else
66
+ raise "#{response.code} Request failed for #{site.config.attendease['api_host']}api/#{filename}. Is your Attendease api_host site properly in _config.yml?"
67
+ end
59
68
  end
60
69
  end
61
70
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module AttendeasePlugin
3
- VERSION = '0.6.26f'
3
+ VERSION = '0.6.26g'
4
4
  end
5
5
  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.26f
4
+ version: 0.6.26g
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Wood