Skip to content
Browse files

inital version

  • Loading branch information...
0 parents commit 5e91b6f8bc5bcbbc726ca9e6d83c92f0eeb85674 @scottdavis scottdavis committed
Showing with 99 additions and 0 deletions.
  1. +4 −0 Gemfile
  2. +35 −0 Gemfile.lock
  3. BIN assets/compass_icon.png
  4. +25 −0 compass-growl.gemspec
  5. +35 −0 lib/compass-growl.rb
4 Gemfile
@@ -0,0 +1,4 @@
+source 'http://rubygems.org'
+gemspec
+
+gem 'drx'
35 Gemfile.lock
@@ -0,0 +1,35 @@
+PATH
+ remote: .
+ specs:
+ compass-growl (0.0.1)
+ growl_notify
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ diff-lcs (1.1.2)
+ drx (0.4.5)
+ growl_notify (0.0.1)
+ rb-appscript
+ mocha (0.9.12)
+ rb-appscript (0.6.0)
+ rspec (2.0.1)
+ rspec-core (~> 2.0.1)
+ rspec-expectations (~> 2.0.1)
+ rspec-mocks (~> 2.0.1)
+ rspec-core (2.0.1)
+ rspec-expectations (2.0.1)
+ diff-lcs (>= 1.1.2)
+ rspec-mocks (2.0.1)
+ rspec-core (~> 2.0.1)
+ rspec-expectations (~> 2.0.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ bundler (>= 1.0.0)
+ compass-growl!
+ drx
+ mocha
+ rspec (~> 2.0.0)
BIN assets/compass_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 compass-growl.gemspec
@@ -0,0 +1,25 @@
+Gem::Specification.new do |s|
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+
+ s.name = %q{compass-growl}
+ s.version = '0.0.1'
+ s.platform = Gem::Platform::RUBY
+
+ s.authors = ["Scott Davis"]
+ s.description = %q{Add growl notifications for compass using the growl gem and compass callback api}
+ s.summary = %q{Add Growl notifications to compass}
+ s.email = %q{jetviper21@gmail.com}
+ s.date = Date.today.to_s
+ s.files = `git ls-files`.split("\n")
+ s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
+ s.require_path = 'lib'
+ s.homepage = %q{http://github.com/jetviper21/compass-growl}
+ s.rdoc_options = ["--charset=UTF-8"]
+ s.required_rubygems_version = ">= 1.3.6"
+ s.add_development_dependency "bundler", ">= 1.0.0"
+ s.add_development_dependency "rspec", "~> 2.0.0"
+ s.add_development_dependency "mocha"
+ #s.add_dependency 'compass', '~> 0.11.beta.2'
+ s.add_dependency 'growl_notify'
+
+end
35 lib/compass-growl.rb
@@ -0,0 +1,35 @@
+require "rubygems"
+require "bundler/setup"
+require 'growl_notify'
+
+module CompassGrowl
+ ICON = File.join(File.expand_path('../', __FILE__), '..', 'assets', 'compass_icon.png')
+end
+
+GrowlNotify.config do |config|
+ config.notifications = config.default_notifications = ["compass"]
+ config.application_name = config.notifications.first
+ config.icon = CompassGrowl::ICON
+end
+
+GrowlNotify.normal(:title => 'Compass', :description => "Compass Growl Loaded")
+
+module Compass
+ module Configuration
+ class Data
+ alias :old_run_callback :run_callback
+ def run_callback(event, *args)
+ case event
+ when :stylesheet_saved
+ GrowlNotify.normal(:title => 'Compass', :description => "Stylesheet: #{File.basename(args.first)} saved")
+ when :sprite_saved
+ GrowlNotify.normal(:title => 'Compass', :description => "Sprite: #{File.basename(args.first)} saved")
+ when :stylesheet_error
+ GrowlNotify.normal(:title => 'Compass', :description => "Stylesheet Error: #{File.basename(args.first)} \n had the following error:\n #{args.last}")
+ end
+ old_run_callback(event, *args)
+ end
+
+ end
+ end
+end

0 comments on commit 5e91b6f

Please sign in to comment.
Something went wrong with that request. Please try again.