jekyll-indico 0.4.2 → 0.4.3
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/jekyll-indico/core.rb +1 -1
- data/lib/jekyll-indico/generator.rb +8 -5
- data/lib/jekyll-indico/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fd70ce9ff3c9b8e49a90d35d11c785073ddcb46
|
4
|
+
data.tar.gz: 1a45a9c41cb364fe92fc43f198e1be4ef95c9543
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1faa993005ede31ba0eead7c4e4801f8d0d96afd6e76b2089e67d03c73713ecf40e458d449771c10afee1d33b3e17ebc62a4bdc772ed1c7ced9eaeeaa6f3f37c
|
7
|
+
data.tar.gz: a9b7199fb3b6695b69e70b12d9c3ad735e7c01030fd95d9ae7b0772c1286aba3caa8804da6530c383de1347c3726938415cb17636941b4db527b68efe8c0f22d
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -20,7 +20,7 @@ indico:
|
|
20
20
|
```
|
21
21
|
|
22
22
|
This plugin will automatically use an API token if your environment contains
|
23
|
-
`INDICO_TOKEN`. You should generate this and replace `
|
23
|
+
`INDICO_TOKEN`. You should generate this and replace `INDICO_API_KEY` and
|
24
24
|
`INDICO_SECRET_KEY` with it. You'll want the "Classic API" read permissions set
|
25
25
|
on it.
|
26
26
|
|
data/lib/jekyll-indico/core.rb
CHANGED
@@ -71,7 +71,7 @@ module JekyllIndico
|
|
71
71
|
req = Net::HTTP::Get.new(uri)
|
72
72
|
if ENV['INDICO_TOKEN']
|
73
73
|
req['Authorization'] = "Bearer #{ENV['INDICO_TOKEN']}"
|
74
|
-
elsif ENV['INDICO_SECRET_KEY'] || ENV['
|
74
|
+
elsif ENV['INDICO_SECRET_KEY'] || ENV['INDICO_API_KEY']
|
75
75
|
raise Error, 'Use INDICO_TOKEN with a new-style token'
|
76
76
|
end
|
77
77
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'benchmark'
|
4
|
+
require 'net/http'
|
3
5
|
require 'yaml'
|
4
6
|
|
5
7
|
require 'jekyll'
|
6
8
|
|
7
9
|
require 'jekyll-indico/core'
|
8
10
|
|
9
|
-
require 'net/http'
|
10
|
-
|
11
11
|
module JekyllIndico
|
12
12
|
# This is a Jekyll Generator
|
13
13
|
class GetIndico < Jekyll::Generator
|
@@ -41,9 +41,12 @@ module JekyllIndico
|
|
41
41
|
return if @site.data[data_path].key? name
|
42
42
|
|
43
43
|
msg = @cache_msg ? " - run `#{@cache_msg}` to cache" : ''
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
print "Accessing Indico meeting API for #{name}:#{number}#{msg}"
|
45
|
+
time = Benchmark.realtime do
|
46
|
+
iris_meeting = Meetings.new(base_url, number)
|
47
|
+
@site.data[data_path][name] = iris_meeting.dict
|
48
|
+
end
|
49
|
+
puts ", took #{time.round(1)} s"
|
47
50
|
end
|
48
51
|
end
|
49
52
|
end
|