sentientmonkey-autotest-notifyosd 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2009 Scott Windsor
2
+
3
+ (The MIT License)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,19 @@
1
+ = autotest-notifyosd
2
+
3
+ Provides autotest notifications for
4
+ https://wiki.ubuntu.com/NotifyOSD
5
+
6
+ == Requirements
7
+
8
+ * ZenTest (to provide core autotest functionality)
9
+ * Ubuntu 9.04 or later (or notifyosd ported to another linux system)
10
+ * libnotify (can be install via apt-get)
11
+
12
+ == Install
13
+
14
+ * sudo gem install sentientmonkey-autotest-notifyosd
15
+ * enable-autotest-notifyosd
16
+
17
+ == Copyright
18
+
19
+ Copyright (c) 2009 Scott Windsor. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,58 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "autotest-notifyosd"
8
+ gem.summary = %Q{Provides autotest notifications for Ubuntu's NotifyOSD}
9
+ gem.email = "swindsor@gmail.com"
10
+ gem.homepage = "http://github.com/sentientmonkey/autotest-notifyosd"
11
+ gem.authors = ["Scott Windsor"]
12
+ gem.executables = ['enable-autotest-notifyosd']
13
+ gem.add_dependency('ZenTest', '>= 4.0.0')
14
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
+ end
16
+
17
+ rescue LoadError
18
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
19
+ end
20
+
21
+ require 'rake/testtask'
22
+ Rake::TestTask.new(:test) do |test|
23
+ test.libs << 'lib' << 'test'
24
+ test.pattern = 'test/**/*_test.rb'
25
+ test.verbose = true
26
+ end
27
+
28
+ begin
29
+ require 'rcov/rcovtask'
30
+ Rcov::RcovTask.new do |test|
31
+ test.libs << 'test'
32
+ test.pattern = 'test/**/*_test.rb'
33
+ test.verbose = true
34
+ end
35
+ rescue LoadError
36
+ task :rcov do
37
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
38
+ end
39
+ end
40
+
41
+
42
+ task :default => :test
43
+
44
+ require 'rake/rdoctask'
45
+ Rake::RDocTask.new do |rdoc|
46
+ if File.exist?('VERSION.yml')
47
+ config = YAML.load(File.read('VERSION.yml'))
48
+ version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
49
+ else
50
+ version = ""
51
+ end
52
+
53
+ rdoc.rdoc_dir = 'rdoc'
54
+ rdoc.title = "autotest-notifyosd #{version}"
55
+ rdoc.rdoc_files.include('README*')
56
+ rdoc.rdoc_files.include('lib/**/*.rb')
57
+ end
58
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,54 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{autotest-notifyosd}
5
+ s.version = "0.0.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Scott Windsor"]
9
+ s.date = %q{2009-05-09}
10
+ s.default_executable = %q{enable-autotest-notifyosd}
11
+ s.email = %q{swindsor@gmail.com}
12
+ s.executables = ["enable-autotest-notifyosd"]
13
+ s.extra_rdoc_files = [
14
+ "LICENSE",
15
+ "README.rdoc"
16
+ ]
17
+ s.files = [
18
+ ".document",
19
+ ".gitignore",
20
+ "LICENSE",
21
+ "README.rdoc",
22
+ "Rakefile",
23
+ "VERSION",
24
+ "autotest-notifyosd.gemspec",
25
+ "bin/enable-autotest-notifyosd",
26
+ "lib/autotest-notifyosd.rb",
27
+ "lib/autotest/notify-osd.rb",
28
+ "test/autotest-notifyosd_test.rb",
29
+ "test/test_helper.rb"
30
+ ]
31
+ s.has_rdoc = true
32
+ s.homepage = %q{http://github.com/sentientmonkey/autotest-notifyosd}
33
+ s.rdoc_options = ["--charset=UTF-8"]
34
+ s.require_paths = ["lib"]
35
+ s.rubygems_version = %q{1.3.1}
36
+ s.summary = %q{Provides autotest notifications for Ubuntu's NotifyOSD}
37
+ s.test_files = [
38
+ "test/autotest-notifyosd_test.rb",
39
+ "test/test_helper.rb"
40
+ ]
41
+
42
+ if s.respond_to? :specification_version then
43
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
44
+ s.specification_version = 2
45
+
46
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
47
+ s.add_runtime_dependency(%q<ZenTest>, [">= 4.0.0"])
48
+ else
49
+ s.add_dependency(%q<ZenTest>, [">= 4.0.0"])
50
+ end
51
+ else
52
+ s.add_dependency(%q<ZenTest>, [">= 4.0.0"])
53
+ end
54
+ end
@@ -0,0 +1,2 @@
1
+ #!/bin/sh
2
+ echo "require 'sentientmonkey-autotest-notifyosd'\ninclude Autotest::NotifyOsd" >> ~/.autotest
@@ -0,0 +1,2 @@
1
+ require 'autotest'
2
+ require 'autotest/notify-osd.rb'
@@ -0,0 +1,38 @@
1
+ # -*- ruby -*-
2
+
3
+ module Autotest::NotifyOSD
4
+
5
+ def self.notify title, msg, urg = 'normal', img = nil
6
+ msg += " in #{Dir.pwd.split(/\//).last(3).join("/")}"
7
+ msg += " at #{Time.now.strftime('%Y-%m-%d %H:%M:%S')}"
8
+ # TODO: parameterize default image
9
+ img ||= '/usr/share/icons/Human/scalable/status/dialog-info.svg'
10
+ cmd = "notify-send -i #{img} -u #{urg} '#{title}' '#{msg}'"
11
+ system cmd
12
+ nil
13
+ end
14
+
15
+ Autotest.add_hook :initialize do |at|
16
+ notify "Autotest running", "Started"
17
+ end
18
+
19
+ Autotest.add_hook :run_command do |at|
20
+ notify "Tests running", "Testing", 'normal', "/usr/share/icons/Human/scalable/status/dialog-warning.svg" if at.tainted
21
+ end
22
+
23
+ Autotest.add_hook :red do |at|
24
+ notify "Tests Failed", "#{at.files_to_test.size} tests failed", "critical", "/usr/share/icons/Human/scalable/status/dialog-error.svg"
25
+ end
26
+
27
+ Autotest.add_hook :green do |at|
28
+ notify "Tests Passed", "Tests passed", "low" if at.tainted
29
+ end
30
+
31
+ Autotest.add_hook :all_good do |at|
32
+ notify "All Tests Passed", "All tests passed", "low" if at.tainted
33
+ end
34
+
35
+ Autotest.add_hook :quit do |at|
36
+ notify "autotest exiting", "Exiting"
37
+ end
38
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class AutotestNotifyosdTest < Test::Unit::TestCase
4
+ def test_todo
5
+ # TODO
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+
4
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
+ require 'autotest-notifyosd'
7
+
8
+ class Test::Unit::TestCase
9
+ end
metadata ADDED
@@ -0,0 +1,75 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sentientmonkey-autotest-notifyosd
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Scott Windsor
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-05-09 00:00:00 -07:00
13
+ default_executable: enable-autotest-notifyosd
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: ZenTest
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 4.0.0
24
+ version:
25
+ description:
26
+ email: swindsor@gmail.com
27
+ executables:
28
+ - enable-autotest-notifyosd
29
+ extensions: []
30
+
31
+ extra_rdoc_files:
32
+ - LICENSE
33
+ - README.rdoc
34
+ files:
35
+ - .document
36
+ - .gitignore
37
+ - LICENSE
38
+ - README.rdoc
39
+ - Rakefile
40
+ - VERSION
41
+ - autotest-notifyosd.gemspec
42
+ - bin/enable-autotest-notifyosd
43
+ - lib/autotest-notifyosd.rb
44
+ - lib/autotest/notify-osd.rb
45
+ - test/autotest-notifyosd_test.rb
46
+ - test/test_helper.rb
47
+ has_rdoc: true
48
+ homepage: http://github.com/sentientmonkey/autotest-notifyosd
49
+ post_install_message:
50
+ rdoc_options:
51
+ - --charset=UTF-8
52
+ require_paths:
53
+ - lib
54
+ required_ruby_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: "0"
59
+ version:
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: "0"
65
+ version:
66
+ requirements: []
67
+
68
+ rubyforge_project:
69
+ rubygems_version: 1.2.0
70
+ signing_key:
71
+ specification_version: 2
72
+ summary: Provides autotest notifications for Ubuntu's NotifyOSD
73
+ test_files:
74
+ - test/autotest-notifyosd_test.rb
75
+ - test/test_helper.rb