minitest-libnotify 0.0.1 → 0.1.0

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/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ doc/
@@ -1,6 +1,6 @@
1
1
  = minitest-libnotify
2
2
 
3
- Test notifier for minitest via libnotify.
3
+ Test notifier for minitest[https://github.com/seattlerb/minitest] via libnotify[https://github.com/splattael/libnotify].
4
4
 
5
5
  Source[http://github.com/splattael/minitest-libnotify] |
6
6
  RDoc[http://rdoc.info/github/splattael/minitest-libnotify/master/file/README.rdoc]
data/Rakefile CHANGED
@@ -1 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ require 'rdoc/task'
4
+
5
+ Rake::RDocTask.new do |rd|
6
+ rd.main = "README.rdoc"
7
+ rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
8
+ rd.rdoc_dir = "doc"
9
+ end
@@ -1,5 +1,6 @@
1
1
  require 'minitest/unit'
2
2
  require 'libnotify'
3
+ require 'minitest/libnotify/version'
3
4
 
4
5
  module MiniTest
5
6
  # Test notifier for minitest via libnotify.
@@ -12,18 +13,19 @@ module MiniTest
12
13
  # require 'minitest/libnotify'
13
14
  #
14
15
  class Libnotify
15
- VERSION = "0.0.1"
16
-
17
16
  def initialize io
18
17
  @io = io
19
18
  @libnotify = begin
20
19
  require 'libnotify'
21
20
  ::Libnotify.new(:timeout => 2.5, :append => false)
21
+ rescue => e
22
+ warn e
23
+ false
22
24
  end
23
25
  end
24
26
 
25
27
  def puts(*o)
26
- if o.first =~ /(\d+) failures, (\d+) errors/
28
+ if @libnotify && o.first =~ /(\d+) failures, (\d+) errors/
27
29
  description = [ defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby", RUBY_VERSION, RUBY_PLATFORM ].join(" ")
28
30
  @libnotify.body = o.first
29
31
  if $1.to_i > 0 || $2.to_i > 0 # fail?
@@ -36,9 +38,8 @@ module MiniTest
36
38
  @libnotify.icon_path = "face-laugh.*"
37
39
  end
38
40
  @libnotify.show!
39
- else
40
- @io.puts(*o)
41
41
  end
42
+ @io.puts(*o)
42
43
  end
43
44
 
44
45
  def method_missing(msg, *args, &block)
@@ -0,0 +1,5 @@
1
+ module MiniTest
2
+ class Libnotify
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
- require "minitest/libnotify"
3
+ require "minitest/libnotify/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "minitest-libnotify"
metadata CHANGED
@@ -1,73 +1,99 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: minitest-libnotify
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.1
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Peter Suschlik
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2011-12-04 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2011-12-07 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: minitest
16
- requirement: &76548840 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
22
32
  type: :runtime
23
- prerelease: false
24
- version_requirements: *76548840
25
- - !ruby/object:Gem::Dependency
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
26
35
  name: libnotify
27
- requirement: &76548480 !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
28
38
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
33
46
  type: :runtime
34
- prerelease: false
35
- version_requirements: *76548480
47
+ version_requirements: *id002
36
48
  description: Display graphical notfications when testing with minitest.
37
- email:
49
+ email:
38
50
  - peter-minitest-libnotify@suschlik.de
39
51
  executables: []
52
+
40
53
  extensions: []
54
+
41
55
  extra_rdoc_files: []
42
- files:
56
+
57
+ files:
43
58
  - .gitignore
44
59
  - Gemfile
45
60
  - README.rdoc
46
61
  - Rakefile
47
62
  - lib/minitest/libnotify.rb
63
+ - lib/minitest/libnotify/version.rb
48
64
  - minitest-libnotify.gemspec
49
65
  homepage: https://github.com/splattael/minitest-libnotify
50
66
  licenses: []
67
+
51
68
  post_install_message:
52
69
  rdoc_options: []
53
- require_paths:
70
+
71
+ require_paths:
54
72
  - lib
55
- required_ruby_version: !ruby/object:Gem::Requirement
73
+ required_ruby_version: !ruby/object:Gem::Requirement
56
74
  none: false
57
- requirements:
58
- - - ! '>='
59
- - !ruby/object:Gem::Version
60
- version: '0'
61
- required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ hash: 3
79
+ segments:
80
+ - 0
81
+ version: "0"
82
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
83
  none: false
63
- requirements:
64
- - - ! '>='
65
- - !ruby/object:Gem::Version
66
- version: '0'
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ hash: 3
88
+ segments:
89
+ - 0
90
+ version: "0"
67
91
  requirements: []
92
+
68
93
  rubyforge_project: minitest-libnotify
69
94
  rubygems_version: 1.8.10
70
95
  signing_key:
71
96
  specification_version: 3
72
97
  summary: Test notifier for minitest via libnotify.
73
98
  test_files: []
99
+