nutils 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,6 +16,9 @@ module Nutils
16
16
  #
17
17
  # @return [String] The filtered content
18
18
  def run(content, params={})
19
+
20
+ puts "You should use the Sass filter from nanoc 3.1.9 or later. This Sass filter (:zass) is deprecated."
21
+
19
22
  # Get options
20
23
  options = params.dup
21
24
  sass_filename = options[:filename] || (@item && @item[:content_filename])
@@ -25,14 +25,14 @@ module Nutils
25
25
  #
26
26
  # @return [Proc]
27
27
  def load_rules(filepath)
28
- # Monkey-patch to obtain the site configuration since nanoc 3.2
29
- if Gem.loaded_specs["nanoc3"].version >= Gem::Version.create('3.1') and Gem.loaded_specs["nanoc3"].version < Gem::Version.create('3.2')
30
- rules_dir = @site.config[:rules_dir] || ['.']
31
- elsif Gem.loaded_specs["nanoc3"].version >= Gem::Version.create('3.2')
32
- rules_dir = @rules_collection.instance_variable_get(:@compiler).instance_variable_get(:@site).config[:rules_dir] || ['.']
28
+ raise "You should upgrade to nanoc 3.2.1 to run the load_rules helper properly" if Gem.loaded_specs["nanoc3"].version == Gem::Version.create('3.2')
29
+
30
+ rules_dir = if Gem.loaded_specs["nanoc3"].version >= Gem::Version.create('3.1') and Gem.loaded_specs["nanoc3"].version < Gem::Version.create('3.2')
31
+ (@site.config[:rules_dir] || ['.'])
33
32
  else
34
- raise "The load_rules helper needs nanoc 3.1 or higher."
33
+ @config[:rules_dir] || ['.']
35
34
  end
35
+
36
36
 
37
37
 
38
38
  path = rules_dir.map do |dir|
data/lib/nutils.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Nutils
4
4
 
5
5
  # The current nutils version.
6
- VERSION = '0.9.0'
6
+ VERSION = '0.9.1'
7
7
 
8
8
  end
9
9
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nutils
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
4
+ hash: 57
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 0
10
- version: 0.9.0
9
+ - 1
10
+ version: 0.9.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Arnau Siches
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-25 00:00:00 -04:00
18
+ date: 2011-07-28 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency