compass-growl 0.0.5 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Compass Growl plugin
2
2
 
3
3
 
4
- ## Warning this installs the `sass 3.1.0.alpha` and the `compass 0.11.beta.4` this will not work in an version of compass < 0.11.beta.3!
4
+ ## Warning: this installs `sass 3.1.0.alpha` and `compass 0.11.1`. This will not work in any version of compass < 0.11.beta.3!
5
5
 
6
6
  ## Usage
7
7
 
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
2
2
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
3
3
 
4
4
  s.name = %q{compass-growl}
5
- s.version = '0.0.5'
5
+ s.version = '0.1.1'
6
6
  s.platform = Gem::Platform::RUBY
7
7
 
8
8
  s.authors = ["Scott Davis"]
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.add_development_dependency "bundler", ">= 1.0.0"
19
19
  s.add_development_dependency "rspec", "~> 2.0.0"
20
20
  s.add_development_dependency "mocha"
21
- s.add_dependency 'compass', '~> 0.11.1'
22
- s.add_dependency 'growl_notify'
21
+ s.add_dependency 'compass', '>= 0.12'
22
+ s.add_dependency 'ruby_gntp'
23
23
 
24
24
  end
data/lib/compass-growl.rb CHANGED
@@ -1,34 +1,53 @@
1
1
  require "rubygems"
2
- require 'growl_notify'
2
+ require 'compass'
3
+ require 'ruby_gntp'
4
+
3
5
 
4
6
  module CompassGrowl
5
7
  ICON = File.join(File.expand_path('../', __FILE__), '..', 'assets', 'compass_icon.png')
6
- end
8
+ GROWL = GNTP.new
7
9
 
8
- GrowlNotify.config do |config|
9
- config.notifications = config.default_notifications = ["compass"]
10
- config.application_name = config.notifications.first
11
- config.icon = CompassGrowl::ICON
12
- end
10
+ LOADED = "Compass Growl Loaded"
11
+ STYLESHEET_SAVED = "Stylesheet Saved"
12
+ STYLESHEET_ERROR = "Stylesheet Error"
13
+ SPRITE_SAVED = "Sprite Saved"
14
+ GROWL.register({:notifications => [{ :name => LOADED, :enabled => true },
15
+ { :name => STYLESHEET_SAVED, :enabled => true },
16
+ { :name => SPRITE_SAVED, :enabled => true },
17
+ { :name => STYLESHEET_ERROR, :enabled => true }]
18
+ })
19
+
20
+ def growl(type, message)
21
+ GROWL.notify({
22
+ :name => type,
23
+ :title => "Compass",
24
+ :text => message,
25
+ :icon => "file://#{ICON}"
26
+ })
27
+ end
28
+
29
+ def init
30
+ CompassGrowl.growl(STYLESHEET_ERROR, "Compass Growl has been initialized")
31
+
32
+ config = Compass.configuration
33
+
34
+ config.on_stylesheet_saved do |filename|
35
+ CompassGrowl.growl(STYLESHEET_SAVED, "Stylesheet: #{File.basename(filename)} saved")
36
+ end
13
37
 
14
- GrowlNotify.normal(:title => 'Compass', :description => "Compass Growl Loaded")
15
-
16
- module Compass
17
- module Configuration
18
- class Data
19
- alias :old_run_callback :run_callback
20
- def run_callback(event, *args)
21
- case event
22
- when :stylesheet_saved
23
- GrowlNotify.normal(:title => 'Compass', :description => "Stylesheet: #{File.basename(args.first)} saved")
24
- when :sprite_saved
25
- GrowlNotify.normal(:title => 'Compass', :description => "Sprite: #{File.basename(args.first)} saved")
26
- when :stylesheet_error
27
- GrowlNotify.normal(:title => 'Compass', :description => "Stylesheet Error: #{File.basename(args.first)} \n had the following error:\n #{args.last}")
28
- end
29
- old_run_callback(event, *args)
30
- end
31
-
38
+ config.on_sprite_saved do |filename|
39
+ CompassGrowl.growl(SPRITE_SAVED, "Sprite: #{File.basename(filename)} saved")
32
40
  end
