jekyll 3.9.2 → 3.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/commands/new.rb +3 -3
- data/lib/jekyll/utils/win_tz.rb +18 -47
- data/lib/jekyll/version.rb +1 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10ada5abfe77a61887f4915b1b5230a0b654d812bc8a6b628907e1bbc62c2b2a
|
4
|
+
data.tar.gz: 85f09cb1ecafab016ea53e305af4b774e9c14d78f4309830f1e99dcf59b19d7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c351db7593dd51d91404472a9a0acaa499a03e8f4512694bc7867c3b290b913a22d61aa04858ee6cc96d31d85f4b3c102d3ad1e055f0c2a4a45ca5d6960e21e6
|
7
|
+
data.tar.gz: 80ee7476d928d1f4d3ab88af5ee951026ee017fb3769a915136d25b097fccaef916705299588cd9718290e7bc852ecf1fb5bc8b492bb4e60e40c1f923d0eb38c
|
data/lib/jekyll/commands/new.rb
CHANGED
@@ -87,10 +87,10 @@ group :jekyll_plugins do
|
|
87
87
|
gem "jekyll-feed", "~> 0.6"
|
88
88
|
end
|
89
89
|
|
90
|
-
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
90
|
+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
91
91
|
# and associated library.
|
92
|
-
|
93
|
-
gem "tzinfo", "
|
92
|
+
platforms :mingw, :x64_mingw, :mswin, :jruby do
|
93
|
+
gem "tzinfo", ">= 1", "< 3"
|
94
94
|
gem "tzinfo-data"
|
95
95
|
end
|
96
96
|
|
data/lib/jekyll/utils/win_tz.rb
CHANGED
@@ -11,64 +11,35 @@ module Jekyll
|
|
11
11
|
# timezone - the IANA Time Zone specified in "_config.yml"
|
12
12
|
#
|
13
13
|
# Returns a string that ultimately re-defines ENV["TZ"] in Windows
|
14
|
-
def calculate(timezone)
|
14
|
+
def calculate(timezone, now = Time.now)
|
15
15
|
External.require_with_graceful_fail("tzinfo") unless defined?(TZInfo)
|
16
16
|
tz = TZInfo::Timezone.get(timezone)
|
17
|
-
|
17
|
+
|
18
|
+
#
|
19
|
+
# Use period_for_utc and utc_total_offset instead of
|
20
|
+
# period_for and observed_utc_offset for compatibility with tzinfo v1.
|
21
|
+
offset = tz.period_for_utc(now.getutc).utc_total_offset
|
22
|
+
|
18
23
|
#
|
19
24
|
# POSIX style definition reverses the offset sign.
|
20
25
|
# e.g. Eastern Standard Time (EST) that is 5Hrs. to the 'west' of Prime Meridian
|
21
26
|
# is denoted as:
|
22
27
|
# EST+5 (or) EST+05:00
|
23
|
-
# Reference:
|
24
|
-
sign =
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
28
|
+
# Reference: https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html
|
29
|
+
sign = offset.positive? ? "-" : "+"
|
30
|
+
|
31
|
+
rational_hours = offset.abs.to_r / 3600
|
32
|
+
hours = rational_hours.to_i
|
33
|
+
minutes = ((rational_hours - hours) * 60).to_i
|
34
|
+
|
30
35
|
#
|
31
|
-
# Format the
|
32
|
-
|
33
|
-
hh = format("%02d", absolute_hour(difference).ceil)
|
34
|
-
mm = modulo.zero? ? "00" : "30"
|
36
|
+
# Format the hours and minutes as two-digit numbers.
|
37
|
+
time = format("%<hours>02d:%<minutes>02d", :hours => hours, :minutes => minutes)
|
35
38
|
|
36
|
-
Jekyll.logger.debug "Timezone:", "#{timezone} #{
|
39
|
+
Jekyll.logger.debug "Timezone:", "#{timezone} #{sign}#{time}"
|
37
40
|
#
|
38
41
|
# Note: The 3-letter-word below doesn't have a particular significance.
|
39
|
-
"WTZ#{sign}#{
|
40
|
-
end
|
41
|
-
|
42
|
-
private
|
43
|
-
|
44
|
-
# Private: Convert given seconds to an hour as a rational number.
|
45
|
-
#
|
46
|
-
# seconds - supplied as an integer, it is converted to a rational number.
|
47
|
-
# 3600 - no. of seconds in an hour.
|
48
|
-
#
|
49
|
-
# Returns a rational number.
|
50
|
-
def rational_hour(seconds)
|
51
|
-
seconds.to_r / 3600
|
52
|
-
end
|
53
|
-
|
54
|
-
# Private: Convert given seconds to an hour as an absolute number.
|
55
|
-
#
|
56
|
-
# seconds - supplied as an integer, it is converted to its absolute.
|
57
|
-
# 3600 - no. of seconds in an hour.
|
58
|
-
#
|
59
|
-
# Returns an integer.
|
60
|
-
def absolute_hour(seconds)
|
61
|
-
seconds.abs / 3600
|
62
|
-
end
|
63
|
-
|
64
|
-
# Private: Perform a modulo operation on a given fraction.
|
65
|
-
#
|
66
|
-
# fraction - supplied as a rational number, its numerator is divided
|
67
|
-
# by its denominator and the remainder returned.
|
68
|
-
#
|
69
|
-
# Returns an integer.
|
70
|
-
def modulo_of(fraction)
|
71
|
-
fraction.numerator % fraction.denominator
|
42
|
+
"WTZ#{sign}#{time}"
|
72
43
|
end
|
73
44
|
end
|
74
45
|
end
|
data/lib/jekyll/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.9.
|
4
|
+
version: 3.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -56,16 +56,22 @@ dependencies:
|
|
56
56
|
name: i18n
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0.7'
|
62
|
+
- - "<"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '2'
|
62
65
|
type: :runtime
|
63
66
|
prerelease: false
|
64
67
|
version_requirements: !ruby/object:Gem::Requirement
|
65
68
|
requirements:
|
66
|
-
- - "
|
69
|
+
- - ">="
|
67
70
|
- !ruby/object:Gem::Version
|
68
71
|
version: '0.7'
|
72
|
+
- - "<"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '2'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: jekyll-sass-converter
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -318,7 +324,7 @@ homepage: https://github.com/jekyll/jekyll
|
|
318
324
|
licenses:
|
319
325
|
- MIT
|
320
326
|
metadata: {}
|
321
|
-
post_install_message:
|
327
|
+
post_install_message:
|
322
328
|
rdoc_options:
|
323
329
|
- "--charset=UTF-8"
|
324
330
|
require_paths:
|
@@ -335,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
335
341
|
version: '0'
|
336
342
|
requirements: []
|
337
343
|
rubygems_version: 3.1.6
|
338
|
-
signing_key:
|
344
|
+
signing_key:
|
339
345
|
specification_version: 2
|
340
346
|
summary: A simple, blog aware, static site generator.
|
341
347
|
test_files: []
|