Code Monkey home page Code Monkey logo

guard-sass's Introduction

Guard-Sass

guard-sass compiles or validates your sass (and scss) files automatically when changed.

Install

You will need to have guard to continue, so install it now!

Install the gem with:

gem install guard-sass

Add it to your Gemfile:

gem 'guard-sass', :require => false

And finally add a basic setup to your Guardfile with:

guard init sass

Usage

Please read the Guard usage documentation.

Guardfile

guard-sass can be adapted to all kind of projects. Please read the Guard documentation for more information about the Guardfile DSL.

Ruby Project

In a Ruby project you want to configure your input and output directories.

guard 'sass', :input => 'sass', :output => 'styles'

If your output directory is the same as the input directory, you can simply skip it:

guard 'sass', :input => 'styles'

Rails App With the Asset Pipeline

With the introduction of the asset pipeline in Rails 3.1 there is no need to compile your Sass stylesheets with this Guard. However, if you would still like to have feedback on the validation of your stylesheets (preferably with a Growl notification) directly after you save a change, then you can still use this Guard and simply skip generation of the output file:

guard 'sass', :input => 'app/assets/stylesheets', :noop => true

This gives you (almost) immediate feedback on whether the changes made are valid, and is much faster than making a subsequent request to your Rails application. If you just want to be notified when an error occurs you can hide the success compilation message:

guard 'sass',
  :input => 'app/assets/stylesheets',
  :noop => true,
  :hide_success => true

Rails App Without the Asset Pipeline

Without the asset pipeline you just define an input and output directory as in a normal Ruby project:

guard 'sass', :input => 'app/stylesheets', :output => 'public/stylesheets'

Output Extensions

It is standard practice in Rails 3.1 to write sass/scss files with the extension .css.sass to prevent these being written as .css.sass.css you need to set the :extension option like so:

guard 'sass', :input => 'styles', :extension => ''

Options

The following options can be passed to guard-sass:

:input => 'sass'                    # Relative path to the input directory.
                                    # A suffix `/(.+\.s[ac]ss)` will be added to this option.
                                    # default: nil

:output => 'stylesheets'            # Relative path to the output directory.
                                    # default: 'css' or the :input option when supplied

:all_on_start => true               # Compiles all sass files on start
                                    # default: false

:compass => true                    # Enable Compass support with default options. You can
                                    # overwrite any of these options by passing a hash. For
                                    # the options available see the Compass reference here:
                                    # http://compass-style.org/help/tutorials/configuration-reference/

:smart_partials => true             # Causes guard-sass to do dependency resolution and only
                                    # recompile the files that need it when you update partials.
                                    # If not on, then guard-sass will update all files when a
                                    # partial is changed.
                                    # default: false

:hide_success => true               # Disable successful compilation messages.
                                    # default: false

:shallow => true                    # Do not create nested output directories.
                                    # default: false

:noop => true                       # No operation: Do not write output file
                                    # default: false

As well as any option that sass itself can take (eg. :style => :compact). See the reference for a list.

Output Short Notation

guard-sass also has a short notation like guard-coffeescript, this lets you define an input folder (with an optional output folder) automatically creating the required watcher.

guard 'sass', :input => 'sass', :output => 'styles'
# or
guard 'sass', :input => 'stylesheets'

These are equivalent to

guard 'sass', :output => 'styles' do
  watch %r{^sass/(.+\.s[ac]ss)$}
end

guard 'sass' do
  watch %r{^stylesheets/(.+\.s[ac]ss)$}
end

Nested Directories

By default the guard detects nested directories and writes files into the output directory with the same structure.

The Guard detects by default nested directories and creates these within the output directory. The detection is based on the match of the watch regular expression:

A file

/app/stylesheets/form/button.sass

that has been detected by the watch

watch(%r{^app/stylesheets/(.+\.s[ac]ss)$})

with an output directory of

:output => 'public/stylesheets'

will be compiled to

public/stylesheets/form/button.css

Note the parenthesis around .+\.s[ac]ss. This enables guard-sass to place the full path that was matched inside the parenthesis into the proper output directory.

This behaviour can be switched off by passing the option :shallow => true to the Guard, so that all stylesheets will be compiled directly to the output directory. So the previous example would have compiled to public/stylesheets/button.css.

Development

Pull requests are very welcome!

For questions please join us on our Google group or on #guard (irc.freenode.net).

Contributors

Have a look at the GitHub contributor list to see all contributors.

Since this Guard is very close to guard-coffeescript, some features have been incorporated into guard-sass.

License

(The MIT License)

Copyright (c) 2010 - 2012 Joshua Hawxwell

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

guard-sass's People

Contributors

alexdunae avatar cheald avatar chrisirhc avatar hawx avatar kalbasit avatar mike-hearn avatar napcs avatar nemo157 avatar netzpirat avatar nviennot avatar pjg avatar redhotvengeance avatar saulius avatar sunny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

guard-sass's Issues

Could not load 'guard/sass' or find class Guard::Sass

I'm using Guard in a non-Rails project under Bundler 1.1.4 with guard-sass 0.7.0.
Running bundle exec guard gives the following:

