erikhansson-precssious 0.1.0 → 0.1.1

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/README.rdoc CHANGED
@@ -39,22 +39,17 @@ of all stylesheets in that directory, merged into a single file. The web path
39
39
  configured.
40
40
 
41
41
  (3) For production, I don't want Precssious loaded at all -- instead, I
42
- generate the stylesheets on deploy:
43
-
44
- /lib/tasks/precssious.rake
45
-
46
- desc 'Generates the stylesheets as static resources'
47
- task :precssious do
48
- require 'precssious'
49
- Precssious.perform_preprocessing
50
- end
42
+ generate the stylesheets on deploy. Require 'tasks/precssious' from within
43
+ your Rakefile to make the task available, and then add something like the
44
+ following to /config/deploy.rb
51
45
 
52
46
  /config/deploy.rb
53
47
 
54
48
  after "deploy:update_code" do
55
- run "cd #{current_path} && rake precssious"
49
+ run "cd #{current_path} && rake precssious:generate"
56
50
  end
57
51
 
52
+
58
53
  == Note on Patches/Pull Requests
59
54
 
60
55
  * Fork the project.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/lib/precssious.rb CHANGED
@@ -34,6 +34,7 @@ module Precssious
34
34
  #
35
35
  def self.perform_preprocessing
36
36
  yield self if block_given?
37
+ @directory ||= Rails.root.join('public', 'stylesheets') if defined?(Rails)
37
38
 
38
39
  Dir["#{@directory}/*"].each do |dir|
39
40
  if File.directory?(dir)
@@ -65,5 +66,4 @@ module Precssious
65
66
  "html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;font-variant:normal;}sup {vertical-align:text-top;}sub {vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}"
66
67
  end
67
68
 
68
-
69
69
  end
@@ -0,0 +1,13 @@
1
+ namespace :precssious do
2
+
3
+ desc 'Generates the stylesheets as static resources'
4
+ task :generate => :environment do
5
+ require 'precssious'
6
+
7
+ if defined?(Rails)
8
+ Precssious.directory = Rails.root.join('public', 'stylesheets')
9
+ Precssious.perform_preprocessing
10
+ end
11
+ end
12
+
13
+ end
data/precssious.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{precssious}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Erik Hansson"]
12
- s.date = %q{2009-08-22}
12
+ s.date = %q{2009-09-09}
13
13
  s.default_executable = %q{precssious}
14
14
  s.description = %q{}
15
15
  s.email = %q{erik@bits2life.com}
@@ -33,6 +33,7 @@ Gem::Specification.new do |s|
33
33
  "lib/precssious/rule.rb",
34
34
  "lib/precssious/token.rb",
35
35
  "lib/precssious/value.rb",
36
+ "lib/tasks/precssious.rb",
36
37
  "precssious.gemspec",
37
38
  "spec/precssious_spec.rb",
38
39
  "spec/spec_helper.rb"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erikhansson-precssious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Hansson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-22 00:00:00 -07:00
12
+ date: 2009-09-09 00:00:00 -07:00
13
13
  default_executable: precssious
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -46,12 +46,12 @@ files:
46
46
  - lib/precssious/rule.rb
47
47
  - lib/precssious/token.rb
48
48
  - lib/precssious/value.rb
49
+ - lib/tasks/precssious.rb
49
50
  - precssious.gemspec
50
51
  - spec/precssious_spec.rb
51
52
  - spec/spec_helper.rb
52
53
  has_rdoc: true
53
54
  homepage: http://github.com/erikhansson/precssious
54
- licenses:
55
55
  post_install_message:
56
56
  rdoc_options:
57
57
  - --charset=UTF-8
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  requirements: []
73
73
 
74
74
  rubyforge_project:
75
- rubygems_version: 1.3.5
75
+ rubygems_version: 1.2.0
76
76
  signing_key:
77
77
  specification_version: 2
78
78
  summary: Merges CSS files and allows nested declarations