growl_notifier 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{growl_notifier}
8
- s.version = "1.2.0"
8
+ s.version = "1.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Satoshi Nakagawa", "Eloy Duran", "JP Hastings-Spital"]
12
- s.date = %q{2010-08-02}
12
+ s.date = %q{2010-08-03}
13
13
  s.description = %q{A ruby library which allows you to send Growl notifications.}
14
14
  s.email = ["psychs@limechat.net", "e.duran@superalloy.nl", "jphastings@gmail.com"]
15
15
  s.extra_rdoc_files = [
@@ -27,7 +27,7 @@ module Growl
27
27
  level = parse_level(level)
28
28
  if LEVELS.index(@level) <= LEVELS.index(level)
29
29
  title ||= level.to_s.capitalize
30
- @log.notify(level.to_s.capitalize, title, message)
30
+ @log.notify(level.to_s.capitalize, title, message,:priority => LEVELS.index(level) - 2)
31
31
  end
32
32
  end
33
33
 
@@ -36,7 +36,7 @@ module Growl
36
36
  case level
37
37
  when Symbol,String
38
38
  (LEVELS.include? level.to_sym) ? level.to_sym : :info
39
- when 0..5
39
+ when 0..4
40
40
  LEVELS[level]
41
41
  else
42
42
  raise ArgumentError, "Please use Symbols (see Growl::Logger::LEVELS) or Logger Constants (eg. Logger::WARN)"
@@ -88,10 +88,12 @@ module Growl
88
88
  #
89
89
  # Register the applications name, the notifications plus the default notifications that will be used and the icon that's to be used in the Growl notifications.
90
90
  #
91
- # Growl::Notifier.sharedInstance.register 'FoodApp', ['YourHamburgerIsReady', 'OhSomeoneElseAteIt'], ['DefaultNotification], OSX::NSImage.imageNamed('GreasyHamburger')
91
+ # Growl::Notifier.sharedInstance.register 'FoodApp', ['YourHamburgerIsReady', 'OhSomeoneElseAteIt'], ['DefaultNotification'], 'GreasyHamburger.png')
92
92
  def register(application_name, notifications, default_notifications = nil, application_icon = nil)
93
- @application_name, @application_icon = application_name, (application_icon || OSX::NSApplication.sharedApplication.applicationIconImage)
94
- @notifications, @default_notifications = notifications, (default_notifications || notifications)
93
+ @application_name = application_name
94
+ @application_icon = OSX::NSImage.alloc.initWithContentsOfFile(application_icon) || OSX::NSApplication.sharedApplication.applicationIconImage
95
+ @notifications = notifications
96
+ @default_notifications = default_notifications || notifications
95
97
  @callbacks = {}
96
98
  send_registration!
97
99
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: growl_notifier
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 0
10
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Satoshi Nakagawa
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-08-02 00:00:00 +01:00
20
+ date: 2010-08-03 00:00:00 +01:00
21
21
  default_executable:
22
22
  dependencies: []
23
23