gem_liux2 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gem_liux2/version.rb +1 -1
- data/lib/gem_liux2.rb +43 -7
- metadata +3 -3
data/lib/gem_liux2/version.rb
CHANGED
data/lib/gem_liux2.rb
CHANGED
@@ -1,9 +1,45 @@
|
|
1
|
+
# testcss_stylesheets_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'scss'))
|
2
|
+
# begin
|
3
|
+
# require 'compass'
|
4
|
+
# Compass::Frameworks.register('testcss', :stylesheets_directory => testcss_stylesheets_path)
|
5
|
+
# rescue LoadError
|
6
|
+
# # compass not found, register on the Sass path via the environment.
|
7
|
+
# require 'sass'
|
8
|
+
# ::Sass.load_paths << testcss_stylesheets_path
|
9
|
+
# end
|
10
|
+
|
1
11
|
testcss_stylesheets_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'scss'))
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
12
|
+
|
13
|
+
module gem_liux2
|
14
|
+
class << self
|
15
|
+
# Inspired by Kaminari
|
16
|
+
def load!
|
17
|
+
register_compass_extension if compass?
|
18
|
+
end
|
19
|
+
configure_sass
|
20
|
+
end
|
21
|
+
|
22
|
+
# Paths
|
23
|
+
|
24
|
+
# Environment detection helpers
|
25
|
+
|
26
|
+
def compass?
|
27
|
+
defined?(::Compass::Frameworks)
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def configure_sass
|
33
|
+
require 'sass'
|
34
|
+
::Sass.load_paths << testcss_stylesheets_path
|
35
|
+
end
|
36
|
+
|
37
|
+
def register_compass_extension
|
38
|
+
::Compass::Frameworks.register('testcss', :stylesheets_directory => testcss_stylesheets_path)
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
9
42
|
end
|
43
|
+
|
44
|
+
gem_liux2.load!
|
45
|
+
|
metadata
CHANGED