41
+
42
+ config.on_stylesheet_error do |filename, error|
43
+ CompassGrowl.growl(STYLESHEET_ERROR, "Stylesheet Error: #{File.basename(filename)} \n had the following error:\n #{error}")
44
+ end
45
+
33
46
  end
34
- end
47
+
48
+ extend self
49
+
50
+ end
51
+
52
+ CompassGrowl.init
53
+
metadata CHANGED
@@ -1,107 +1,77 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: compass-growl
3
- version: !ruby/object:Gem::Version
4
- hash: 21
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 5
10
- version: 0.0.5
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Scott Davis
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-04-27 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-01-19 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: bundler
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70168238008200 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 23
29
- segments:
30
- - 1
31
- - 0
32
- - 0
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
33
21
  version: 1.0.0
34
22
  type: :development
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: rspec
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70168238008200
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ requirement: &70168238007740 !ruby/object:Gem::Requirement
40
28
  none: false
41
- requirements:
29
+ requirements:
42
30
  - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 15
45
- segments:
46
- - 2
47
- - 0
48
- - 0
31
+ - !ruby/object:Gem::Version
49
32
  version: 2.0.0
50
33
  type: :development
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: mocha
54
34
  prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *70168238007740
36
+ - !ruby/object:Gem::Dependency
37
+ name: mocha
38
+ requirement: &70168238007360 !ruby/object:Gem::Requirement
56
39
  none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 3
61
- segments:
62
- - 0
63
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
64
44
  type: :development
65
- version_requirements: *id003
66
- - !ruby/object:Gem::Dependency
67
- name: compass
68
45
  prerelease: false
69
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *70168238007360
47
+ - !ruby/object:Gem::Dependency
48
+ name: compass
49
+ requirement: &70168238006820 !ruby/object:Gem::Requirement
70
50
  none: false
71
- requirements:
72
- - - ~>
73
- - !ruby/object:Gem::Version
74
- hash: 49
75
- segments:
76
- - 0
77
- - 11
78
- - 1
79
- version: 0.11.1
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0.12'
80
55
  type: :runtime
81
- version_requirements: *id004
82
- - !ruby/object:Gem::Dependency
83
- name: growl_notify
84
56
  prerelease: false
85
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *70168238006820
58
+ - !ruby/object:Gem::Dependency
59
+ name: ruby_gntp
60
+ requirement: &70168236068860 !ruby/object:Gem::Requirement
86
61
  none: false
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- hash: 3
91
- segments:
92
- - 0
93
- version: "0"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
94
66
  type: :runtime
95
- version_requirements: *id005
67
+ prerelease: false
68
+ version_requirements: *70168236068860
96
69
  description: Add growl notifications for compass
97
70
  email: jetviper21@gmail.com
98
71
  executables: []
99
-
100
72
  extensions: []
101
-
102
73
  extra_rdoc_files: []
103
-
104
- files:
74
+ files:
105
75
  - .gitignore
106
76
  - Gemfile
107
77
  - Gemfile.lock
@@ -112,38 +82,28 @@ files:
112
82
  - lib/compass-growl.rb
113
83
  homepage: http://github.com/jetviper21/compass-growl
114
84
  licenses: []
115
-
116
85
  post_install_message:
117
- rdoc_options:
86
+ rdoc_options:
118
87
  - --charset=UTF-8
119
- require_paths:
88
+ require_paths:
120
89
  - lib
121
- required_ruby_version: !ruby/object:Gem::Requirement
90
+ required_ruby_version: !ruby/object:Gem::Requirement
122
91
  none: false
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- hash: 3
127
- segments:
128
- - 0
129
- version: "0"
130
- required_rubygems_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
131
97
  none: false
132
- requirements:
133
- - - ">="
134
- - !ruby/object:Gem::Version
135
- hash: 23
136
- segments:
137
- - 1
138
- - 3
139
- - 6
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
140
101
  version: 1.3.6
141
102
  requirements: []
142
-
143
103
  rubyforge_project:
144
- rubygems_version: 1.7.2
104
+ rubygems_version: 1.8.10
145
105
  signing_key:
146
106
  specification_version: 3
147
107
  summary: Add Growl notifications to compass
148
108
  test_files: []
149
-
109
+ has_rdoc: