libnotify 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -14,11 +14,10 @@ begin
14
14
  gem.has_rdoc = true
15
15
  gem.extra_rdoc_files = [ "README.rdoc" ]
16
16
 
17
- gem.add_dependency "ffi"
17
+ gem.add_dependency "ffi", ">= 0.6.2"
18
18
 
19
- gem.add_development_dependency "riot"
19
+ gem.add_development_dependency "riot", ">= 0.1.12.pre"
20
20
  gem.add_development_dependency "riot_notifier", ">= 0.0.7"
21
- gem.add_development_dependency "rr"
22
21
 
23
22
  gem.test_files = Dir.glob('test/test_*.rb')
24
23
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/lib/libnotify.rb CHANGED
@@ -17,7 +17,7 @@ module Libnotify
17
17
  module FFI
18
18
  extend ::FFI::Library
19
19
 
20
- ffi_lib 'libnotify'
20
+ ffi_lib %w(libnotify libnotify.so libnotify.so.1)
21
21
 
22
22
  enum :urgency, [ :low, :normal, :critical ]
23
23
 
data/libnotify.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{libnotify}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Peter Suschlik"]
12
- s.date = %q{2010-02-05}
12
+ s.date = %q{2010-02-16}
13
13
  s.email = %q{peter-libnotify@suschlik.de}
14
14
  s.extra_rdoc_files = [
15
15
  "README.rdoc"
@@ -39,21 +39,18 @@ Gem::Specification.new do |s|
39
39
  s.specification_version = 3
40
40
 
41
41
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
42
- s.add_runtime_dependency(%q<ffi>, [">= 0"])
43
- s.add_development_dependency(%q<riot>, [">= 0"])
42
+ s.add_runtime_dependency(%q<ffi>, [">= 0.6.2"])
43
+ s.add_development_dependency(%q<riot>, [">= 0.1.12.pre"])
44
44
  s.add_development_dependency(%q<riot_notifier>, [">= 0.0.7"])
45
- s.add_development_dependency(%q<rr>, [">= 0"])
46
45
  else
47
- s.add_dependency(%q<ffi>, [">= 0"])
48
- s.add_dependency(%q<riot>, [">= 0"])
46
+ s.add_dependency(%q<ffi>, [">= 0.6.2"])
47
+ s.add_dependency(%q<riot>, [">= 0.1.12.pre"])
49
48
  s.add_dependency(%q<riot_notifier>, [">= 0.0.7"])
50
- s.add_dependency(%q<rr>, [">= 0"])
51
49
  end
52
50
  else
53
- s.add_dependency(%q<ffi>, [">= 0"])
54
- s.add_dependency(%q<riot>, [">= 0"])
51
+ s.add_dependency(%q<ffi>, [">= 0.6.2"])
52
+ s.add_dependency(%q<riot>, [">= 0.1.12.pre"])
55
53
  s.add_dependency(%q<riot_notifier>, [">= 0.0.7"])
56
- s.add_dependency(%q<rr>, [">= 0"])
57
54
  end
58
55
  end
59
56
 
data/test/helper.rb CHANGED
@@ -5,7 +5,4 @@ require 'riot_notifier'
5
5
  require 'libnotify'
6
6
 
7
7
  Riot.reporter = RiotNotifier
8
-
9
- require 'rr'
10
-
11
- Riot::Situation.send :include, RR::Adapters::RRMethods
8
+ Riot.rr
@@ -7,14 +7,12 @@ context Libnotify do
7
7
  asserts("responds to show").respond_to(:show)
8
8
 
9
9
  asserts("#new calls API#new") do
10
- mock(Libnotify::API).new(hash_including(:body => "test"))
10
+ mock(Libnotify::API).new(hash_including(:body => "test")) { true }
11
11
  Libnotify.new(:body => "test")
12
- RR.verify
13
12
  end
14
13
  asserts("#show calls API#show") do
15
- mock(Libnotify::API).show(hash_including(:body => "test"))
14
+ mock(Libnotify::API).show(hash_including(:body => "test")) { true }
16
15
  Libnotify.show(:body => "test")
17
- RR.verify
18
16
  end
19
17
  end
20
18
 
@@ -59,13 +57,18 @@ context Libnotify::API do
59
57
 
60
58
  # TODO Mock FFI calls with rrriot.
61
59
  context "show!" do
62
- setup { topic.new(:timeout => 1.0, :icon_path => "/usr/share/icons/gnome/scalable/emblems/emblem-default.svg") }
60
+ setup do
61
+ topic.new(:timeout => 1.0, :icon_path => "/usr/share/icons/gnome/scalable/emblems/emblem-favorite.svg")
62
+ end
63
63
 
64
- [ :low, :normal, :critical ].each do |urgency|
65
- asserts("with urgency #{urgency}") do
66
- topic.summary = "#{RUBY_VERSION} at #{RUBY_PLATFORM}"
67
- topic.body = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : '?'
68
- topic.urgency = urgency; topic.show!
64
+ context "for real" do
65
+ [ :low, :normal, :critical ].each do |urgency|
66
+ asserts("with urgency #{urgency}") do
67
+ topic.summary = "#{RUBY_VERSION} at #{RUBY_PLATFORM}"
68
+ topic.body = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : '?'
69
+ topic.urgency = urgency
70
+ topic.show!
71
+ end
69
72
  end
70
73
  end
71
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libnotify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Suschlik
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-05 00:00:00 +01:00
12
+ date: 2010-02-16 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: "0"
23
+ version: 0.6.2
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: riot
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: "0"
33
+ version: 0.1.12.pre
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: riot_notifier
@@ -42,16 +42,6 @@ dependencies:
42
42
  - !ruby/object:Gem::Version
43
43
  version: 0.0.7
44
44
  version:
45
- - !ruby/object:Gem::Dependency
46
- name: rr
47
- type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: "0"
54
- version:
55
45
  description:
56
46
  email: peter-libnotify@suschlik.de
57
47
  executables: []