jekyll-indico 0.4.2 → 0.4.3

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: 3ba6c0b97ed60402adc30d9f4d0c0077b7c7293b
4
- data.tar.gz: '0322806b14154b9d0da3441ed64ff0931276736e'
3
+ metadata.gz: 2fd70ce9ff3c9b8e49a90d35d11c785073ddcb46
4
+ data.tar.gz: 1a45a9c41cb364fe92fc43f198e1be4ef95c9543
5
5
  SHA512:
6
- metadata.gz: 60013b3c444d121db0b865797eb9353b47220f2b6b186f5d949aa27b7426976ad3d7914624b9cb4578a5c397a08847907b0637dd531fc47a121ef005f279061e
7
- data.tar.gz: 82c1b136bec61c8fe09011e3a62376c39981e1195febcd70e5ae4f30e9bbc7dcaf6f77626129e2782e0f0831707231b68d6a4c84063439a21b1a0a8f0a17305d
6
+ metadata.gz: 1faa993005ede31ba0eead7c4e4801f8d0d96afd6e76b2089e67d03c73713ecf40e458d449771c10afee1d33b3e17ebc62a4bdc772ed1c7ced9eaeeaa6f3f37c
7
+ data.tar.gz: a9b7199fb3b6695b69e70b12d9c3ad735e7c01030fd95d9ae7b0772c1286aba3caa8804da6530c383de1347c3726938415cb17636941b4db527b68efe8c0f22d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # Version 0.4.3
2
+
3
+ Fix warning message for classic tokens. Add time prinout to help judge need for
4
+ timeout setting.
5
+
1
6
  # Version 0.4.2
2
7
 
3
8
  Remove broken support for classic tokens. Modern `INDICO_TOKEN` required.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll-indico (0.4.2)
4
+ jekyll-indico (0.4.3)
5
5
  jekyll (>= 3.8, < 5.0)
6
6
 
7
7
  GEM
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 `INDICO_API` and
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
 
@@ -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['INDICO_API']
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
- puts "Accessing Indico meeting API for #{name}:#{number}#{msg}"
45
- iris_meeting = Meetings.new(base_url, number)
46
- @site.data[data_path][name] = iris_meeting.dict
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllIndico
4
- VERSION = '0.4.2'
4
+ VERSION = '0.4.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-indico
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henry Schreiner