ERROR: Could not load 'guard/sass' or find class Guard::Sass
ERROR: cannot load such file -- guard/sass
ERROR: Invalid Guardfile, original error is:
undefined method `new' for nil:NilClass
ERROR: No guards found in Guardfile, please add at least one.

Under guard-sass 0.6.0 the error is

/usr/lib/ruby/gems/1.9.1/gems/guard-sass-0.6.0/lib/guard/sass.rb:48:in `initialize': cannot load such file -- guard/sass/runner (LoadError)
        from /usr/lib/ruby/gems/1.9.1/gems/guard-1.1.0/lib/guard.rb:279:in `new'
        from /usr/lib/ruby/gems/1.9.1/gems/guard-1.1.0/lib/guard.rb:279:in `add_guard'
        from /usr/lib/ruby/gems/1.9.1/gems/guard-1.1.0/lib/guard/dsl.rb:388:in `guard'

but everything works fine under guard-sass 0.5.4.

This is on ruby 1.9.3p0 on Linux.

ERROR: Rails.root is nil! (RuntimeError)

I'm getting this after upgrading to guard 1.1

ERROR: Rails.root is nil! (RuntimeError)
/Users/aaron/.rbenv/versions/1.9.3-p194-perf/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/util.rb:370:in `rails_root'
/Users/aaron/.rbenv/versions/1.9.3-p194-perf/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/plugin/rails.rb:11:in `default_options'
/Users/aaron/.rbenv/versions/1.9.3-p194-perf/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/plugin/configuration.rb:33:in `options'
/Users/aaron/.rbenv/versions/1.9.3-p194-perf/lib/ruby/gems/1.9.1/gems/sass-3.1.19/lib/sass/plugin/compiler.rb:38:in `initialize

Sprites in wrong folder

I have a strange bug while trying to create a sprite map with sass/compass. My directory structure is this:

   /assets
      /css
      /img
      /src
         /sass

My guard-sass config is this:

guard 'sass',
    :input => "assets/src/sass",
    :output => "assets/css",
    :all_on_start => true,
    :compass => true,
    :shallow => true,
    :line_numbers => true,
    :style => :compressed,
    :hide_success => true,
    :smart_partials => true,
    :compass => {
        :images_dir       => "assets/img",
        :images_path      => File.join(Dir.pwd, "assets/img"),
        :http_images_path => "assets/img",
        :http_images_dir  => "assets/img",
        :http_fonts_path  => "assets/fonts",
        :http_fonts_dir   => "assets/fonts"
    }

I've had no problems with this setup, until I try to create a sprite map.

No errors are thrown but a new folder is created called images, outside of my assets dir. So when I create a sprite map...my new dir structure looks like this:

   /images
      file-123123213.png
   /assets
      /css
      /img
      /src
         /sass

huh?

Output file relative to the input file location

Hi there, I've been hunting for a while but can't see a way to specify the output directory in relation to the location of the input file.

In my setup, we're watching .scss files for a bunch of different customer templates each in their own directory so:

customer 1
  - sass
customer 2
  - sass

I want the files in customer 1's sass directory to be output into the customer 1 directory.

Any tips would be appreciated :)

Sass conversion doesn't seem to trigger guards on output file on Guard > 0.5.1

On Guard 0.5.1 with guard-sass, guard-coffeescript and guard-jammit, I can do the following:

Convert sass/app.sass to tmp/app.css
Convert coffeescripts/app.coffee to tmp/app.js
Have Jammit watch tmp/_js for changes to build assets/app.js
Have Jammit watch tmp/_css for changes to build assets/app.js

With Guard 0.6.0 up to the latest, the guard-sass gem seems to no longer fire Jammit's watcher on the tmp folder after saving, while the guard-coffeescript gem behaves as normal. I've spent a couple of hours comparing the code in Guard and the code in this gem with the guard-coffeescript gem and can't figure out what could have caused this.

For reference, here's a Guardfile:

guard "sass", :input => "sass", :output => "tmp"
guard "coffeescript", :input => "coffeescripts", :output => "tmp"

guard "jammit" do
  watch(/^javascripts\/(.*)\.js/)
  watch(/^stylesheets\/(.*)\.css/)
  watch(/^tmp\/(.*)\.js/)
  watch(/^tmp\/(.*)\.css/)

end

Saving the .sass file creates the tmp/.css file perfectly, but the notification doesn't seem to be happening. Any clues where I can start looking? I hate the "it doesn't work" bug reports, but I didn't see anything obvious.

Sourcemap generation?

I saw a previously closed issue regarding support for sourcemap generation, but it wasn't really resolved. Has sourcemap generation been added as a feature for guard-sass?

Guard::Sass run_on_changes exception: undefined method `run_on_changes' for Guard::Refresher

I don't know if this is the right place for this but I was using Larvel-Guard with the respective guard gems and while I was working with the guard-sass gem, I noticed that the file wasn't processing itself into CSS and received the next ERROR

Guard::Sass failed to achieve its <run_on_changes>, exception was:

