sinatra-support 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/HISTORY.md CHANGED
@@ -1,3 +1,9 @@
1
+ v1.1.2 - May 27, 2011
2
+ ---------------------
3
+
4
+ ### Changed:
5
+ * Revise CompassSupport to not use config files (instead just use Compass.configuration)
6
+
1
7
  v1.1.1 - May 27, 2011
2
8
  ---------------------
3
9
 
@@ -20,10 +20,6 @@
20
20
  # more-complicated example:
21
21
  #
22
22
  # class Main
23
- # # This line below is optional (it defaults to `config/compass.config`;
24
- # # in fact, it doesn't need to exist):
25
- # set :compass_config_file, File.join(root, 'config/compass.conf')
26
- #
27
23
  # register Sinatra::CompassSupport
28
24
  #
29
25
  # get '/' do
@@ -35,11 +31,19 @@
35
31
  #
36
32
  # @import 'compass/css3';
37
33
  #
38
- # Then copy +compass.config+ into +config/compass.conf+ from
39
- # https://github.com/chriseppstein/compass-sinatra/blob/master/config/compass.config
40
- #
41
34
  # == Caveats
42
35
  #
36
+ # When When using with {Sinatra::CssSupport}, you may need to change Compass's
37
+ # +sass_dir+ config to where you're serving CSS files from.
38
+ #
39
+ # path = File.join(app.root, 'css')
40
+ #
41
+ # serve_css '/css', from: path
42
+ #
43
+ # Compass.configuration do |c|
44
+ # c.sass_dir = path
45
+ # end
46
+ #
43
47
  # If you are getting errors about Sass functions, you may need to upgrade your
44
48
  # HAML and Sass gems.
45
49
  #
@@ -58,23 +62,16 @@ module Sinatra::CompassSupport
58
62
  require 'compass'
59
63
 
60
64
  add_compass_engine_options app
61
- set_default_compass_config app
62
- load_compass_config app
63
65
  end
64
66
 
65
67
  private
66
- def self.set_default_compass_config(app)
67
- unless app.respond_to?(:compass_config_file)
68
- app.set :compass_config_file, File.join(*[app.root, 'config', 'compass.config'].compact)
68
+ def self.lol(app)
69
+ Compass.configuration do |c|
70
+ c.project_path = app.root
71
+ c.sass_dir = app.views
69
72
  end
70
73
  end
71
74
 
72
- def self.load_compass_config(app)
73
- file = app.compass_config_file
74
-
75
- Compass.add_project_configuration(file) if File.exists?(file)
76
- end
77
-
78
75
  def self.add_compass_engine_options(app)
79
76
  options = Compass.sass_engine_options
80
77
 
@@ -1,6 +1,6 @@
1
1
  module Sinatra
2
2
  module Support
3
- VERSION = "1.1.1"
3
+ VERSION = "1.1.2"
4
4
 
5
5
  def self.version
6
6
  VERSION
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: sinatra-support
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.1.1
5
+ version: 1.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Cyril David