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.
@@ -1,3 +1,3 @@
1
1
  module GemLiux2
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
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
- 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
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
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_liux2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - test1