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 +6 -0
- data/lib/sinatra/support/compasssupport.rb +15 -18
- data/lib/sinatra/support/version.rb +1 -1
- metadata +1 -1
data/HISTORY.md
CHANGED
@@ -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.
|
67
|
-
|
68
|
-
|
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
|
|