nyan-cat-formatter 0.0.8 → 0.0.8.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.
@@ -28,7 +28,8 @@ module RSpec2
28
28
  end
29
29
 
30
30
  def dump_summary(duration, example_count, failure_count, pending_count)
31
- system("killall -9 afplay") if File.exists?("#{ROOT}/data/nyan-cat.mp3") && RUBY_PLATFORM.downcase.include?("darwin")
31
+ mp3_file = File.expand_path( File.join( File.dirname(__FILE__), "../../data/nyan-cat.mp3"))
32
+ system("killall -9 afplay") if File.exists?(mp3_file) && RUBY_PLATFORM.downcase.include?("darwin")
32
33
  dump_profile if profile_examples? && failure_count == 0
33
34
  summary = "\nYou've Nyaned for #{format_seconds(duration)} seconds\n".split(//).map { |c| rainbowify(c) }
34
35
  output.puts summary.join
@@ -24,6 +24,6 @@ NyanCatMusicFormatter = Class.new(NyanCatFormatter) do
24
24
 
25
25
  def start input
26
26
  super
27
- kernel.system("afplay '#{ROOT}/data/nyan-cat.mp3' &") if osx?
27
+ kernel.system("afplay #{File.expand_path('../../data/nyan-cat.mp3', __FILE__)} &") if osx?
28
28
  end
29
29
  end
@@ -1,10 +1,8 @@
1
1
  $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
- ROOT = "#{File.dirname(__FILE__)}" unless defined?(ROOT)
4
-
5
3
  Gem::Specification.new do |s|
6
4
  s.name = "nyan-cat-formatter"
7
- s.version = "0.0.8"
5
+ s.version = "0.0.8.1"
8
6
  s.authors = ["Matt Sears"]
9
7
  s.email = ["matt@mattsears.com"]
10
8
  s.homepage = "http://mtts.rs/nyancat"
@@ -14,7 +14,7 @@ end
14
14
 
15
15
  describe NyanCatMusicFormatter do
16
16
  def path_to_mp3
17
- "'#{ROOT}/data/nyan-cat.mp3'"
17
+ "#{File.expand_path('data/nyan-cat.mp3')}"
18
18
  end
19
19
 
20
20
  let(:stdout) { StringIO.new }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nyan-cat-formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.8.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-13 00:00:00.000000000 Z
12
+ date: 2012-08-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake