minitest-growl 0.0.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/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in minitest-growl.gemspec
4
+ gemspec
data/README.rdoc ADDED
@@ -0,0 +1,29 @@
1
+ = minitest-growl
2
+
3
+ Test notifier for minitest via Growl.
4
+
5
+ Source[http://github.com/jnbt/minitest-growl] |
6
+ RDoc[http://rdoc.info/github/jnbt/minitest-growl/master/file/README.rdoc]
7
+
8
+ == Usage
9
+
10
+ require 'minitest/autorun'
11
+ require 'minitest/growl'
12
+
13
+ == Installation
14
+
15
+ gem install minitest-growl
16
+
17
+ == Dependencies
18
+
19
+ * growl gem[https://github.com/visionmedia/growl]
20
+ * Growl[http://growl.info/]
21
+ * growlnotify[http://growl.info/extras.php#growlnotify]
22
+
23
+ == Authors
24
+
25
+ * Jonas Thiel (http://github.com/jnbt)
26
+
27
+ == License
28
+
29
+ MIT License[http://www.opensource.org/licenses/mit-license.php]
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,40 @@
1
+ require 'minitest/unit'
2
+ require 'growl'
3
+
4
+ module MiniTest
5
+ # Test notifier for minitest via growl.
6
+ #
7
+ # == Usage
8
+ #
9
+ # In your test helper put:
10
+ #
11
+ # require 'minitest/autorun'
12
+ # require 'minitest/growl'
13
+ #
14
+ class Growl
15
+ VERSION = "0.0.1"
16
+
17
+ def initialize io
18
+ @io = io
19
+ end
20
+
21
+ def puts(*o)
22
+ if o.first =~ /(\d+) failures, (\d+) errors/
23
+ description = [ defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby", RUBY_VERSION, RUBY_PLATFORM ].join(" ")
24
+ if $1.to_i > 0 || $2.to_i > 0 # fail?
25
+ Growl.notify_error o.first, :title => ":-( #{description}"
26
+ else
27
+ Growl.notify_ok o.first, :title => ":-( #{description}"
28
+ end
29
+ else
30
+ @io.puts(*o)
31
+ end
32
+ end
33
+
34
+ def method_missing(msg, *args, &block)
35
+ @io.send(msg, *args, &block)
36
+ end
37
+ end
38
+ end
39
+
40
+ MiniTest::Unit.output = MiniTest::Growl.new(MiniTest::Unit.output)
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "minitest/growl"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "minitest-growl"
7
+ s.version = MiniTest::Growl::VERSION
8
+ s.authors = ["Jonas Thiel"]
9
+ s.email = ["jonasthiel+minitest-growl@googlemail.com"]
10
+ s.homepage = "https://github.com/jnbt/minitest-growl"
11
+ s.summary = %q{Test notifier for minitest via growl.}
12
+ s.description = %q{Display graphical notfications when testing with minitest.}
13
+
14
+ s.rubyforge_project = "minitest-growl"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_runtime_dependency 'minitest'
22
+ s.add_runtime_dependency 'growl'
23
+ end
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: minitest-growl
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
+ - Jonas Thiel
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-12-05 00:00:00 +01:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: minitest
23
+ type: :runtime
24
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ prerelease: false
34
+ requirement: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: growl
37
+ type: :runtime
38
+ version_requirements: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ prerelease: false
48
+ requirement: *id002
49
+ description: Display graphical notfications when testing with minitest.
50
+ email:
51
+ - jonasthiel+minitest-growl@googlemail.com
52
+ executables: []
53
+
54
+ extensions: []
55
+
56
+ extra_rdoc_files: []
57
+
58
+ files:
59
+ - Gemfile
60
+ - README.rdoc
61
+ - Rakefile
62
+ - lib/minitest/growl.rb
63
+ - minitest-growl.gemspec
64
+ has_rdoc: true
65
+ homepage: https://github.com/jnbt/minitest-growl
66
+ licenses: []
67
+
68
+ post_install_message:
69
+ rdoc_options: []
70
+
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ none: false
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
83
+ none: false
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ hash: 3
88
+ segments:
89
+ - 0
90
+ version: "0"
91
+ requirements: []
92
+
93
+ rubyforge_project: minitest-growl
94
+ rubygems_version: 1.5.3
95
+ signing_key:
96
+ specification_version: 3
97
+ summary: Test notifier for minitest via growl.
98
+ test_files: []
99
+