middleman-compass 4.0.0.alpha.3 → 4.0.0.beta.1

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: 30f83ae5546e59f90323055c0660271743b0349c
4
- data.tar.gz: 92a57acfa6a6583e0d4c82c11e563120cb8caf49
3
+ metadata.gz: a91b27049e163e53e7161737f06d7609b22a75ec
4
+ data.tar.gz: f40e123f0fd729beb730529d887447f5b7c17bf9
5
5
  SHA512:
6
- metadata.gz: bd0f8bb54cd767a8f1657ea3fba78ba002d842f5b46cadec8ea0fd6132c38cdd5e82bc99d2bcfd4ff0e2396fbd39c410904f2eb0cef2309ae6f720f8f727ba9c
7
- data.tar.gz: 697994856fe001ffe2eab930f9b6b70d83fb120dfd1da180debb0bda65605fbafe490e375927cdd1ecfda216c96af309311c39fe8fa01d1281767ed7b01871fd
6
+ metadata.gz: 6460aad0722d054367f391f37863be159cf2666f998ac053d0254ad6df7922a7468ff9246f9f6422676af0bdfa84aef1a3175bb11ddbe913554e42f42bf48a67
7
+ data.tar.gz: cd63fc549f2a2a2be1aa604fb10c81ec912a50b4e6b9e52c66f7406affb0928af73fd7ce8dd6d5e8c425cdcd54757b2dfb711513f311159b03829ce057cdc8f4
@@ -8,4 +8,4 @@ Feature: Support slim templating language
8
8
  When I go to "/sass.html"
9
9
  Then I should see "html, body, div"
10
10
  When I go to "/error.html"
11
- Then I should see "Syntax error"
11
+ Then I should see "Invalid CSS"
@@ -1,14 +1,26 @@
1
+ require 'middleman-core/renderers/sass'
2
+
1
3
  module Middleman
2
4
  class CompassExtension < Extension
3
5
  def initialize(app, options_hash={}, &block)
4
- require 'middleman-core/renderers/sass'
5
- require 'compass/core'
6
+ require 'compass'
7
+ @compass_config_callbacks = []
6
8
 
7
9
  super
10
+ end
11
+
12
+ def before_configuration
13
+ app.add_to_config_context :compass_config, &method(:compass_config)
14
+ end
8
15
 
9
- # Hooks to manually update the compass config after we're
10
- # done with it
11
- app.define_hook :compass_config
16
+ def compass_config(&block)
17
+ @compass_config_callbacks << block
18
+ end
19
+
20
+ def execute_compass_config_callbacks(config)
21
+ @compass_config_callbacks.each do |b|
22
+ instance_exec(config, &b)
23
+ end
12
24
  end
13
25
 
14
26
  def after_configuration
@@ -36,7 +48,7 @@ module Middleman
36
48
  end
37
49
 
38
50
  # Call hook
39
- app.run_hook_for :compass_config, app, ::Compass.configuration
51
+ execute_compass_config_callbacks(::Compass.configuration)
40
52
 
41
53
  # Tell Tilt to use it as well (for inline sass blocks)
42
54
  ::Tilt.register 'sass', CompassSassTemplate
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Compass
3
- VERSION = "4.0.0.alpha.3"
3
+ VERSION = "4.0.0.beta.1"
4
4
  end
5
5
  end
@@ -16,5 +16,5 @@ Gem::Specification.new do |s|
16
16
  s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
17
17
  s.require_paths = ["lib"]
18
18
  s.add_dependency("middleman-core", [">= 4.0.0.alpha.1"])
19
- s.add_dependency('compass-core', ['>= 1.0.0', '< 2.0.0'])
19
+ s.add_dependency('compass', ['>= 1.0.0', '< 2.0.0'])
20
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-compass
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.alpha.3
4
+ version: 4.0.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-12-23 00:00:00.000000000 Z
13
+ date: 2015-03-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: middleman-core
@@ -27,7 +27,7 @@ dependencies:
27
27
  - !ruby/object:Gem::Version
28
28
  version: 4.0.0.alpha.1
29
29
  - !ruby/object:Gem::Dependency
30
- name: compass-core
30
+ name: compass
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - ">="