[#] NoMethodError: undefined method `run_on_changes' for #Guard::Refresher:0x007fee69c0b7c8

So after debuging a bit I found out that on line 164 of sass.rb it calls on guard.run_on_changes but that method is actually not defined anywhere so I found 2 possible solutions (I would like to know if I'm wrong or maybe it is an error)

  1. Comment the line 164 on sass.rb

guard.run_on_changes(paths) unless paths.empty?

  1. Add the method inside the Refresher of your Guardfile

[...]
module ::Guard
class Refresher < Guard
def run_all
# refresh
end

def run_on_changes(paths)
 # refresh
end

def run_on_additions(paths)
  refresh
end

def run_on_removals(paths)
  refresh
end

def refresh
  `php artisan guard:refresh`
end

end
end

[...]

Regards and I hope that someone can tell me if this is wrong or what happened (or even if I should put this on another place)

flag to include external Ruby libraries (sass-globbing)

I'm trying to include the sass-globbing library into the guard-sass declaration within my Guard file though it's not obvious how I would go about doing this. Usually when running the sass --watch function, I can include it with the -r flag: ie:

  • sass -r sass-globbing --watch sass:css

I'm not using, or planning on using, Compass otherwise it'd be included within the config.rb

Am I missing something or is this not possible? Thanks!

New shorthand method doesn't mimic guard-coffeescript

Actually this doesn't work the way guard-coffeescript works. Here is what I have in my Guardfile:

guard 'sass', :input => 'app/assets/stylesheets', :output => 'public/stylesheets'

What I expect, is for app/assets/stylesheets/controllers/test.scss to render to public/stylesheets/controllers/test.css, but instead it renders to public/stylesheets/test.css

guard -w command line flag not used when compiling sass files

repro

  1. get zip: http://d.pr/yOMm
  2. run bundle exec guard -w ../
  3. run touch new.scss
  4. results in this error: http://d.pr/rX7u

If I change line 57 of runner.rb from content = IO.read(file) to content = IO.read("../#{file}") the stylesheets compile as expected.

There is another issue as well. Modifying a partial no longer triggers a compile of the stylesheets.

Thanks very much for any help with this issue. I realize it's the the most common use case.

"stack level too deep" error when sass partial is modified

repro

  1. download zip: http://d.pr/R9D3 (I used the error-test.zip that you had created for another bug)
  2. unarchive zip
  3. run bundle install
  4. run bundle exec guard
  5. touch new.scss and new.css is built as expected
  6. touch _west.scss and it throws an error: https://gist.github.com/1276096

Note if I change the Gemfile to require guard-sass 0.3.4 this error does not occur. It does occur while using 0.4.0 and 0.5.0.

My co-worker cannot repro this issue, so I am not sure it will repro for everyone.

Thanks for any help.

Watcher doesn't seem to work Guard 1.6.x

1.0.2 works with 1.4.0 of Guard, but not 1.6.5 or others on 1.6. Any change to the file doesn't trigger the guard. However, if I hit Enter in Guard, the sass to css conversion works fine.

I'd love to help because guard-coffeescript has the same problem and I'd like to help fix. Any hints in the right direction would be great.

sass exceptions break guard-sass until guard restarted

Occasionally I botch my stylesheet enough to trigger an exception in Sass. For example:

ERROR: Sass > Syntax error: Invalid CSS after "...x($float: left)": expected "}", was ".left {"
        on line 529 of public/stylesheets/default.scss
ERROR: Guard::Sass failed to achieve its <run_on_change>, exception was:
IndexError: Unknown Keyword: :error
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-appscript-0.6.1/lib/appscript.rb:177:in `block in pack'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-appscript-0.6.1/lib/appscript.rb:177:in `fetch'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-appscript-0.6.1/lib/appscript.rb:177:in `pack'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-appscript-0.6.1/lib/_aem/send.rb:37:in `block in initialize'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-appscript-0.6.1/lib/_aem/send.rb:37:in `each'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-appscript-0.6.1/lib/_aem/send.rb:37:in `initialize'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-appscript-0.6.1/lib/aem.rb:218:in `new'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-appscript-0.6.1/lib/aem.rb:218:in `event'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-appscript-0.6.1/lib/appscript.rb:506:in `_send_command'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-appscript-0.6.1/lib/appscript.rb:642:in `method_missing'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/growl_notify-0.0.1/lib/growl_notify.rb:36:in `send_notification'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard/notifier.rb:58:in `notify_mac'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard/notifier.rb:32:in `notify'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-sass-0.3.1/lib/guard/sass.rb:102:in `rescue in block in run_on_change'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-sass-0.3.1/lib/guard/sass.rb:95:in `block in run_on_change'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-sass-0.3.1/lib/guard/sass.rb:93:in `map'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-sass-0.3.1/lib/guard/sass.rb:93:in `run_on_change'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:66:in `supervised_task'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:52:in `block in run_on_change_for_all_guards'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:48:in `each'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:48:in `run_on_change_for_all_guards'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:39:in `block (2 levels) in start'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:79:in `run'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:39:in `block in start'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard/listeners/darwin.rb:42:in `call'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard/listeners/darwin.rb:42:in `block in watch'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-fsevent-0.4.3.1/lib/rb-fsevent/fsevent.rb:37:in `call'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-fsevent-0.4.3.1/lib/rb-fsevent/fsevent.rb:37:in `run'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard/listeners/darwin.rb:15:in `start'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:82:in `run'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:59:in `run_on_change_for_all_guards'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:39:in `block (2 levels) in start'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:79:in `run'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:39:in `block in start'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard/listeners/darwin.rb:42:in `call'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard/listeners/darwin.rb:42:in `block in watch'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-fsevent-0.4.3.1/lib/rb-fsevent/fsevent.rb:37:in `call'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-fsevent-0.4.3.1/lib/rb-fsevent/fsevent.rb:37:in `run'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard/listeners/darwin.rb:15:in `start'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:82:in `run'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:59:in `run_on_change_for_all_guards'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:59:in `block in run_on_change_for_all_guards'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:79:in `run'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:59:in `run_on_change_for_all_guards'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:39:in `block (2 levels) in start'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:79:in `run'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:39:in `block in start'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard/listeners/darwin.rb:42:in `call'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard/listeners/darwin.rb:42:in `block in watch'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-fsevent-0.4.3.1/lib/rb-fsevent/fsevent.rb:37:in `call'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/rb-fsevent-0.4.3.1/lib/rb-fsevent/fsevent.rb:37:in `run'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard/listeners/darwin.rb:15:in `start'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard.rb:44:in `start'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/lib/guard/cli.rb:17:in `start'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.6.2/bin/guard:6:in `<top (required)>'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/bin/guard:19:in `load'
/Users/tim-taylor/.rvm/gems/ruby-1.9.2-p180/bin/guard:19:in `<main>'

Guard::Sass has just been fired

Ever after, until I shutdown and restart guard, Guard::Sass is never fired.

Let me know if this should be filed under guard/guard.

guard-sass does not recompile style.scss in bones template

Hi, i'm using guard-sass for developing a bones theme (http://themble.com/bones/). There are single scss all imported into style.scss.
With sass --watch a change in a imported scss (e.g. mixins.scss) triggers a recompiling of style.scss to style.css which ist used as single stylesheet for the template.

Guard-sass just recompiles the mixins.scss so the changes are not compiled into the styles.css
Did i miss something? I tried already the "smart_partials" and "load_paths" options.

Thx for the help

Support for :cache_path setting

I'm running guard-sass (via https://github.com/JeffreyWay/Laravel-Guard) inside a Vagrant virtual machine.

Upon running, I'm getting the error message complaining that the cache file was busy.

After a bit of research, I've found that this is possibly due to the .sass-cache folder being a vagrant-shared folder (http://stackoverflow.com/a/19312073/1049688) and that if I use the :cache_path setting, I can set this to be outside the shared folder (hopefully solving my problem).

As such, I've tried setting this using the following line in my Guardfile:

guard :sass, :input => 'app/assets/sass', :output => 'public/css', :cache_location => '/tmp/sass-cache'

But it doesn't appear to work, as I'm still getting the same error message.

So, long story short (too late), would it be possible for :cache_path to be supported by guard-sass? Thank you

(here is the error message)

Guard::Sass failed to achieve its <run_all>, exception was:
> [#7FC61DBC75ED] Errno::ETXTBSY: Text file busy - (/srv/www/unknowntales.net/.sass-cache/6e3c5f8cf77d32b4cd007275a86be6298688ecf7/foundation.scssc20131121-30292-1ku8cn, ./.sass-cache/6e3c5f8cf77d32b4cd007275a86be6298688ecf7/foundation.scssc)
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/sass-3.2.12/lib/sass/util.rb:886:in `rename'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/sass-3.2.12/lib/sass/util.rb:886:in `atomic_create_and_write_file'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/sass-3.2.12/lib/sass/cache_stores/filesystem.rb:39:in `_store'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/sass-3.2.12/lib/sass/cache_stores/base.rb:51:in `store'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/sass-3.2.12/lib/sass/cache_stores/chain.rb:19:in `block in store'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/sass-3.2.12/lib/sass/cache_stores/chain.rb:19:in `each'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/sass-3.2.12/lib/sass/cache_stores/chain.rb:19:in `store'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/sass-3.2.12/lib/sass/engine.rb:353:in `_to_tree'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/sass-3.2.12/lib/sass/engine.rb:315:in `_render'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/sass-3.2.12/lib/sass/engine.rb:262:in `render'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-sass-1.3.2/lib/guard/sass/runner.rb:87:in `compile'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-sass-1.3.2/lib/guard/sass/runner.rb:51:in `block (2 levels) in compile_files'
> [#7FC61DBC75ED] /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-sass-1.3.2/lib/guard/sass/runner.rb:50:in `block in compile_files'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-sass-1.3.2/lib/guard/sass/runner.rb:47:in `each'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-sass-1.3.2/lib/guard/sass/runner.rb:47:in `compile_files'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-sass-1.3.2/lib/guard/sass/runner.rb:23:in `run'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-sass-1.3.2/lib/guard/sass.rb:147:in `run_on_changes'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-sass-1.3.2/lib/guard/sass.rb:99:in `run_all'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:99:in `block in run_supervised_task'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:97:in `catch'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:97:in `run_supervised_task'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:54:in `block (2 levels) in run'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:175:in `block (3 levels) in scoped_guards'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:173:in `each'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:173:in `block (2 levels) in scoped_guards'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:172:in `catch'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:172:in `block in scoped_guards'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:170:in `each'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:170:in `scoped_guards'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:53:in `block in run'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/lumberjack-1.0.4/lib/lumberjack.rb:31:in `unit_of_work'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/runner.rb:52:in `run'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard.rb:261:in `block in run_all'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard.rb:387:in `block in within_preserved_state'
> [#7FC61DBC75ED] <internal:prelude>:10:in `synchronize'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard.rb:384:in `within_preserved_state'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard.rb:258:in `run_all'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/commands/all.rb:23:in `process'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/command.rb:579:in `call'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/command.rb:453:in `call_with_hooks'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/command.rb:426:in `call_safely'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/command.rb:368:in `process_line'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/command_set.rb:350:in `process_line'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:445:in `process_command'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:426:in `retrieve_line'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:301:in `block in r'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:298:in `loop'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:298:in `r'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:276:in `re'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:254:in `rep'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:234:in `block (3 levels) in repl'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:232:in `loop'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:232:in `block (2 levels) in repl'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:231:in `catch'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:231:in `block in repl'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:230:in `catch'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:230:in `repl'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_class.rb:246:in `run_command'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/interactor.rb:145:in `block in create_run_all_command'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/command.rb:492:in `instance_exec'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/command.rb:492:in `call'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/command.rb:453:in `call_with_hooks'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/command.rb:426:in `call_safely'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/command.rb:368:in `process_line'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/command_set.rb:350:in `process_line'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:445:in `process_command'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:426:in `retrieve_line'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:301:in `block in r'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:298:in `loop'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:298:in `r'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:276:in `re'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:254:in `rep'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:234:in `block (3 levels) in repl'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:232:in `loop'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:232:in `block (2 levels) in repl'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:231:in `catch'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:231:in `block in repl'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:230:in `catch'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_instance.rb:230:in `repl'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/pry-0.9.12.3/lib/pry/pry_class.rb:170:in `start'
> [#7FC61DBC75ED] /usr/lib/ruby/gems/1.9.1/gems/guard-1.8.3/lib/guard/interactor.rb:248:in `block in start'

Unable to @import files on relative path

I have 2 files in the /build-src/sass directory:

/build-src/sass
    foo.sass
    bar.sass

where foo.sass imports bar:

@import "bar"

Guard-sass generates a 'Syntax Error: File to import not found or unreadable' error when foo.sass changes. It only works if I add /build-src/sass as a loadpath.

Interestingly the sass watcher works as expected:

sass --watch build-src/sass:build

>>> Change detected to: /build-src/sass/foo.sass
overwrite build/foo.css

and is also happy with either of these import directives:

@import "./bar"
@import "../sass/bar"

This suggests the problem might be with guard-sass.

guard-sass v0.5.4
sass v3.2.1, v3.1.15

Cheers!

Support for sourcemap

In the latest versions of Sass, the --sourcemap options is available to create sourcemaps for the produced css. It would be nice to have this same option using guard.

Double compiling

guard(
  :sass,
  input: 'assets/styles',
  output: 'public/styles'
) do
  watch %r{^assets/styles/(.+\.s[ac]ss)$}
end
19:04:33 - INFO - Sass [0.27s] main.scss -> main.css

19:04:33 - INFO - Sass [0.21s] main.scss -> main.css
# Sass#run_on_changes(paths)

p paths # => ["assets/styles/main.scss", "assets/styles/main.scss"]

Error on Ubuntu 13.04

I'm getting an error when guard starts on Ubuntu 13.04. Other than running guard I'm a total ruby noob and I have no idea what to do. I didn't get any error messages during installation of ruby or any of the gems, and ruby --version yields ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]. After the error message guard doesn't watch/update sass, but livereload and concat seem to be working fine. My only guards being loaded are guard-sass, guard-concat, and guard-livereload. It did work fine on 12.10, and I don't think any Ruby libraries changed versions (it was Ruby 1.9.3 on 12.10 as well).

Here's the guard error message. Any help would be greatly appreciated!

19:44:11 - INFO - Guard uses TerminalTitle to send notifications.
19:44:12 - INFO - Sass [0.50s] main.scss -> main.css

19:44:12 - ERROR - Guard::Sass failed to achieve its <start>, exception was:

[#2DD022E7B4D9] NoMethodError: undefined method reload_browser' for nil:NilClass [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-livereload-1.4.0/lib/guard/livereload.rb:36:inrun_on_changes'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-sass-1.0.6/lib/guard/sass.rb:164:in block in notify' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-sass-1.0.6/lib/guard/sass.rb:162:ineach'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-sass-1.0.6/lib/guard/sass.rb:162:in notify' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-sass-1.0.6/lib/guard/sass.rb:146:inrun_on_changes'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-sass-1.0.6/lib/guard/sass.rb:97:in run_all' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-sass-1.0.6/lib/guard/sass.rb:90:instart'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:99:in block in run_supervised_task' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:97:incatch'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:97:in run_supervised_task' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:54:inblock (2 levels) in run'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:175:in block (3 levels) in scoped_guards' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:173:ineach'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:173:in block (2 levels) in scoped_guards' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:172:incatch'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:172:in block in scoped_guards' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:170:ineach'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:170:in scoped_guards' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:53:inblock in run'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/lumberjack-1.0.3/lib/lumberjack.rb:27:in unit_of_work' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/runner.rb:52:inrun'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard.rb:192:in block in start' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard.rb:368:inblock in within_preserved_state'
[#2DD022E7B4D9] internal:prelude:10:in synchronize' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard.rb:365:inwithin_preserved_state'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard.rb:190:in start' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/lib/guard/cli.rb:110:instart'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in run' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:ininvoke_command'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in dispatch' [#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:instart'
[#2DD022E7B4D9] /var/lib/gems/1.9.1/gems/guard-1.8.0/bin/guard:6:in <top (required)>' [#2DD022E7B4D9] /usr/local/bin/guard:23:inload'
[#2DD022E7B4D9] /usr/local/bin/guard:23:in `

'
19:44:12 - INFO - Guard::Sass has just been fired
19:44:12 - INFO - Guard is now watching at '/home/tobin/Dropbox/code/web-template'
19:44:12 - INFO - LiveReload is waiting for a browser to connect.

Rails 3.1 `@import` issue with file extensions

I'm having some issues with @import with Rails 3.1

Simple project, inside of app/assets/stylesheets i have a sass partial named _shared_styles.css.scss. When I use @import "shared_styles"; I get the error:

ERROR: Sass > Syntax error: File to import not found or unreadable: shared_styles.
              Load path: /Users/jc/Projects/test_app/app/assets/stylesheets
        on line 5 of app/assets/stylesheets/admin.css.scss

Guessing it has something to do with the .css.scss extension that Rails 3.1 encourages. When I rename to just .scss it works in Guard. However that busts things when using the standard rails asset pipeline.

Is there a trick to standardizing Sass configuration settings between both Guard and Rails asset pipeline?

I also use Compass

cc @netzpirat

debug_info doesn't export full debug information.

When I run guard-sass with the :debug_info option set to true I get the follow partial debug code.

@media -sass-debug-info{filename{}line{font-family:\0000310}}

When I run sass directly in the same directory, I get the full debug output.

@media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/html\/clients\/sandbox\.com\/www\/andy\/sass\/_ui\/skin\/sass\/main\.scss}line{font-family:\0000310}}

Any idea what would cause the difference?

Compass config.rb options within Guardfile

Hello,

New Guard and Guard-Sass user. I'm a Drupal themer using a Compass/Sass based Drupal theme. Current development done with LiveReload app/command line Compass commands. Looking into not using the app anymore and switching to Guard and other extenions to accomplish the job, as multiple people/machines will be using this theme and the associated tools.

I am currently using a config.rb that is included with the Drupal theme that my team uses.

It is my understanding that Guard-sass does not support using a config.rb file.

I was wondering if anyone knew if I could somehow re-create the provided config.rb file using the compass options with Guard-Sass. You can see the config.rb file in the following gist.

https://gist.github.com/humanaut/f04e508e952e6facae59

I am specifically looking at the development/product options and output style logic on the bottom half of the file. Can these things be recreated using Compass options in Guard-Sass?

eg..

output_style = (environment == :development) ? :expanded : :compressed

Other items such as relative_assets, add_import_path, I am also not sure if I can recreate those using Guard-Sass

Any help would be appreciated. I think this is my final hurdle in trying to implement this across multiple teams/machines.

Thanks!

sass exceptions break guard-sass until guard is restarted

Most SASS errors break guard until I restart it. Here is a stracktrace:

17:18:39 - ERROR - Guard::Sass failed to achieve its <run_on_changes>, exception was:
[#] Sass::SyntaxError: Invalid CSS after " margin": expected "{", was "}"
[#] public/css/_index.scss:31
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:1148:in expected' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:1084:inexpected'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:1079:in tok!' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:534:inblock'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:529:in ruleset' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:591:inblock in declaration_or_ruleset'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:1122:in call' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:1122:inrethrow'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:592:in declaration_or_ruleset' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:554:inblock_child'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:543:in block_contents' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:535:inblock'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:529:in ruleset' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:591:inblock in declaration_or_ruleset'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:1122:in call' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:1122:inrethrow'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:592:in declaration_or_ruleset' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:554:inblock_child'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:546:in block_contents' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:535:inblock'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:529:in ruleset' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:591:inblock in declaration_or_ruleset'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:1122:in call' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:1122:inrethrow'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:592:in declaration_or_ruleset' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:554:inblock_child'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:546:in block_contents' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:535:inblock'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:529:in ruleset' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:553:inblock_child'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:543:in block_contents' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:82:instylesheet'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/scss/parser.rb:27:in parse' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/engine.rb:342:in_to_tree'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/engine.rb:274:in to_tree' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/engine.rb:306:in_dependencies'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/sass-3.2.7/lib/sass/engine.rb:295:in dependencies' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-sass-1.0.3/lib/guard/sass.rb:107:inblock in resolve_partials_to_owners'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-sass-1.0.3/lib/guard/sass.rb:105:in select' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-sass-1.0.3/lib/guard/sass.rb:105:inresolve_partials_to_owners'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-sass-1.0.3/lib/guard/sass.rb:119:in run_with_partials' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-sass-1.0.3/lib/guard/sass.rb:133:inrun_on_changes'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:99:in block in run_supervised_task' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:97:incatch'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:97:in run_supervised_task' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:146:inblock in run_first_task_found'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:144:in each' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:144:inrun_first_task_found'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:79:in block in run_on_changes' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:175:inblock (3 levels) in scoped_guards'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:174:in each' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:174:inblock (2 levels) in scoped_guards'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:173:in catch' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:173:inblock in scoped_guards'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:172:in each' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:172:inscoped_guards'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard/runner.rb:72:in run_on_changes' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard.rb:139:inblock (2 levels) in setup_listener'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard.rb:363:in block in within_preserved_state' [#] <internal:prelude>:10:insynchronize'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard.rb:360:in within_preserved_state' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/guard-1.6.2/lib/guard.rb:138:inblock in setup_listener'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/listen-0.7.3/lib/listen/listener.rb:212:in call' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/listen-0.7.3/lib/listen/listener.rb:212:inon_change'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/listen-0.7.3/lib/listen/listener.rb:221:in block in initialize_adapter' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/listen-0.7.3/lib/listen/adapters/polling.rb:56:incall'
[#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/listen-0.7.3/lib/listen/adapters/polling.rb:56:in poll' [#] /Users/emkman/.rvm/gems/ruby-1.9.3-p392@triple/gems/listen-0.7.3/lib/listen/adapters/polling.rb:32:inblock in start'
17:18:39 - INFO - Guard::Sass has just been fired

My Gemset:

guard (1.6.2)
guard-livereload (1.1.3)
guard-sass (1.0.3)

and my Guardfile

guard 'sass', :input => 'public/css', :load_paths => ["lib", "public/css"], :smart_partials => true

guard 'livereload' do
  watch(%r{views/.+\.(erb|haml)})
  watch(%r{public/.+\.(css|js)})
end

Possibility to use files for `:input` and `:output`

Sass can do it even with --watch: sass --watch input.scss:output.css.

But when I write this code:

guard(
  :sass,
  input: 'assets/styles/main.scss',
  output: 'public/styles/main.css'
) do
  watch %r{^assets/styles/(.+\.s[ac]ss)$}
end

I'm getting this error:

17:50:49 - ERROR - Guard::Sass failed to achieve its <run_on_changes>, exception was:
> [#] Errno::EEXIST: File exists @ dir_s_mkdir - public/styles/main.css
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/2.4.0/fileutils.rb:230:in `mkdir'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/2.4.0/fileutils.rb:230:in `fu_mkdir'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/2.4.0/fileutils.rb:208:in `block (2 levels) in mkdir_p'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/2.4.0/fileutils.rb:206:in `reverse_each'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/2.4.0/fileutils.rb:206:in `block in mkdir_p'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/2.4.0/fileutils.rb:191:in `each'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/2.4.0/fileutils.rb:191:in `mkdir_p'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-sass-1.6.1/lib/guard/sass/runner.rb:116:in `write_file'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-sass-1.6.1/lib/guard/sass/runner.rb:51:in `block (2 levels) in compile_files'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-sass-1.6.1/lib/guard/sass/runner.rb:50:in `block in compile_files'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-sass-1.6.1/lib/guard/sass/runner.rb:47:in `each'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-sass-1.6.1/lib/guard/sass/runner.rb:47:in `compile_files'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-sass-1.6.1/lib/guard/sass/runner.rb:23:in `run'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-sass-1.6.1/lib/guard/sass.rb:149:in `run_on_changes'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-sass-1.6.1/lib/guard/sass.rb:98:in `run_all'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-sass-1.6.1/lib/guard/sass.rb:133:in `run_with_partials'
> [#] /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-sass-1.6.1/lib/guard/sass.rb:147:in `run_on_changes'

Invalid Permissions for guard-sass 1.0.2

After instaling guard-sass 1.0.2 using sudo gem install -V guard-sass on my Ubuntu 12.10 64bit, I can't use it because of wrong permissions (too restrictive).

After fixing the permissions, I can use it.

ceefour@annafi:/usr/lib/ruby/gems/1.9.1/gems$ sudo chmod -Rc +r .
mode of `./compass-0.12.2/examples/css3/extensions/fancy-fonts/templates/project/bgrove.ttf' changed from 0770 (rwxrwx---) to 0774 (rwxrwxr--)
mode of `./compass-0.12.2/examples/css3/extensions/fancy-fonts/templates/project/bgrove.otf' changed from 0770 (rwxrwx---) to 0774 (rwxrwxr--)
mode of `./guard-sass-1.0.2/lib/guard/sass.rb' changed from 0660 (rw-rw----) to 0664 (rw-rw-r--)
mode of `./guard-sass-1.0.2/lib/guard/sass/runner.rb' changed from 0660 (rw-rw----) to 0664 (rw-rw-r--)

Specs failing

How to run specs?

There is no Travis CI config file, or instructions in README…

$ bundle exec rake
/home/alex/.rbenv/versions/2.4.2/bin/ruby -I/home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib:/home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-support-3.7.0/lib /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}
F19:42:23 - INFO - Sass Success message
..F19:42:23 - ERROR - [Sass] Error message
..19:42:23 - WARN - ********************
> [#] DEPRECATION WARNING!
> [#] ********************            You have a string in your Guardfile watch patterns that seem to
> [#]             represent a Regexp.
> [#] 
> [#]             Guard matches String with == and Regexp with Regexp#match.
> [#] 
> [#]             You should either use plain String (without Regexp special
> [#]             characters) or real Regexp.
> [#] 
> [#] Deprecation backtrace: /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-2.14.1/lib/guard/ui.rb:107:in `deprecation'
> [#] 	 >/home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-2.14.1/lib/guard/watcher/pattern/deprecated_regexp.rb:35:in `show_deprecation'
> [#] 	 >/home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-2.14.1/lib/guard/watcher/pattern.rb:14:in `create'
> [#] 	 >/home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/guard-2.14.1/lib/guard/watcher.rb:26:in `initialize'
> [#] 	 >/home/alex/Projects/ruby/guard-sass/spec/guard/sass/runner_spec.rb:7:in `new'
19:42:23 - INFO - "^(.*)\.s[ac]ss$" will be converted to /^(.*)\.s[ac]ss$/
["a.sass"]
FF19:42:23 - INFO - "^(.*)\.s[ac]ss$" will be converted to /^(.*)\.s[ac]ss$/
["a.sass"]
F19:42:23 - INFO - "^(.*)\.s[ac]ss$" will be converted to /^(.*)\.s[ac]ss$/
["a.sass"]
F19:42:23 - INFO - "^(.*)\.s[ac]ss$" will be converted to /^(.*)\.s[ac]ss$/
["a.sass"]
F19:42:23 - INFO - "^(.*)\.s[ac]ss$" will be converted to /^(.*)\.s[ac]ss$/
["a.sass"]
FFFFFFFFF19:42:23 - INFO - "(.*)\.s[ac]ss" will be converted to /(.*)\.s[ac]ss/
F19:42:23 - INFO - "(.*)\.s[ac]ss" will be converted to /(.*)\.s[ac]ss/
F19:42:23 - INFO - "(.*)\.s[ac]ss" will be converted to /(.*)\.s[ac]ss/
F19:42:23 - INFO - "(.*)\.s[ac]ss" will be converted to /(.*)\.s[ac]ss/
19:42:23 - INFO - "(.*)\.s[ac]ss" will be converted to /(.*)\.s[ac]ss/
F

Failures:

  1) Guard::Sass::Formatter#success if success is to be shown shows a success message
     Failure/Error: ::Guard::Notifier.notify(msg, ({:title => "Guard::Sass"}).merge(opts))
     
     TypeError:
       no implicit conversion of nil into String
     # ./lib/guard/sass/formatter.rb:43:in `notify'
     # ./lib/guard/sass/formatter.rb:25:in `success'
     # ./spec/guard/sass/formatter_spec.rb:14:in `block (4 levels) in <top (required)>'

  2) Guard::Sass::Formatter#error shows an error message
     Failure/Error: ::Guard::Notifier.notify(msg, ({:title => "Guard::Sass"}).merge(opts))
     
     TypeError:
       no implicit conversion of nil into String
     # ./lib/guard/sass/formatter.rb:43:in `notify'
     # ./lib/guard/sass/formatter.rb:35:in `error'
     # ./spec/guard/sass/formatter_spec.rb:35:in `block (3 levels) in <top (required)>'

  3) Guard::Sass::Runner#run returns a list of changed files
     Failure/Error: ::Sass::Engine.for_file(file, sass_options).render
     
     NoMethodError:
       undefined method `close' for nil:NilClass
     # ./lib/guard/sass/runner.rb:85:in `compile'
     # ./lib/guard/sass/runner.rb:54:in `block (2 levels) in compile_files'
     # ./lib/guard/sass/runner.rb:53:in `block in compile_files'
     # ./lib/guard/sass/runner.rb:50:in `each'
     # ./lib/guard/sass/runner.rb:50:in `compile_files'
     # ./lib/guard/sass/runner.rb:25:in `run'
     # ./spec/guard/sass/runner_spec.rb:21:in `block (3 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `binmode' for nil:NilClass
     #   ./lib/guard/sass/runner.rb:85:in `compile'

  4) Guard::Sass::Runner#run compiles the files
     Failure/Error: mock_engine = mock(::Sass::Engine)
     
     NoMethodError:
       undefined method `mock' for #<RSpec::ExampleGroups::GuardSassRunner::Run:0x0000558d1355d390>
     # ./spec/guard/sass/runner_spec.rb:62:in `block (3 levels) in <top (required)>'

  5) Guard::Sass::Runner#run if errors when compiling shows a warning message
     Failure/Error: ::Sass::Engine.for_file(file, sass_options).render
     
     NoMethodError:
       undefined method `close' for nil:NilClass
     # ./lib/guard/sass/runner.rb:85:in `compile'
     # ./lib/guard/sass/runner.rb:54:in `block (2 levels) in compile_files'
     # ./lib/guard/sass/runner.rb:53:in `block in compile_files'
     # ./lib/guard/sass/runner.rb:50:in `each'
     # ./lib/guard/sass/runner.rb:50:in `compile_files'
     # ./lib/guard/sass/runner.rb:25:in `run'
     # ./spec/guard/sass/runner_spec.rb:37:in `block (4 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `binmode' for nil:NilClass
     #   ./lib/guard/sass/runner.rb:85:in `compile'

  6) Guard::Sass::Runner#run if errors when compiling returns false
     Failure/Error: ::Sass::Engine.for_file(file, sass_options).render
     
     NoMethodError:
       undefined method `close' for nil:NilClass
     # ./lib/guard/sass/runner.rb:85:in `compile'
     # ./lib/guard/sass/runner.rb:54:in `block (2 levels) in compile_files'
     # ./lib/guard/sass/runner.rb:53:in `block in compile_files'
     # ./lib/guard/sass/runner.rb:50:in `each'
     # ./lib/guard/sass/runner.rb:50:in `compile_files'
     # ./lib/guard/sass/runner.rb:25:in `run'
     # ./spec/guard/sass/runner_spec.rb:41:in `block (4 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `binmode' for nil:NilClass
     #   ./lib/guard/sass/runner.rb:85:in `compile'

  7) Guard::Sass::Runner#run if no errors when compiling shows a success message
     Failure/Error: ::Sass::Engine.for_file(file, sass_options).render
     
     NoMethodError:
       undefined method `close' for nil:NilClass
     # ./lib/guard/sass/runner.rb:85:in `compile'
     # ./lib/guard/sass/runner.rb:54:in `block (2 levels) in compile_files'
     # ./lib/guard/sass/runner.rb:53:in `block in compile_files'
     # ./lib/guard/sass/runner.rb:50:in `each'
     # ./lib/guard/sass/runner.rb:50:in `compile_files'
     # ./lib/guard/sass/runner.rb:25:in `run'
     # ./spec/guard/sass/runner_spec.rb:51:in `block (4 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `binmode' for nil:NilClass
     #   ./lib/guard/sass/runner.rb:85:in `compile'

  8) Guard::Sass::Runner#run if no errors when compiling returns true
     Failure/Error: ::Sass::Engine.for_file(file, sass_options).render
     
     NoMethodError:
       undefined method `close' for nil:NilClass
     # ./lib/guard/sass/runner.rb:85:in `compile'
     # ./lib/guard/sass/runner.rb:54:in `block (2 levels) in compile_files'
     # ./lib/guard/sass/runner.rb:53:in `block in compile_files'
     # ./lib/guard/sass/runner.rb:50:in `each'
     # ./lib/guard/sass/runner.rb:50:in `compile_files'
     # ./lib/guard/sass/runner.rb:25:in `run'
     # ./spec/guard/sass/runner_spec.rb:55:in `block (4 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `binmode' for nil:NilClass
     #   ./lib/guard/sass/runner.rb:85:in `compile'

  9) Guard::Sass#initialize when no options given uses defaults
     Failure/Error: super(options)
     
     NoMethodError:
       undefined method `session' for nil:NilClass
     # ./lib/guard/sass.rb:79:in `initialize'
     # ./spec/guard/sass_spec.rb:5:in `new'
     # ./spec/guard/sass_spec.rb:5:in `block (2 levels) in <top (required)>'
     # ./spec/guard/sass_spec.rb:11:in `block (2 levels) in <top (required)>'

  10) Guard::Sass#initialize when options given merges them with defaults
      Failure/Error: super(options)
      
      NoMethodError:
        undefined method `session' for nil:NilClass
      # ./lib/guard/sass.rb:79:in `initialize'
      # ./spec/guard/sass_spec.rb:35:in `new'
      # ./spec/guard/sass_spec.rb:35:in `block (4 levels) in <top (required)>'
      # ./spec/guard/sass_spec.rb:11:in `block (2 levels) in <top (required)>'

  11) Guard::Sass#initialize with an :input option creates a watcher
      Failure/Error: super(options)
      
      NoMethodError:
        undefined method `session' for nil:NilClass
      # ./lib/guard/sass.rb:79:in `initialize'
      # ./spec/guard/sass_spec.rb:55:in `new'
      # ./spec/guard/sass_spec.rb:55:in `block (4 levels) in <top (required)>'
      # ./spec/guard/sass_spec.rb:11:in `block (2 levels) in <top (required)>'

  12) Guard::Sass#initialize with an :input option watches all *.s[ac]ss files
      Failure/Error: super(options)
      
      NoMethodError:
        undefined method `session' for nil:NilClass
      # ./lib/guard/sass.rb:79:in `initialize'
      # ./spec/guard/sass_spec.rb:55:in `new'
      # ./spec/guard/sass_spec.rb:55:in `block (4 levels) in <top (required)>'
      # ./spec/guard/sass_spec.rb:11:in `block (2 levels) in <top (required)>'

  13) Guard::Sass#initialize with an :input option without an output option sets the output directory to the input directory
      Failure/Error: super(options)
      
      NoMethodError:
        undefined method `session' for nil:NilClass
      # ./lib/guard/sass.rb:79:in `initialize'
      # ./spec/guard/sass_spec.rb:55:in `new'
      # ./spec/guard/sass_spec.rb:55:in `block (4 levels) in <top (required)>'
      # ./spec/guard/sass_spec.rb:11:in `block (2 levels) in <top (required)>'

  14) Guard::Sass#initialize with an :input option with an output option uses the output directory
      Failure/Error: super(options)
      
      NoMethodError:
        undefined method `session' for nil:NilClass
      # ./lib/guard/sass.rb:79:in `initialize'
      # ./spec/guard/sass_spec.rb:72:in `new'
      # ./spec/guard/sass_spec.rb:72:in `block (5 levels) in <top (required)>'
      # ./spec/guard/sass_spec.rb:11:in `block (2 levels) in <top (required)>'

  15) Guard::Sass#start does not call #run_all
      Failure/Error: super(options)
      
      NoMethodError:
        undefined method `session' for nil:NilClass
      # ./lib/guard/sass.rb:79:in `initialize'
      # ./spec/guard/sass_spec.rb:5:in `new'
      # ./spec/guard/sass_spec.rb:5:in `block (2 levels) in <top (required)>'
      # ./spec/guard/sass_spec.rb:11:in `block (2 levels) in <top (required)>'

  16) Guard::Sass#start :all_on_start option is true calls #run_all
      Failure/Error: super(options)
      
      NoMethodError:
        undefined method `session' for nil:NilClass
      # ./lib/guard/sass.rb:79:in `initialize'
      # ./spec/guard/sass_spec.rb:89:in `new'
      # ./spec/guard/sass_spec.rb:89:in `block (4 levels) in <top (required)>'
      # ./spec/guard/sass_spec.rb:11:in `block (2 levels) in <top (required)>'

  17) Guard::Sass#run_all calls #run_on_changes with all watched files
      Failure/Error: super(options)
      
      NoMethodError:
        undefined method `session' for nil:NilClass
      # ./lib/guard/sass.rb:79:in `initialize'
      # ./spec/guard/sass_spec.rb:99:in `new'
      # ./spec/guard/sass_spec.rb:99:in `block (3 levels) in <top (required)>'
      # ./spec/guard/sass_spec.rb:11:in `block (2 levels) in <top (required)>'

  18) Guard::Sass#run_on_changes starts the Runner
      Failure/Error: super(options)
      
      NoMethodError:
        undefined method `session' for nil:NilClass
      # ./lib/guard/sass.rb:79:in `initialize'
      # ./spec/guard/sass_spec.rb:112:in `new'
      # ./spec/guard/sass_spec.rb:112:in `block (3 levels) in <top (required)>'
      # ./spec/guard/sass_spec.rb:11:in `block (2 levels) in <top (required)>'

  19) Guard::Sass#run_on_changes if paths given contain partials calls #run_all
      Failure/Error: super(options)
      
      NoMethodError:
        undefined method `session' for nil:NilClass
      # ./lib/guard/sass.rb:79:in `initialize'
      # ./spec/guard/sass_spec.rb:112:in `new'
      # ./spec/guard/sass_spec.rb:112:in `block (3 levels) in <top (required)>'
      # ./spec/guard/sass_spec.rb:11:in `block (2 levels) in <top (required)>'

  20) Guard::Sass#run_on_changes if paths given contain partials and :smart_partials is given calls #resolve_partials_to_owners
      Got 0 failures and 2 other errors:

      20.1) Failure/Error: super(options)
            
            NoMethodError:
              undefined method `session' for nil:NilClass
            # ./lib/guard/sass.rb:79:in `initialize'
            # ./spec/guard/sass_spec.rb:112:in `new'
            # ./spec/guard/sass_spec.rb:112:in `block (3 levels) in <top (required)>'
            # ./spec/guard/sass_spec.rb:11:in `block (2 levels) in <top (required)>'

      20.2) Failure/Error: super(options)
            
            NoMethodError:
              undefined method `session' for nil:NilClass
            # ./lib/guard/sass.rb:79:in `initialize'
            # ./spec/guard/sass_spec.rb:112:in `new'
            # ./spec/guard/sass_spec.rb:112:in `block (3 levels) in <top (required)>'
            # ./spec/guard/sass_spec.rb:122:in `block (5 levels) in <top (required)>'

Deprecation Warnings:

Using `should_receive` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /home/alex/Projects/ruby/guard-sass/spec/guard/sass/formatter_spec.rb:13:in `block (4 levels) in <top (required)>'.


If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
`config.raise_errors_for_deprecations!`, and it will turn the
deprecation warnings into errors, giving you the full backtrace.

1 deprecation warning total

Finished in 0.01667 seconds (files took 0.21225 seconds to load)
24 examples, 20 failures

Failed examples:

rspec ./spec/guard/sass/formatter_spec.rb:12 # Guard::Sass::Formatter#success if success is to be shown shows a success message
rspec ./spec/guard/sass/formatter_spec.rb:33 # Guard::Sass::Formatter#error shows an error message
rspec ./spec/guard/sass/runner_spec.rb:20 # Guard::Sass::Runner#run returns a list of changed files
rspec ./spec/guard/sass/runner_spec.rb:59 # Guard::Sass::Runner#run compiles the files
rspec ./spec/guard/sass/runner_spec.rb:34 # Guard::Sass::Runner#run if errors when compiling shows a warning message
rspec ./spec/guard/sass/runner_spec.rb:40 # Guard::Sass::Runner#run if errors when compiling returns false
rspec ./spec/guard/sass/runner_spec.rb:49 # Guard::Sass::Runner#run if no errors when compiling shows a success message
rspec ./spec/guard/sass/runner_spec.rb:54 # Guard::Sass::Runner#run if no errors when compiling returns true
rspec ./spec/guard/sass_spec.rb:19 # Guard::Sass#initialize when no options given uses defaults
rspec ./spec/guard/sass_spec.rb:38 # Guard::Sass#initialize when options given merges them with defaults
rspec ./spec/guard/sass_spec.rb:57 # Guard::Sass#initialize with an :input option creates a watcher
rspec ./spec/guard/sass_spec.rb:61 # Guard::Sass#initialize with an :input option watches all *.s[ac]ss files
rspec ./spec/guard/sass_spec.rb:66 # Guard::Sass#initialize with an :input option without an output option sets the output directory to the input directory
rspec ./spec/guard/sass_spec.rb:74 # Guard::Sass#initialize with an :input option with an output option uses the output directory
rspec ./spec/guard/sass_spec.rb:83 # Guard::Sass#start does not call #run_all
rspec ./spec/guard/sass_spec.rb:91 # Guard::Sass#start :all_on_start option is true calls #run_all
rspec ./spec/guard/sass_spec.rb:105 # Guard::Sass#run_all calls #run_on_changes with all watched files
rspec ./spec/guard/sass_spec.rb:130 # Guard::Sass#run_on_changes starts the Runner
rspec ./spec/guard/sass_spec.rb:115 # Guard::Sass#run_on_changes if paths given contain partials calls #run_all
rspec ./spec/guard/sass_spec.rb:123 # Guard::Sass#run_on_changes if paths given contain partials and :smart_partials is given calls #resolve_partials_to_owners

/home/alex/.rbenv/versions/2.4.2/bin/ruby -I/home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib:/home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-support-3.7.0/lib /home/alex/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.