stylist 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/stylist.rb +7 -2
- data/lib/stylist/configuration.rb +3 -0
- data/lib/stylist/railtie.rb +2 -2
- data/lib/stylist/version.rb +1 -1
- data/stylist.gemspec +2 -2
- metadata +4 -4
data/lib/stylist.rb
CHANGED
@@ -9,9 +9,12 @@ require 'stylist/railtie' if defined?(::Rails) && ::Rails::VERSION::MAJOR >= 3
|
|
9
9
|
module Stylist
|
10
10
|
class << self
|
11
11
|
attr_accessor :stylesheets
|
12
|
+
|
13
|
+
def setup!
|
14
|
+
self.configuration = Configuration.new
|
15
|
+
self.stylesheets = StylesheetCollection.new
|
16
|
+
end
|
12
17
|
end
|
13
|
-
self.configuration = Configuration.new
|
14
|
-
self.stylesheets = StylesheetCollection.new
|
15
18
|
end
|
16
19
|
|
17
20
|
|
@@ -21,6 +24,8 @@ if defined? ::ActionController && defined? ::ActionView
|
|
21
24
|
end
|
22
25
|
|
23
26
|
if defined?(::Rails) && ::Rails::VERSION::MAJOR == 2
|
27
|
+
::Stylist.setup!
|
28
|
+
|
24
29
|
if defined? ::Haml
|
25
30
|
require 'stylist/processors/sass_processor'
|
26
31
|
::Stylist.configure { |config| config.process_with :sass }
|
@@ -44,6 +44,9 @@ module Stylist
|
|
44
44
|
if processor.is_a? Class
|
45
45
|
processor_class = processor
|
46
46
|
else
|
47
|
+
possible_processor_path = File.join(File.dirname(__FILE__), "processors/#{processor}_processor.rb")
|
48
|
+
require possible_processor_path if File.exists?(possible_processor_path)
|
49
|
+
|
47
50
|
class_name = processor.to_s.strip.camelize.sub(/(Processor)?$/, 'Processor')
|
48
51
|
processor_class = class_name.constantize rescue "::Stylist::Processors::#{class_name}".constantize
|
49
52
|
end
|
data/lib/stylist/railtie.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module Stylist
|
2
2
|
class Railtie < Rails::Railtie
|
3
|
-
railtie_name :stylist
|
4
|
-
|
5
3
|
initializer :configure_stylist_defaults, :before => :load_application_initializers do |app|
|
4
|
+
::Stylist.setup!
|
5
|
+
|
6
6
|
if defined? ::Haml
|
7
7
|
require 'stylist/processors/sass_processor'
|
8
8
|
::Stylist.configure { |config| config.process_with :sass }
|
data/lib/stylist/version.rb
CHANGED
data/stylist.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{stylist}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Tisho Georgiev"]
|
12
|
-
s.date = %q{2010-10-
|
12
|
+
s.date = %q{2010-10-25}
|
13
13
|
s.description = %q{Stylist provides powerful stylesheet management for your Rails app. You can organize your CSS files by media, add, remove or prepend stylesheets in the stylesheets stack from your controllers and views, and process them using Less or Sass. And as if that wasn't awesome enough, you can even minify them using YUI Compressor and bundle them into completely incomprehensible, but bandwidth-friendly mega-stylesheets.}
|
14
14
|
s.email = %q{tihomir.georgiev@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stylist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tisho Georgiev
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-25 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|