compass-notify 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +47 -0
- data/compass-notify.gemspec +19 -0
- data/lib/compass-notify.rb +30 -0
- metadata +99 -0
data/README.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# CompassNotify
|
2
|
+
|
3
|
+
Get notifications (via Mac OS X Notification Center) after your css has
|
4
|
+
been compiled or an error has been found.
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
Add `require 'compass-notify'` to your `config.rb` to get notifications
|
9
|
+
on successfully saved CSS-files and errors.
|
10
|
+
|
11
|
+
Additionally, use `CompassNotify.notify('title', 'message')` in any
|
12
|
+
other hooks you may have (e.g. compression) to get notifications too.
|
13
|
+
|
14
|
+
## Thanks
|
15
|
+
|
16
|
+
Thanks to Scott Davis for his
|
17
|
+
[compass-growl](https://github.com/Compass/compass-growl) which I simply
|
18
|
+
adapted to Notification Center for those who do not have growl (why
|
19
|
+
don't they?!).
|
20
|
+
|
21
|
+
Thanks to Eloy Durán for his
|
22
|
+
[terminal-notifier](https://github.com/alloy/terminal-notifier) without
|
23
|
+
which I couldn't use Notification Center from within ruby (or cli).
|
24
|
+
|
25
|
+
## License
|
26
|
+
Copyright (c) 2012, Andreas Lappe <nd@kaeufli.ch>
|
27
|
+
All rights reserved.
|
28
|
+
|
29
|
+
Redistribution and use in source and binary forms, with or without
|
30
|
+
modification, are permitted provided that the following conditions are met:
|
31
|
+
|
32
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
33
|
+
list of conditions and the following disclaimer.
|
34
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
35
|
+
this list of conditions and the following disclaimer in the documentation
|
36
|
+
and/or other materials provided with the distribution.
|
37
|
+
|
38
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
39
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
40
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
41
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
42
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
43
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
44
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
45
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
46
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
47
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
3
|
+
|
4
|
+
s.name = %q{compass-notify}
|
5
|
+
s.version = '0.0.1'
|
6
|
+
s.platform = Gem::Platform::RUBY
|
7
|
+
|
8
|
+
s.authors = ["Andreas Lappe"]
|
9
|
+
s.description = %q{Add notifications (via Notification Center on Mac OS X) to compass}
|
10
|
+
s.summary = %q{Mac OS X Notifications for compass}
|
11
|
+
s.email = %q{nd@kaeufli.ch}
|
12
|
+
s.files = `git ls-files`.split("\n")
|
13
|
+
s.require_path = 'lib'
|
14
|
+
s.homepage = %q{https://github.com/alappe/compass-notify}
|
15
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
16
|
+
s.required_rubygems_version = ">= 1.3.6"
|
17
|
+
s.add_dependency 'compass', '>= 0.12'
|
18
|
+
s.add_dependency 'terminal-notifier', '>= 1.4.2'
|
19
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'compass'
|
3
|
+
require 'terminal-notifier'
|
4
|
+
|
5
|
+
module CompassNotify
|
6
|
+
|
7
|
+
def notify(title, message)
|
8
|
+
TerminalNotifier.notify(message, :title => title)
|
9
|
+
end
|
10
|
+
|
11
|
+
def init
|
12
|
+
config = Compass.configuration
|
13
|
+
|
14
|
+
config.on_stylesheet_saved do |filename|
|
15
|
+
CompassNotify.notify('Stylesheet', "#{File.basename(filename)} saved…")
|
16
|
+
end
|
17
|
+
|
18
|
+
config.on_sprite_saved do |filename|
|
19
|
+
CompassNotify.notify('Sprite', "#{File.basename(filename)} saved…")
|
20
|
+
end
|
21
|
+
|
22
|
+
config.on_stylesheet_error do |filename, error|
|
23
|
+
CompassNotify.notify('Stylesheet Error', "#{File.basename(filename)} had the following error: #{error}")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
extend self
|
28
|
+
end
|
29
|
+
|
30
|
+
CompassNotify.init
|
metadata
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: compass-notify
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Andreas Lappe
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2012-12-15 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: compass
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 19
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 12
|
32
|
+
version: "0.12"
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: terminal-notifier
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 1
|
46
|
+
- 4
|
47
|
+
- 2
|
48
|
+
version: 1.4.2
|
49
|
+
type: :runtime
|
50
|
+
version_requirements: *id002
|
51
|
+
description: Add notifications (via Notification Center on Mac OS X) to compass
|
52
|
+
email: nd@kaeufli.ch
|
53
|
+
executables: []
|
54
|
+
|
55
|
+
extensions: []
|
56
|
+
|
57
|
+
extra_rdoc_files: []
|
58
|
+
|
59
|
+
files:
|
60
|
+
- README.md
|
61
|
+
- compass-notify.gemspec
|
62
|
+
- lib/compass-notify.rb
|
63
|
+
homepage: https://github.com/alappe/compass-notify
|
64
|
+
licenses: []
|
65
|
+
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options:
|
68
|
+
- --charset=UTF-8
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 3
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
version: "0"
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
hash: 23
|
86
|
+
segments:
|
87
|
+
- 1
|
88
|
+
- 3
|
89
|
+
- 6
|
90
|
+
version: 1.3.6
|
91
|
+
requirements: []
|
92
|
+
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 1.8.24
|
95
|
+
signing_key:
|
96
|
+
specification_version: 3
|
97
|
+
summary: Mac OS X Notifications for compass
|
98
|
+
test_files: []
|
99
|
+
|