jekyll-indico 0.4.3 → 0.4.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2fd70ce9ff3c9b8e49a90d35d11c785073ddcb46
4
- data.tar.gz: 1a45a9c41cb364fe92fc43f198e1be4ef95c9543
3
+ metadata.gz: 5c14daf72a602a2600ce825c5298012ab6be48c8
4
+ data.tar.gz: dd1509e11a7b0f2a969a6d2ed442e5103daecc60
5
5
  SHA512:
6
- metadata.gz: 1faa993005ede31ba0eead7c4e4801f8d0d96afd6e76b2089e67d03c73713ecf40e458d449771c10afee1d33b3e17ebc62a4bdc772ed1c7ced9eaeeaa6f3f37c
7
- data.tar.gz: a9b7199fb3b6695b69e70b12d9c3ad735e7c01030fd95d9ae7b0772c1286aba3caa8804da6530c383de1347c3726938415cb17636941b4db527b68efe8c0f22d
6
+ metadata.gz: bc20db3a1b0ab7b9d4e200bd0be98873a7ba21fdf576277d6960d7567dbce04bd1bd706864cbbe20fd80f374785035c2a010cc9420b16b1b13501a7fbee78a52
7
+ data.tar.gz: e6d791bfb92c05281dcbf9ec2d3ab56cc05692b5a4980f6f724e02bc9f646a23bc697bca963fdefc5ddb62085b7208dbd3d7015a5742cca42d109ce71003f67c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # Version 0.4.4
2
+
3
+ Fix timeout being incorrectly called.
4
+
1
5
  # Version 0.4.3
2
6
 
3
7
  Fix warning message for classic tokens. Add time prinout to help judge need for
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll-indico (0.4.3)
4
+ jekyll-indico (0.4.4)
5
5
  jekyll (>= 3.8, < 5.0)
6
6
 
7
7
  GEM
@@ -63,12 +63,13 @@ module JekyllIndico
63
63
  private
64
64
 
65
65
  # Run a block over each item in the downloaded results
66
- def download_and_iterate(base_url, indico_id, **params, &block)
66
+ def download_and_iterate(base_url, indico_id, timeout: nil, **params, &block)
67
67
  params[:pretty] = 'no'
68
68
  uri = URI.join(base_url, "/export/categ/#{indico_id}.json")
69
69
  uri.query = URI.encode_www_form(params)
70
70
 
71
71
  req = Net::HTTP::Get.new(uri)
72
+ req.read_timeout = timeout if timeout
72
73
  if ENV['INDICO_TOKEN']
73
74
  req['Authorization'] = "Bearer #{ENV['INDICO_TOKEN']}"
74
75
  elsif ENV['INDICO_SECRET_KEY'] || ENV['INDICO_API_KEY']
@@ -16,9 +16,6 @@ module JekyllIndico
16
16
  @site = site
17
17
  @cache_msg = @site.config.dig('indico', 'cache-command')
18
18
 
19
- timeout = @site.config.dig('indico', 'timeout')
20
- Net::HTTP.read_timeout = timeout if timeout
21
-
22
19
  meeting_ids = @site.config.dig('indico', 'ids')
23
20
  raise MissingIDs, 'indico: ids: MISSING from your config!' unless meeting_ids
24
21
  raise MissingIDs, 'indico: ids: must be a hash!' unless meeting_ids.is_a?(Hash)
@@ -37,13 +34,15 @@ module JekyllIndico
37
34
  data_path = @site.config.dig('indico', 'data') || 'indico'
38
35
  @site.data[data_path] = {} unless @site.data.key? data_path
39
36
 
37
+ timeout = @site.config.dig('indico', 'timeout')
38
+
40
39
  # Do nothing if already downloaded
41
40
  return if @site.data[data_path].key? name
42
41
 
43
42
  msg = @cache_msg ? " - run `#{@cache_msg}` to cache" : ''
44
43
  print "Accessing Indico meeting API for #{name}:#{number}#{msg}"
45
44
  time = Benchmark.realtime do
46
- iris_meeting = Meetings.new(base_url, number)
45
+ iris_meeting = Meetings.new(base_url, number, timeout: timeout)
47
46
  @site.data[data_path][name] = iris_meeting.dict
48
47
  end
49
48
  puts ", took #{time.round(1)} s"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllIndico
4
- VERSION = '0.4.3'
4
+ VERSION = '0.4.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-indico
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henry Schreiner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-01 00:00:00.000000000 Z
11
+ date: 2022-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll