middleman-releases 0.1.1 → 0.2.0
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 +11 -1
- data/middleman-releases.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0df7b6d2befa8e9db8de24d9e4da6b62c20f3451
|
4
|
+
data.tar.gz: 9ab21bbdece78ee6e279e684d313d3e3799f9629
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dc1a3a6d97a7ca03b80975464f47c0f8c40c48ce02bb64032454f22d256d9f797275fd476e0815d8e9cbd22475e68e71d614f777d2cd70edcc92a0e727cd283
|
7
|
+
data.tar.gz: 43e49b07fc1cd23e7faa77e94763ce6195fa6d1249988e01de7d5e2d580e48168047b2952ed21561efdafa71f4aa3fc0e3248b2b3519ffe8605eb61c53232f1e
|
data/lib/releases/extension.rb
CHANGED
@@ -16,8 +16,10 @@ module Releases
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def manipulate_resource_list(resources)
|
19
|
+
@_releases = []
|
20
|
+
|
19
21
|
resources.each do |resource|
|
20
|
-
if resource.path
|
22
|
+
if resource.path =~ %r{#{options[:releases_dir]}\/v.*\/index\.html}
|
21
23
|
layout = resource.metadata[:options].fetch(:layout, options[:layout]).to_s
|
22
24
|
resource.add_metadata(options: { layout: layout })
|
23
25
|
|
@@ -34,6 +36,14 @@ module Releases
|
|
34
36
|
def current_release
|
35
37
|
Releases::Instance.from(current_resource, self)
|
36
38
|
end
|
39
|
+
|
40
|
+
def releases
|
41
|
+
releases_controller.releases
|
42
|
+
end
|
43
|
+
|
44
|
+
def latest_release
|
45
|
+
releases.first
|
46
|
+
end
|
37
47
|
end
|
38
48
|
end
|
39
49
|
end
|
data/middleman-releases.gemspec
CHANGED