middleman-releases 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/releases/extension.rb +10 -1
- data/middleman-releases.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89d895ca28581125ec257abad4ecf6761b500203def27b8a98a0bef054bdf7f8
|
4
|
+
data.tar.gz: 762269bb9b3fddffcb3d2d52cdb269200cd5c1e8641ef9ab914c2787361019d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f2604010d68b03050d2e8d8e6c4b8c0f7b8462add9345d2ff06fa2f9bb055451a34a0edb289177f8276b06d0db95b931344b7f083fcfd22c0077b99f1b771a2
|
7
|
+
data.tar.gz: 4e98996177ca5b62baa138b9ad60564f4e2543ac6f8199fdc0ba3e61ad292b1d1a85e1106798c77ca8ffe715102105c76b79c6128ced73862ba7fde96b20fc75
|
data/lib/releases/extension.rb
CHANGED
@@ -3,6 +3,7 @@ module Releases
|
|
3
3
|
option :layout, 'release', 'Layout for rendering an individual release'
|
4
4
|
option :releases_dir, 'releases', 'Directory containing releases'
|
5
5
|
option :new_release_template, File.expand_path('../commands/release.tt', __FILE__), 'Path (relative to project root) to an ERb template that will be used to generate new software releases from the "middleman release" command.'
|
6
|
+
option :time_zone, 'UTC', 'Time Zone for timestamps provided'
|
6
7
|
|
7
8
|
expose_to_template :releases, :latest_release
|
8
9
|
|
@@ -12,6 +13,8 @@ module Releases
|
|
12
13
|
|
13
14
|
def after_configuration
|
14
15
|
@_releases = []
|
16
|
+
|
17
|
+
determine_time_zone
|
15
18
|
end
|
16
19
|
|
17
20
|
def releases
|
@@ -23,7 +26,7 @@ module Releases
|
|
23
26
|
end
|
24
27
|
|
25
28
|
def manipulate_resource_list(resources)
|
26
|
-
|
29
|
+
after_configuration
|
27
30
|
|
28
31
|
resources.each do |resource|
|
29
32
|
if resource.path =~ %r{#{options[:releases_dir]}\/v.*\/index\.html}
|
@@ -75,5 +78,11 @@ module Releases
|
|
75
78
|
Middleman::Sitemap::ProxyResource.new(app.sitemap, target, asset.path)
|
76
79
|
end
|
77
80
|
end
|
81
|
+
|
82
|
+
def determine_time_zone
|
83
|
+
options[:time_zone].tap do |tz|
|
84
|
+
Time.zone = tz if Time.zone.blank? && tz.present?
|
85
|
+
end
|
86
|
+
end
|
78
87
|
end
|
79
88
|
end
|
data/middleman-releases.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-releases
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Millsaps-Brewer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|