octopress-filters 1.3.1 → 1.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
  SHA1:
3
- metadata.gz: 1955e98b8804cc22528ffe9e924dd6db68163355
4
- data.tar.gz: a9fe1297542dbb3bf019cc6e768fb1a4be902037
3
+ metadata.gz: 0a82e06b7ca901a3273ab3016fdc6b4f6fee008c
4
+ data.tar.gz: b9cbd92d04f3421a3f4be54ef80c8da1766d0118
5
5
  SHA512:
6
- metadata.gz: 441a6d867a390f708079841c5840fd6f0a4c7c12e4d75901cfbe83736077b20e9acf3354137d57c701272d366343494ff838969373ce3dae5e8e0bae81042b8c
7
- data.tar.gz: 2818cf1f897789e53b556a4852f76c42954c5eaaae1b1e985c302d51520bc78a586564fe9f22ccab2932a651ca9346626f577c0cbe2d5478b3b30193bf26f33d
6
+ metadata.gz: 8f8912a3e45e33547c31b11b872f6b126e6064b5d006467168989737aa3011decfdc16735dd4662375a7a3bd4f0bf98a638c652f0b4d007f8979d9bf44b156e7
7
+ data.tar.gz: 4253508e1e4649330b058a32f1e56897707beb3cf8f3cedc18984efe3ddc673e08618b55d24e1522070519fca4f7150b125bc73ddfb09b09bc0523ef5c0c8b91
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.3.2 - 2015-02-14
4
+
5
+ - Fix: Ensure site instance is available before hooks trigger.
6
+
3
7
  ### 1.3.1 - 2015-02-14
4
8
 
5
9
  - Fix: issue with access to site instance.
@@ -7,6 +7,15 @@ module Octopress
7
7
  module Filters
8
8
  attr_accessor :site
9
9
 
10
+ # If filters are called before hooks, use Octopress.site if available
11
+ def site
12
+ if defined?(Octopress.site)
13
+ Octopress.site
14
+ else
15
+ @site
16
+ end
17
+ end
18
+
10
19
  # Returns the site's baseurl or '/' if the config isn't set
11
20
  #
12
21
  def root
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Filters
3
- VERSION = "1.3.1"
3
+ VERSION = "1.3.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-filters
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis