notifier 0.4.0 → 0.4.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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- notifier (0.4.0)
4
+ notifier (0.4.1)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -22,6 +22,10 @@ module Notifier
22
22
  end
23
23
 
24
24
  def write(*contents)
25
+ contents.map! do |content|
26
+ content.force_encoding("utf-8") rescue content
27
+ end
28
+
25
29
  socket = TCPSocket.open(host, port)
26
30
  message = [*contents, line_break(2)].join(line_break)
27
31
  socket.write(message)
@@ -14,7 +14,7 @@ module Notifier
14
14
  command = [
15
15
  "growlnotify",
16
16
  "--name", "test_notifier",
17
- "--image", options[:image],
17
+ "--image", options.fetch(:image, ''),
18
18
  "--priority", "2",
19
19
  "--message", options[:message],
20
20
  options[:title]
@@ -2,7 +2,7 @@ module Notifier
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 4
5
- PATCH = 0
5
+ PATCH = 1
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-20 00:00:00.000000000 Z
12
+ date: 2012-09-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec