meow 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
2
+
3
+ require 'meow/autotest'
@@ -1,3 +1,13 @@
1
+ === 2.1.0
2
+
3
+ * 2 Minor enhancements
4
+
5
+ * Autotest integration. Just add this to your .autotest file:
6
+ require 'meow/autotest'
7
+ * The icon option now takes a string which is assumed to be the path to an
8
+ icon.
9
+
10
+
1
11
  === 2.0.0
2
12
 
3
13
  * 1 Major enhancement
@@ -1,8 +1,13 @@
1
+ .autotest
1
2
  CHANGELOG.rdoc
2
3
  Manifest.txt
3
4
  README.rdoc
4
5
  Rakefile
6
+ icons/fail.png
7
+ icons/initialize.jpeg
8
+ icons/pass.png
5
9
  lib/meow.rb
10
+ lib/meow/autotest.rb
6
11
  lib/meow/notifier.rb
7
12
  meow.gemspec
8
13
  test/assets/aaron.jpeg
data/Rakefile CHANGED
@@ -6,10 +6,19 @@ require './vendor/hoe.rb'
6
6
  $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
7
7
  require 'meow'
8
8
 
9
- Hoe.new('meow', Meow::VERSION) do |p|
9
+ HOE = Hoe.new('meow', Meow::VERSION) do |p|
10
10
  p.readme = 'README.rdoc'
11
11
  p.history = 'CHANGELOG.rdoc'
12
12
  p.developer('Aaron Patterson', 'aaronp@rubyforge.org')
13
13
  end
14
14
 
15
+ namespace :gem do
16
+ task :spec do
17
+ File.open("#{HOE.name}.gemspec", 'w') do |f|
18
+ HOE.spec.version = "#{HOE.version}.#{Time.now.strftime("%Y%m%d%H%M%S")}"
19
+ f.write(HOE.spec.to_ruby)
20
+ end
21
+ end
22
+ end
23
+
15
24
  # vim: syntax=Ruby
Binary file
Binary file
Binary file
@@ -2,7 +2,7 @@ require 'osx/cocoa'
2
2
  require 'meow/notifier'
3
3
 
4
4
  class Meow
5
- VERSION = '2.0.0'
5
+ VERSION = '2.1.0'
6
6
  PRIORITIES = { :very_low => -2,
7
7
  :moderate => -1,
8
8
  :normal => 0,
@@ -122,6 +122,7 @@ class Meow
122
122
  }.merge(opts)
123
123
 
124
124
  register(opts[:note_type]) unless @registered.include?(opts[:note_type])
125
+ opts[:icon] = Meow.import_image(opts[:icon]) if opts[:icon].is_a?(String)
125
126
 
126
127
  notification = {
127
128
  :ApplicationName => name,
@@ -0,0 +1,44 @@
1
+ require 'meow'
2
+
3
+ class Meow
4
+ class Autotest
5
+ @icon_dirs = [File.expand_path(
6
+ File.join(File.dirname(__FILE__), '..', '..', 'icons')
7
+ )]
8
+
9
+ @@meow = Meow.new('Meow Autotest')
10
+
11
+ class << self
12
+ attr_accessor :icon_dirs
13
+
14
+ def icon_for action
15
+ @icon_dirs.reverse.each do |dir|
16
+ file = Dir[File.join(dir,'**')].find { |name| name =~ /#{action}/ }
17
+ return file if file
18
+ end
19
+ end
20
+ end
21
+
22
+ ::Autotest.add_hook :initialize do |at|
23
+ @@meow.notify "Autotest", 'started', { :icon => icon_for(:initialize) }
24
+ end
25
+
26
+ ::Autotest.add_hook :red do |at|
27
+ @@meow.notify "Autotest", "#{at.files_to_test.size} test are fail.",
28
+ { :icon => icon_for(:fail) }
29
+ end
30
+
31
+ ::Autotest.add_hook :green do |at|
32
+ if at.tainted
33
+ @@meow.notify "Autotest", "Tests pass!", { :icon => icon_for(:pass) }
34
+ end
35
+ end
36
+
37
+ ::Autotest.add_hook :all_good do |at|
38
+ if at.tainted
39
+ @@meow.notify "Autotest", "All tests pass!",
40
+ { :icon => icon_for(:pass) }
41
+ end
42
+ end
43
+ end
44
+ end
@@ -1,22 +1,30 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{meow}
3
- s.version = "1.1.0"
4
-
5
- s.specification_version = 2 if s.respond_to? :specification_version=
3
+ s.version = "2.1.0.20081101124146"
6
4
 
7
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
6
  s.authors = ["Aaron Patterson"]
9
- s.date = %q{2008-06-05}
7
+ s.date = %q{2008-11-01}
10
8
  s.description = %q{Send Growl notifications via Ruby.}
11
9
  s.email = ["aaronp@rubyforge.org"]
12
10
  s.extra_rdoc_files = ["Manifest.txt"]
13
- s.files = ["CHANGELOG.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "lib/meow.rb", "meow.gemspec", "test/helper.rb", "test/test_meow.rb", "vendor/hoe.rb"]
11
+ s.files = [".autotest", "CHANGELOG.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "icons/fail.png", "icons/initialize.jpeg", "icons/pass.png", "lib/meow.rb", "lib/meow/autotest.rb", "lib/meow/notifier.rb", "meow.gemspec", "test/assets/aaron.jpeg", "test/helper.rb", "test/test_meow.rb", "vendor/hoe.rb"]
14
12
  s.has_rdoc = true
15
13
  s.homepage = %q{http://meow.rubyforge.org/}
16
14
  s.rdoc_options = ["--main", "README.rdoc"]
17
15
  s.require_paths = ["lib"]
18
16
  s.rubyforge_project = %q{meow}
19
- s.rubygems_version = %q{1.1.1}
17
+ s.rubygems_version = %q{1.2.0}
20
18
  s.summary = %q{Send Growl notifications via Ruby.}
21
19
  s.test_files = ["test/test_meow.rb"]
20
+
21
+ if s.respond_to? :specification_version then
22
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
+ s.specification_version = 2
24
+
25
+ if current_version >= 3 then
26
+ else
27
+ end
28
+ else
29
+ end
22
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meow
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-13 00:00:00 -07:00
12
+ date: 2008-11-01 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -23,11 +23,16 @@ extensions: []
23
23
  extra_rdoc_files:
24
24
  - Manifest.txt
25
25
  files:
26
+ - .autotest
26
27
  - CHANGELOG.rdoc
27
28
  - Manifest.txt
28
29
  - README.rdoc
29
30
  - Rakefile
31
+ - icons/fail.png
32
+ - icons/initialize.jpeg
33
+ - icons/pass.png
30
34
  - lib/meow.rb
35
+ - lib/meow/autotest.rb
31
36
  - lib/meow/notifier.rb
32
37
  - meow.gemspec
33
38
  - test/assets/aaron.jpeg