stylist 0.1.0
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/.document +5 -0
- data/.gitignore +12 -0
- data/LICENSE +20 -0
- data/README.md +236 -0
- data/Rakefile +82 -0
- data/init.rb +1 -0
- data/lib/stylist/configuration.rb +56 -0
- data/lib/stylist/controller_mixin.rb +19 -0
- data/lib/stylist/processor.rb +35 -0
- data/lib/stylist/processors/less_processor.rb +42 -0
- data/lib/stylist/processors/sass_processor.rb +41 -0
- data/lib/stylist/processors/yui_compressor_processor.rb +62 -0
- data/lib/stylist/railtie.rb +17 -0
- data/lib/stylist/stylesheet_collection.rb +92 -0
- data/lib/stylist/version.rb +9 -0
- data/lib/stylist/view_helpers.rb +14 -0
- data/lib/stylist.rb +33 -0
- data/rails/init.rb +4 -0
- data/spec/configuration_spec.rb +16 -0
- data/spec/controllers/controller_mixin_spec.rb +22 -0
- data/spec/controllers/view_helpers_spec.rb +73 -0
- data/spec/fixtures/public/stylesheets/base.css +0 -0
- data/spec/fixtures/public/stylesheets/home.css +0 -0
- data/spec/fixtures/public/stylesheets/layout.css +0 -0
- data/spec/fixtures/public/stylesheets/typography.css +0 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +37 -0
- data/spec/stylesheet_collection_spec.rb +123 -0
- data/spec/support/application_controller.rb +3 -0
- data/spec/support/boot_rails2.rb +8 -0
- data/spec/support/boot_rails3.rb +7 -0
- data/stylist.gemspec +85 -0
- metadata +127 -0
@@ -0,0 +1,92 @@
|
|
1
|
+
module Stylist
|
2
|
+
class StylesheetCollection
|
3
|
+
attr_reader :collection
|
4
|
+
|
5
|
+
def configuration; ::Stylist.configuration; end
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
reset!
|
9
|
+
end
|
10
|
+
|
11
|
+
def reset!
|
12
|
+
@collection = ::ActiveSupport::OrderedHash.new { |h, k| h[k] = [] }
|
13
|
+
end
|
14
|
+
|
15
|
+
def default
|
16
|
+
@collection[configuration.default_media]
|
17
|
+
end
|
18
|
+
|
19
|
+
def append(*args)
|
20
|
+
options = args.extract_options!.symbolize_keys!
|
21
|
+
media = options.delete(:media) || configuration.default_media
|
22
|
+
|
23
|
+
@collection[media] |= args.flatten.compact
|
24
|
+
self
|
25
|
+
end
|
26
|
+
|
27
|
+
alias_method :<<, :append
|
28
|
+
alias_method :push, :append
|
29
|
+
|
30
|
+
def prepend(*args)
|
31
|
+
options = args.extract_options!.symbolize_keys!
|
32
|
+
media = options.delete(:media) || configuration.default_media
|
33
|
+
|
34
|
+
@collection[media] = args.flatten.compact | @collection[media]
|
35
|
+
self
|
36
|
+
end
|
37
|
+
|
38
|
+
def remove(*args)
|
39
|
+
options = args.extract_options!.symbolize_keys!
|
40
|
+
media = options.delete(:media) || configuration.default_media
|
41
|
+
|
42
|
+
@collection[media] -= args
|
43
|
+
self
|
44
|
+
end
|
45
|
+
|
46
|
+
def manipulate(*args)
|
47
|
+
return self if args.empty?
|
48
|
+
|
49
|
+
options = args.extract_options!.symbolize_keys!
|
50
|
+
media = options.delete(:media) || configuration.default_media
|
51
|
+
|
52
|
+
args.flatten.compact.each do |stylesheet|
|
53
|
+
name_as_string = stylesheet.to_s.clone
|
54
|
+
stylesheet = filtered_stylesheet_name(stylesheet)
|
55
|
+
|
56
|
+
case
|
57
|
+
when name_as_string.starts_with?('+')
|
58
|
+
append(stylesheet, :media => media)
|
59
|
+
when name_as_string.ends_with?('+')
|
60
|
+
prepend(stylesheet, :media => media)
|
61
|
+
when name_as_string.starts_with?('-')
|
62
|
+
remove(stylesheet, :media => media)
|
63
|
+
else
|
64
|
+
append(stylesheet, :media => media)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
self
|
69
|
+
end
|
70
|
+
|
71
|
+
def filtered_stylesheet_name(stylesheet)
|
72
|
+
name = stylesheet.to_s
|
73
|
+
name.gsub!(/^[+-]*/, '').gsub!(/[+-]*$/, '')
|
74
|
+
|
75
|
+
return stylesheet.is_a?(Symbol) ? name.to_sym : name
|
76
|
+
end
|
77
|
+
|
78
|
+
def process!
|
79
|
+
configuration.processors.each { |processor| processor.process!(@collection) }
|
80
|
+
end
|
81
|
+
|
82
|
+
# by default, route missing methods to the collection hash
|
83
|
+
# otherwise hit the :all array
|
84
|
+
def method_missing(name, *args, &block)
|
85
|
+
if @collection.respond_to? name
|
86
|
+
@collection.send(name, *args, &block)
|
87
|
+
else
|
88
|
+
@collection[:all].send(name, *args, &block)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Stylist
|
2
|
+
module ViewHelpers
|
3
|
+
def render_stylesheets
|
4
|
+
Stylist.stylesheets.process!
|
5
|
+
html = Stylist.stylesheets.inject('') do |html, (media, stylesheets)|
|
6
|
+
html << stylesheet_link_tag(*(stylesheets +
|
7
|
+
[ :media => media.to_s,
|
8
|
+
:recursive => true,
|
9
|
+
:cache => "all-#{stylesheets.hash.to_s}" ]))
|
10
|
+
end
|
11
|
+
html.respond_to?(:html_safe) ? html.html_safe : html
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/stylist.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'stylist/version'
|
2
|
+
require 'stylist/configuration'
|
3
|
+
require 'stylist/processor'
|
4
|
+
require 'stylist/stylesheet_collection'
|
5
|
+
require 'stylist/controller_mixin'
|
6
|
+
require 'stylist/view_helpers'
|
7
|
+
require 'stylist/railtie' if defined?(::Rails) && ::Rails::VERSION::MAJOR >= 3
|
8
|
+
|
9
|
+
module Stylist
|
10
|
+
class << self
|
11
|
+
attr_accessor :stylesheets
|
12
|
+
end
|
13
|
+
self.configuration = Configuration.new
|
14
|
+
self.stylesheets = StylesheetCollection.new
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
if defined? ::ActionController && defined? ::ActionView
|
19
|
+
::ActionController::Base.send :include, ::Stylist::ControllerMixin
|
20
|
+
::ActionView::Base.send :include, ::Stylist::ViewHelpers
|
21
|
+
end
|
22
|
+
|
23
|
+
if defined?(::Rails) && ::Rails::VERSION::MAJOR == 2
|
24
|
+
if defined? ::Haml
|
25
|
+
require 'stylist/processors/sass_processor'
|
26
|
+
::Stylist.configure { |config| config.process_with :sass }
|
27
|
+
end
|
28
|
+
|
29
|
+
if defined? ::Less
|
30
|
+
require 'stylist/processors/less_processor'
|
31
|
+
::Stylist.configure { |config| config.process_with :less }
|
32
|
+
end
|
33
|
+
end
|
data/rails/init.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'stylist'
|
3
|
+
|
4
|
+
describe Stylist::Configuration do
|
5
|
+
before(:each) do
|
6
|
+
@configuration = ::Stylist::Configuration.new
|
7
|
+
end
|
8
|
+
|
9
|
+
context '#add_configuration_options_for' do
|
10
|
+
it 'should create a new group in the configuration with options passed as a hash' do
|
11
|
+
@configuration.add_option_group :some_group, { :test_option => 'test', :second_option => 'second' }
|
12
|
+
@configuration.some_group.test_option.should == 'test'
|
13
|
+
@configuration.some_group.second_option.should == 'second'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '..', 'spec_helper')
|
2
|
+
|
3
|
+
require 'stylist'
|
4
|
+
class DummyController < ApplicationController; def index; render :nothing => true; end; end
|
5
|
+
ActionController::Routing::Routes.draw { |map| map.resources :dummy } if rails2?
|
6
|
+
|
7
|
+
describe Stylist::ControllerMixin do
|
8
|
+
|
9
|
+
describe DummyController, :type => :controller do
|
10
|
+
it 'should be included in controllers' do
|
11
|
+
get :index
|
12
|
+
included_modules = (class << controller; self; end).send :included_modules
|
13
|
+
included_modules.should include(Stylist::ControllerMixin)
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should be able to manipulate the stylesheet collection using the "css" method' do
|
17
|
+
get :index
|
18
|
+
controller.css :home
|
19
|
+
Stylist.stylesheets.default.should include(:home)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '..', 'spec_helper')
|
2
|
+
require 'stylist'
|
3
|
+
|
4
|
+
class DummyController < ApplicationController; def index; render :inline => "<%= render_stylesheets %>"; end; end
|
5
|
+
|
6
|
+
# Make sure we're not caching any assets
|
7
|
+
ActionController::Base.perform_caching = false
|
8
|
+
|
9
|
+
describe Stylist::ViewHelpers do
|
10
|
+
describe DummyController, :type => :controller do
|
11
|
+
before(:all) do
|
12
|
+
silence_warnings do
|
13
|
+
ActionView::Helpers::AssetTagHelper.send(
|
14
|
+
:const_set,
|
15
|
+
:STYLESHEETS_DIR,
|
16
|
+
File.dirname(__FILE__) + "/../fixtures/public/stylesheets"
|
17
|
+
)
|
18
|
+
|
19
|
+
ActionView::Helpers::AssetTagHelper.send(
|
20
|
+
:const_set,
|
21
|
+
:ASSETS_DIR,
|
22
|
+
File.dirname(__FILE__) + "/../fixtures/public"
|
23
|
+
)
|
24
|
+
|
25
|
+
ActionView::DEFAULT_CONFIG = {
|
26
|
+
:assets_dir => File.dirname(__FILE__) + "/../fixtures/public",
|
27
|
+
:javascripts_dir => "#{File.dirname(__FILE__) + "/../fixtures/public"}/javascripts",
|
28
|
+
:stylesheets_dir => "#{File.dirname(__FILE__) + "/../fixtures/public"}/stylesheets",
|
29
|
+
}
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '#render_stylesheets' do
|
34
|
+
before(:each) do
|
35
|
+
@collection = Stylist.stylesheets = Stylist::StylesheetCollection.new
|
36
|
+
end
|
37
|
+
|
38
|
+
context 'when collection is a list of files' do
|
39
|
+
it 'should render the <link> tags for each file' do
|
40
|
+
@collection << ['base', 'home']
|
41
|
+
|
42
|
+
response = ::ActionView::Base.new.render_stylesheets
|
43
|
+
response.should have_xpath('//link[starts-with(@href, "/stylesheets/base.css")]')
|
44
|
+
response.should have_xpath('//link[starts-with(@href, "/stylesheets/home.css")]')
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
context 'when collection is a list of expansions' do
|
49
|
+
it 'should render the <link> tags for each file in the expansion' do
|
50
|
+
ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :standard => ['base', 'home']
|
51
|
+
@collection << :standard
|
52
|
+
|
53
|
+
response = ::ActionView::Base.new.render_stylesheets
|
54
|
+
response.should have_xpath('//link[starts-with(@href, "/stylesheets/base.css")]')
|
55
|
+
response.should have_xpath('//link[starts-with(@href, "/stylesheets/home.css")]')
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
context 'when collection is a mix of expansions and filenames' do
|
60
|
+
it 'should render the <link> tags for each file and expansion in the collection' do
|
61
|
+
ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :standard => ['base', 'home']
|
62
|
+
@collection << [:standard, 'layout', 'typography']
|
63
|
+
|
64
|
+
response = ::ActionView::Base.new.render_stylesheets
|
65
|
+
response.should have_xpath('//link[starts-with(@href, "/stylesheets/base.css")]')
|
66
|
+
response.should have_xpath('//link[starts-with(@href, "/stylesheets/home.css")]')
|
67
|
+
response.should have_xpath('//link[starts-with(@href, "/stylesheets/layout.css")]')
|
68
|
+
response.should have_xpath('//link[starts-with(@href, "/stylesheets/typography.css")]')
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
4
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'support'))
|
5
|
+
|
6
|
+
RAILS_VERSION = (ENV['RAILS_VERSION'] || 2).to_s unless defined? RAILS_VERSION
|
7
|
+
if RAILS_VERSION =~ /^3/
|
8
|
+
require 'boot_rails3'
|
9
|
+
else
|
10
|
+
require 'boot_rails2'
|
11
|
+
end
|
12
|
+
|
13
|
+
def rails3?; RAILS_VERSION =~ /^3/ end
|
14
|
+
def rails2?; !rails3?; end
|
15
|
+
|
16
|
+
# plugin_root = File.join(File.dirname(__FILE__), '..')
|
17
|
+
# version = ENV['RAILS_VERSION']
|
18
|
+
# version = nil if version and version == ""
|
19
|
+
#
|
20
|
+
# # first look for a symlink to a copy of the framework
|
21
|
+
# if !version and framework_root = ["#{plugin_root}/rails", "#{plugin_root}/../../rails"].find { |p| File.directory? p }
|
22
|
+
# puts "found framework root: #{framework_root}"
|
23
|
+
# # this allows for a plugin to be tested outside of an app and without Rails gems
|
24
|
+
# # $:.unshift "#{framework_root}"
|
25
|
+
# $:.unshift "#{framework_root}/activesupport/lib", "#{framework_root}/actionpack/lib", "#{framework_root}/railties/lib"
|
26
|
+
# $:.unshift "#{framework_root}/active_support/lib", "#{framework_root}/action_pack/lib", "#{framework_root}/railties/lib"
|
27
|
+
# else
|
28
|
+
# # simply use installed gems if available
|
29
|
+
# puts "using Rails#{version ? ' ' + version : nil} gems"
|
30
|
+
# require 'rubygems'
|
31
|
+
#
|
32
|
+
# if version
|
33
|
+
# gem 'rails', version
|
34
|
+
# else
|
35
|
+
# gem 'actionpack'
|
36
|
+
# end
|
37
|
+
# end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'stylist/stylesheet_collection'
|
3
|
+
|
4
|
+
describe Stylist::StylesheetCollection do
|
5
|
+
before(:each) do
|
6
|
+
@collection = Stylist::StylesheetCollection.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should be able to store stylesheet names' do
|
10
|
+
@collection << :standard
|
11
|
+
@collection.default.should include(:standard)
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should automatically flatten arrays if any are passed as an argument' do
|
15
|
+
@collection << [[:standard, [:nested]]]
|
16
|
+
@collection.default.should == [:standard, :nested]
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should not add nil values if any are passed as an argument' do
|
20
|
+
@collection << nil
|
21
|
+
@collection.default.should_not include(nil)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should not allow duplicates in stylesheet arrays' do
|
25
|
+
@collection << :standard
|
26
|
+
@collection << :standard
|
27
|
+
@collection.default.should have(1).stylesheet
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should be able to chain calls' do
|
31
|
+
@collection.append(:standard, :base).prepend(:home).remove(:standard)
|
32
|
+
@collection.default.should == [:home, :base]
|
33
|
+
end
|
34
|
+
|
35
|
+
describe '#append' do
|
36
|
+
it 'should add a stylesheet to the end of the array' do
|
37
|
+
@collection.push :home, :base
|
38
|
+
@collection.append :standard
|
39
|
+
@collection.default.last.should == :standard
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'should add a stylesheet to the specified media array when passed as an argument' do
|
43
|
+
@collection.push :home, :base
|
44
|
+
@collection.append :standard, :media => :print
|
45
|
+
@collection[:print].should == [:standard]
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe '#prepend' do
|
50
|
+
it 'should add a stylesheet to the beginning of the array' do
|
51
|
+
@collection.push :home, :base
|
52
|
+
@collection.prepend :standard
|
53
|
+
@collection.default.first.should == :standard
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'should add a stylesheet to the beginning of the specified media array when passed as an argument' do
|
57
|
+
@collection.push :home, :base, :media => :print
|
58
|
+
@collection.prepend :standard, :media => :print
|
59
|
+
@collection[:print].should == [:standard, :home, :base]
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
describe '#remove' do
|
64
|
+
it 'should remove a stylesheet from the default collection when invoked without :media argument' do
|
65
|
+
@collection.append :home, :base
|
66
|
+
@collection.remove :home
|
67
|
+
|
68
|
+
@collection.default.should == [:base]
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'should remove a stylesheet only from the specified media array when passed as an argument' do
|
72
|
+
@collection.append :home, :base, :standard
|
73
|
+
@collection.append :standard, :media => :print
|
74
|
+
|
75
|
+
@collection.remove :standard, :media => :print
|
76
|
+
@collection.default.should == [:home, :base, :standard]
|
77
|
+
@collection[:print].should be_empty
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
describe '#manipulate' do
|
82
|
+
it 'should append stylesheets by default' do
|
83
|
+
@collection.manipulate :standard, :home
|
84
|
+
@collection.default.should == [:standard, :home]
|
85
|
+
end
|
86
|
+
|
87
|
+
it 'should append stylesheets if name is a string that starts with a + sign' do
|
88
|
+
@collection.manipulate '+standard'
|
89
|
+
@collection.default.should == ['standard']
|
90
|
+
end
|
91
|
+
|
92
|
+
it 'should append stylesheets if name is a symbol that starts with a + sign' do
|
93
|
+
@collection.manipulate :'+standard'
|
94
|
+
@collection.default.should == [:standard]
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'should prepend stylesheets if name is a string that ends with a + sign' do
|
98
|
+
@collection.append :base, :home
|
99
|
+
@collection.manipulate 'standard+'
|
100
|
+
@collection.default.first.should == 'standard'
|
101
|
+
end
|
102
|
+
|
103
|
+
it 'should prepend stylesheets if name is a symbol that ends with a + sign' do
|
104
|
+
@collection.append :base, :home
|
105
|
+
@collection.manipulate :'standard+'
|
106
|
+
@collection.default.first.should == :standard
|
107
|
+
end
|
108
|
+
|
109
|
+
it 'should remove stylesheet if name is a string that starts with a - sign' do
|
110
|
+
@collection.append 'base', :home
|
111
|
+
|
112
|
+
@collection.manipulate '-base'
|
113
|
+
@collection.default.should == [:home]
|
114
|
+
end
|
115
|
+
|
116
|
+
it 'should remove stylesheet if name is a symbol that starts with a - sign' do
|
117
|
+
@collection.append :base, :home
|
118
|
+
|
119
|
+
@collection.manipulate :'-base'
|
120
|
+
@collection.default.should == [:home]
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
data/stylist.gemspec
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{stylist}
|
8
|
+
s.version = "0.1.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Tisho Georgiev"]
|
12
|
+
s.date = %q{2010-03-30}
|
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
|
+
s.email = %q{tihomir.georgiev@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.md",
|
24
|
+
"Rakefile",
|
25
|
+
"init.rb",
|
26
|
+
"lib/stylist.rb",
|
27
|
+
"lib/stylist/configuration.rb",
|
28
|
+
"lib/stylist/controller_mixin.rb",
|
29
|
+
"lib/stylist/processor.rb",
|
30
|
+
"lib/stylist/processors/less_processor.rb",
|
31
|
+
"lib/stylist/processors/sass_processor.rb",
|
32
|
+
"lib/stylist/processors/yui_compressor_processor.rb",
|
33
|
+
"lib/stylist/railtie.rb",
|
34
|
+
"lib/stylist/stylesheet_collection.rb",
|
35
|
+
"lib/stylist/version.rb",
|
36
|
+
"lib/stylist/view_helpers.rb",
|
37
|
+
"rails/init.rb",
|
38
|
+
"spec/configuration_spec.rb",
|
39
|
+
"spec/controllers/controller_mixin_spec.rb",
|
40
|
+
"spec/controllers/view_helpers_spec.rb",
|
41
|
+
"spec/fixtures/public/stylesheets/base.css",
|
42
|
+
"spec/fixtures/public/stylesheets/home.css",
|
43
|
+
"spec/fixtures/public/stylesheets/layout.css",
|
44
|
+
"spec/fixtures/public/stylesheets/typography.css",
|
45
|
+
"spec/spec.opts",
|
46
|
+
"spec/spec_helper.rb",
|
47
|
+
"spec/stylesheet_collection_spec.rb",
|
48
|
+
"spec/support/application_controller.rb",
|
49
|
+
"spec/support/boot_rails2.rb",
|
50
|
+
"spec/support/boot_rails3.rb",
|
51
|
+
"stylist.gemspec"
|
52
|
+
]
|
53
|
+
s.homepage = %q{http://github.com/tisho/stylist}
|
54
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
55
|
+
s.require_paths = ["lib"]
|
56
|
+
s.rubygems_version = %q{1.3.6}
|
57
|
+
s.summary = %q{Powerful stylesheet management for your Rails app.}
|
58
|
+
s.test_files = [
|
59
|
+
"spec/configuration_spec.rb",
|
60
|
+
"spec/controllers/controller_mixin_spec.rb",
|
61
|
+
"spec/controllers/view_helpers_spec.rb",
|
62
|
+
"spec/spec_helper.rb",
|
63
|
+
"spec/stylesheet_collection_spec.rb",
|
64
|
+
"spec/support/application_controller.rb",
|
65
|
+
"spec/support/boot_rails2.rb",
|
66
|
+
"spec/support/boot_rails3.rb"
|
67
|
+
]
|
68
|
+
|
69
|
+
if s.respond_to? :specification_version then
|
70
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
71
|
+
s.specification_version = 3
|
72
|
+
|
73
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
74
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
75
|
+
s.add_development_dependency(%q<rails>, [">= 2.3"])
|
76
|
+
else
|
77
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
78
|
+
s.add_dependency(%q<rails>, [">= 2.3"])
|
79
|
+
end
|
80
|
+
else
|
81
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
82
|
+
s.add_dependency(%q<rails>, [">= 2.3"])
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
metadata
ADDED
@@ -0,0 +1,127 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: stylist
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
version: 0.1.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Tisho Georgiev
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-03-30 00:00:00 +03:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: rspec
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 2
|
30
|
+
- 9
|
31
|
+
version: 1.2.9
|
32
|
+
type: :development
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: rails
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 2
|
43
|
+
- 3
|
44
|
+
version: "2.3"
|
45
|
+
type: :development
|
46
|
+
version_requirements: *id002
|
47
|
+
description: 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.
|
48
|
+
email: tihomir.georgiev@gmail.com
|
49
|
+
executables: []
|
50
|
+
|
51
|
+
extensions: []
|
52
|
+
|
53
|
+
extra_rdoc_files:
|
54
|
+
- LICENSE
|
55
|
+
- README.md
|
56
|
+
files:
|
57
|
+
- .document
|
58
|
+
- .gitignore
|
59
|
+
- LICENSE
|
60
|
+
- README.md
|
61
|
+
- Rakefile
|
62
|
+
- init.rb
|
63
|
+
- lib/stylist.rb
|
64
|
+
- lib/stylist/configuration.rb
|
65
|
+
- lib/stylist/controller_mixin.rb
|
66
|
+
- lib/stylist/processor.rb
|
67
|
+
- lib/stylist/processors/less_processor.rb
|
68
|
+
- lib/stylist/processors/sass_processor.rb
|
69
|
+
- lib/stylist/processors/yui_compressor_processor.rb
|
70
|
+
- lib/stylist/railtie.rb
|
71
|
+
- lib/stylist/stylesheet_collection.rb
|
72
|
+
- lib/stylist/version.rb
|
73
|
+
- lib/stylist/view_helpers.rb
|
74
|
+
- rails/init.rb
|
75
|
+
- spec/configuration_spec.rb
|
76
|
+
- spec/controllers/controller_mixin_spec.rb
|
77
|
+
- spec/controllers/view_helpers_spec.rb
|
78
|
+
- spec/fixtures/public/stylesheets/base.css
|
79
|
+
- spec/fixtures/public/stylesheets/home.css
|
80
|
+
- spec/fixtures/public/stylesheets/layout.css
|
81
|
+
- spec/fixtures/public/stylesheets/typography.css
|
82
|
+
- spec/spec.opts
|
83
|
+
- spec/spec_helper.rb
|
84
|
+
- spec/stylesheet_collection_spec.rb
|
85
|
+
- spec/support/application_controller.rb
|
86
|
+
- spec/support/boot_rails2.rb
|
87
|
+
- spec/support/boot_rails3.rb
|
88
|
+
- stylist.gemspec
|
89
|
+
has_rdoc: true
|
90
|
+
homepage: http://github.com/tisho/stylist
|
91
|
+
licenses: []
|
92
|
+
|
93
|
+
post_install_message:
|
94
|
+
rdoc_options:
|
95
|
+
- --charset=UTF-8
|
96
|
+
require_paths:
|
97
|
+
- lib
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
version: "0"
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
segments:
|
110
|
+
- 0
|
111
|
+
version: "0"
|
112
|
+
requirements: []
|
113
|
+
|
114
|
+
rubyforge_project:
|
115
|
+
rubygems_version: 1.3.6
|
116
|
+
signing_key:
|
117
|
+
specification_version: 3
|
118
|
+
summary: Powerful stylesheet management for your Rails app.
|
119
|
+
test_files:
|
120
|
+
- spec/configuration_spec.rb
|
121
|
+
- spec/controllers/controller_mixin_spec.rb
|
122
|
+
- spec/controllers/view_helpers_spec.rb
|
123
|
+
- spec/spec_helper.rb
|
124
|
+
- spec/stylesheet_collection_spec.rb
|
125
|
+
- spec/support/application_controller.rb
|
126
|
+
- spec/support/boot_rails2.rb
|
127
|
+
- spec/support/boot_rails3.rb
|