stylus 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,5 @@
1
1
  before_script: "npm install nib"
2
+ before_install: gem update --system
2
3
  rvm:
3
4
  - ree
4
- - 1.9.2
5
- - 1.9.3
6
- - rbx-2.0
5
+ - 1.9.3
@@ -1,12 +1,15 @@
1
1
  ## Changelog
2
2
 
3
+ ### 0.4.2 (2012-03-24)
4
+ [Compare view](https://github.com/lucasmazza/ruby-stylus/compare/v0.4.1...v.0.4.2)
5
+
6
+ * Tells Rails to always run the Railtie initializer.
7
+
3
8
  ### 0.4.1 (2012-01-06)
4
9
  [Compare view](https://github.com/lucasmazza/ruby-stylus/compare/v0.4.0...v.0.4.1)
5
10
 
6
11
  * Skips Sprockets configuration if `config.assets.enabled` isn't true.
7
12
 
8
-
9
-
10
13
  ### 0.4.0 (2011-11-23)
11
14
  [Compare view](https://github.com/lucasmazza/ruby-stylus/compare/v0.3.0...v.0.4.0)
12
15
 
data/README.md CHANGED
@@ -7,15 +7,15 @@
7
7
 
8
8
  ## Installation
9
9
 
10
- Since version 0.3.0, the [stylus-source](https://github.com/railsjedi/ruby-stylus-source) packages the Stylus source into a Rubygems, so it will be available after installing this gem. The `ruby-source` version will follow the Stylus releases and their versions.
10
+ Since version 0.3.0, the [stylus-source](https://github.com/railsjedi/ruby-stylus-source) packages the Stylus source into a Rubygem, so it will be available after installing this gem. The `ruby-source` version will follow the Stylus releases and their versions.
11
11
 
12
12
  You can replace the Stylus code by placing another version of Stylus on `./node_modules/stylus`, and it will be used instead of the version bundled inside the gem.
13
13
 
14
- **But remember**, You still need the `node` command available on your runtime for this gem to work. `stylus` is also compatible with the Heroku Cedar stack, enabling the asset compilation during the deployment of your apps. You can check the [Node.js wiki](https://github.com/joyent/node/wiki/Quick-and-easy-installation) for more info.
14
+ **But remember**, you still need the `node` command available on your runtime for this gem to work. `stylus` is also compatible with the Heroku Cedar stack, enabling asset compilation during the deployment of your apps. You can check the [Node.js wiki](https://github.com/joyent/node/wiki/Quick-and-easy-installation) for more info.
15
15
 
16
16
  ## Usage
17
17
 
18
- The interaction is done by the `Stylus` module. You can compile stylus syntax to CSS, convert it back, enable plugins and tweak some other options:
18
+ The interaction is done by the `Stylus` module. You can compile Stylus syntax to CSS, convert it back, enable plugins and tweak some other options:
19
19
 
20
20
  ```ruby
21
21
  require 'stylus'
@@ -23,20 +23,20 @@ require 'stylus'
23
23
  # Accepts a raw string or an IO object (File, StringIO or anything that responds to 'read').
24
24
  Stylus.compile(File.new('application.styl')) # returns the compiled stylesheet.
25
25
 
26
- # Using the compress option, removing most newlines from the code.
26
+ # Use the :compress option, removing most newlines from the code.
27
27
  Stylus.compile(File.read('application.styl'), :compress => true)
28
28
 
29
29
  # Or use the global compress flag
30
30
  Stylus.compress = true
31
31
  Stylus.compile(File.read('application.styl'))
32
32
 
33
- # Converting old and boring CSS to awesome Stylus.
33
+ # Convert old and boring CSS to awesome Stylus.
34
34
  Stylus.convert(File.new('file.css'))
35
35
 
36
- # Importing plugins directly from Node.js, like nib.
36
+ # Import plugins directly from Node.js, like nib.
37
37
  Stylus.use :nib
38
38
 
39
- # Enabling debug info, which sends the 'linenos' and 'firebug' options to Stylus.
39
+ # Enable debug info, which sends the 'linenos' and 'firebug' options to Stylus.
40
40
  # If you provide a raw content String to the `Stylus.compile` method, remember to send
41
41
  # a `:filename` option so Stylus can locate your stylesheet for proper inspection.
42
42
  Stylus.debug = true
@@ -47,40 +47,40 @@ First of all, remember to add `gem 'stylus'` to your Gemfile inside the `:assets
47
47
 
48
48
  Adding `stylus` to your Gemfile should let you work with `.styl` files with the Rails 3.1 Pipeline. Any asset generated with `rails generate` will be created with a `.css.styl` extension.
49
49
 
50
- Any `@import` directive will add the stylesheet as a sprockets dependency, so you can update external libraries and it will reflect on your assets fingerprints. Also, the Sprockets laod path (usually `app/assets`, `lib/assets`, `vendor/assets` and the `assets` folder inside any other gem) will be available to your stylesheets.
50
+ Any `@import` directive will add the stylesheet as a sprockets dependency, so you can update external libraries and it will reflect on your assets fingerprints. Also, the Sprockets load path (usually `app/assets`, `lib/assets`, `vendor/assets` and the `assets` folder inside any other gem) will be available to your stylesheets.
51
51
 
52
- If the `config.assets.debug` is turned on, Stylus will emit exta comments on your stylesheets to help debugging and inspection using the `linenos` and `firebug` options. Check the [FireStylus extension for Firebug](https://github.com/LearnBoost/stylus/blob/master/docs/firebug.md) for more info.
52
+ If the `config.assets.debug` is turned on, Stylus will emit extra comments on your stylesheets to help debugging and inspection using the `linenos` and `firebug` options. Check the [FireStylus extension for Firebug](https://github.com/LearnBoost/stylus/blob/master/docs/firebug.md) for more info.
53
53
 
54
54
  ### `@import` and file extensions.
55
55
 
56
- Stylus and Sprockets file lookup differ on the subject of handling file extensions, and that may hurt a bit.
56
+ Stylus and Sprockets file lookups differ on the subject of handling file extensions, and that may hurt a bit.
57
57
 
58
58
  If you use Stylus `@import` to expose variables, mixins or just to concatenate code, you should use only the `.styl` extension on your imported files. If you use the `.css.styl` form (a convention from Sprockets), Stylus will treat it as a plain CSS file since it has `.css` on its name.
59
59
 
60
60
  ```sass
61
- // imports the mixins.styl
61
+ // imports mixins.styl
62
62
  @import 'mixins'
63
63
  ```
64
64
 
65
65
  ## Plugins
66
66
 
67
- [Stylus](https://github.com/LearnBoost/stylus) exposes a nice API to create plugins written on [node.js](http://nodejs.org), like [nib](https://github.com/visionmedia/nib). The installation process should be same as described above for [Stylus](https://github.com/LearnBoost/stylus) (since they're all npm packages after all). You can hook them'up on your Ruby code with `Stylus.use`:
67
+ [Stylus](https://github.com/LearnBoost/stylus) exposes a nice API to create plugins written on [node.js](http://nodejs.org), like [nib](https://github.com/visionmedia/nib). The installation process should be the same as described above for [Stylus](https://github.com/LearnBoost/stylus) (since they're all npm packages after all). You can hook them up on your Ruby code with `Stylus.use`:
68
68
 
69
69
  ```ruby
70
70
  Stylus.use :fingerprint, :literal => 'caa8c262e23268d2a7062c6217202343b84f472b'
71
71
  ```
72
72
 
73
- Will run something like this on javascript:
73
+ Will run something like this in JavaScript:
74
74
 
75
75
  ```javascript
76
76
  stylus(file).use(fingerprint({literal:'caa8c262e23268d2a7062c6217202343b84f472b'}));
77
77
  ```
78
78
 
79
- ## Question, Bugs or Support
79
+ ## Questions, Bugs or Support
80
80
 
81
- You can [submit an issue](https://github.com/lucasmazza/ruby-stylus/issues) or ping me at [GitHub](http://github.com/lucasmazza) or [twitter](http://twitter.com/lucasmazza).
81
+ You can [submit an issue](https://github.com/lucasmazza/ruby-stylus/issues) or ping me on [GitHub](http://github.com/lucasmazza) or [Twitter](http://twitter.com/lucasmazza).
82
82
 
83
- For more info about the [Stylus](https://github.com/LearnBoost/stylus) syntax and it's features you can check the [project repository](https://github.com/learnboost/stylus) and [GitHub page](learnboost.github.com/stylus).
83
+ For more info about the [Stylus](https://github.com/LearnBoost/stylus) syntax and its features you can check the [project repository](https://github.com/learnboost/stylus) and the docs on the [GitHub page](http://learnboost.github.com/stylus).
84
84
 
85
85
  ## Changelog
86
86
  [It's available here.](https://github.com/lucasmazza/ruby-stylus/blob/master/CHANGELOG.md)
@@ -9,7 +9,7 @@ module Stylus
9
9
 
10
10
  config.app_generators.stylesheet_engine :stylus
11
11
 
12
- initializer :setup_stylus, :after => 'sprockets.environment' do |app|
12
+ initializer :setup_stylus, :after => 'sprockets.environment', :group => :all do |app|
13
13
  if app.config.assets.enabled
14
14
  app.assets.register_engine '.styl', Tilt::StylusTemplate
15
15
  app.assets.register_preprocessor 'text/css', Stylus::ImportProcessor
@@ -1,3 +1,3 @@
1
1
  module Stylus
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.add_dependency 'execjs'
16
16
  s.add_dependency 'stylus-source'
17
17
  s.add_development_dependency 'rspec', '~> 2.0'
18
- s.add_development_dependency 'railties', '~> 3.1.0'
18
+ s.add_development_dependency 'railties', '~> 3.0'
19
19
  s.add_development_dependency 'tzinfo'
20
20
  s.add_development_dependency 'yajl-ruby'
21
21
  s.add_development_dependency 'rocco'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stylus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-06 00:00:00.000000000 Z
12
+ date: 2012-03-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: execjs
16
- requirement: &70320174413340 !ruby/object:Gem::Requirement
16
+ requirement: &70186296838480 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70320174413340
24
+ version_requirements: *70186296838480
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: stylus-source
27
- requirement: &70320174412720 !ruby/object:Gem::Requirement
27
+ requirement: &70186296851920 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70320174412720
35
+ version_requirements: *70186296851920
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70320174410980 !ruby/object:Gem::Requirement
38
+ requirement: &70186296850680 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,21 +43,21 @@ dependencies:
43
43
  version: '2.0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70320174410980
46
+ version_requirements: *70186296850680
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: railties
49
- requirement: &70320174410100 !ruby/object:Gem::Requirement
49
+ requirement: &70186296849620 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 3.1.0
54
+ version: '3.0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70320174410100
57
+ version_requirements: *70186296849620
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: tzinfo
60
- requirement: &70320174409620 !ruby/object:Gem::Requirement
60
+ requirement: &70186296848740 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70320174409620
68
+ version_requirements: *70186296848740
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yajl-ruby
71
- requirement: &70320178628460 !ruby/object:Gem::Requirement
71
+ requirement: &70186296847340 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70320178628460
79
+ version_requirements: *70186296847340
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rocco
82
- requirement: &70320178627720 !ruby/object:Gem::Requirement
82
+ requirement: &70186296845660 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70320178627720
90
+ version_requirements: *70186296845660
91
91
  description: Bridge library to compile .styl stylesheets from ruby code.
92
92
  email:
93
93
  - luc4smazza@gmail.com
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 1.8.10
163
+ rubygems_version: 1.8.17
164
164
  signing_key:
165
165
  specification_version: 3
166
166
  summary: Ruby Stylus Compiler