happy-commit 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
data/happy-commit.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{happy-commit}
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David A. Cuadrado"]
@@ -34,19 +34,13 @@ Gem::Specification.new do |s|
34
34
  "sounds/Engineer_goodjob01.wav",
35
35
  "sounds/Engineer_goodjob02.wav",
36
36
  "sounds/Engineer_goodjob03.wav",
37
- "sounds/happykids.wav",
38
- "test/helper.rb",
39
- "test/test_happy-commit.rb"
37
+ "sounds/happykids.wav"
40
38
  ]
41
39
  s.homepage = %q{http://github.com/dcu/happy-commit}
42
40
  s.rdoc_options = ["--charset=UTF-8"]
43
41
  s.require_paths = ["lib"]
44
42
  s.rubygems_version = %q{1.3.6}
45
43
  s.summary = %q{happy commits!}
46
- s.test_files = [
47
- "test/helper.rb",
48
- "test/test_happy-commit.rb"
49
- ]
50
44
 
51
45
  if s.respond_to? :specification_version then
52
46
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
data/lib/happy-commit.rb CHANGED
@@ -15,7 +15,8 @@ module HappyCommit
15
15
  File.open(self.post_commit_path, "w") do |f|
16
16
  f << %@#!/usr/bin/env ruby
17
17
  sounds = Dir.glob(".git/sounds/*.wav")
18
- system("aplay #\{sounds.at(rand(sounds.size))} 2>/dev/null &")
18
+ command = %w[aplay afplay play].find { |w| `#\{w} --version 2>/dev/null`; $?.success? }
19
+ system("#\{command} #\{sounds.at(rand(sounds.size))} 2>/dev/null &")
19
20
  @
20
21
  end
21
22
  FileUtils.chmod(0755, self.post_commit_path)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - David A. Cuadrado
@@ -55,8 +55,6 @@ files:
55
55
  - sounds/Engineer_goodjob02.wav
56
56
  - sounds/Engineer_goodjob03.wav
57
57
  - sounds/happykids.wav
58
- - test/helper.rb
59
- - test/test_happy-commit.rb
60
58
  has_rdoc: true
61
59
  homepage: http://github.com/dcu/happy-commit
62
60
  licenses: []
@@ -87,6 +85,5 @@ rubygems_version: 1.3.6
87
85
  signing_key:
88
86
  specification_version: 3
89
87
  summary: happy commits!
90
- test_files:
91
- - test/helper.rb
92
- - test/test_happy-commit.rb
88
+ test_files: []
89
+
data/test/helper.rb DELETED
@@ -1,10 +0,0 @@
1
- require 'rubygems'
2
- require 'test/unit'
3
- require 'shoulda'
4
-
5
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
- $LOAD_PATH.unshift(File.dirname(__FILE__))
7
- require 'happy-commit'
8
-
9
- class Test::Unit::TestCase
10
- end
@@ -1,7 +0,0 @@
1
- require 'helper'
2
-
3
- class TestHappyCommit < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end