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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54e158274951958d7017fe5398150b09cf35070224e981dccb4805bcdd807497
4
- data.tar.gz: 597c2cfddcfd635af43844b8579c2b1d7d8c2346be4c8d021e699112eabbbc07
3
+ metadata.gz: 89d895ca28581125ec257abad4ecf6761b500203def27b8a98a0bef054bdf7f8
4
+ data.tar.gz: 762269bb9b3fddffcb3d2d52cdb269200cd5c1e8641ef9ab914c2787361019d6
5
5
  SHA512:
6
- metadata.gz: 48fce1705d096331df1b1020a6ac4a8e135872819c8edcad11a2f3b51765c1b9191684ed835c50bc305d39b7767a0a4089f4c8a768de59f05ce046b51487860c
7
- data.tar.gz: 1653808ff73ddfed237acdfa4e9a529bcd7ecb02e6e10be4dda34b53efbeca49db88e6fa7c88609fa7c49e0ac67579ccd47856751d9289bb9f50eedf966f776a
6
+ metadata.gz: 2f2604010d68b03050d2e8d8e6c4b8c0f7b8462add9345d2ff06fa2f9bb055451a34a0edb289177f8276b06d0db95b931344b7f083fcfd22c0077b99f1b771a2
7
+ data.tar.gz: 4e98996177ca5b62baa138b9ad60564f4e2543ac6f8199fdc0ba3e61ad292b1d1a85e1106798c77ca8ffe715102105c76b79c6128ced73862ba7fde96b20fc75
@@ -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
- @_releases = []
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
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "middleman-releases"
6
- s.version = "0.3.1"
6
+ s.version = "0.3.2"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Matt Millsaps-Brewer"]
9
9
  s.email = ["matt@madebylotus.com"]
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.1
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-02-24 00:00:00.000000000 Z
11
+ date: 2020-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core