Skip to content
Browse files

Fixes launching a browser to open coverage index. Uses xdg-open

  • Loading branch information...
1 parent 1282419 commit 08e24726436c0b12cd1d98fa263344f8b09caca7 @masom masom committed Dec 23, 2011
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/cover_me/config.rb
View
18 lib/cover_me/config.rb
@@ -1,22 +1,22 @@
module CoverMe
-
+
class << self
-
- # Yields up a configuration object when given a block.
+
+ # Yields up a configuration object when given a block.
# Without a block it just returns the configuration object.
# Uses Configatron under the covers.
- #
+ #
# Example:
# CoverMe.config do |c|
# c.foo = :bar
# end
- #
+ #
# CoverMe.config.foo # => :bar
def config(&block)
yield configatron.cover_me if block_given?
configatron.cover_me
end
-
+
def set_defaults # :nodoc:
CoverMe.config do |c|
c.project.set_default(:root,
@@ -31,10 +31,10 @@ def set_defaults # :nodoc:
c.set_default(:exclude_file_patterns, Configatron::Delayed.new do
[]
end)
-
+
c.proximity.set_default(:near, 90)
c.proximity.set_default(:hit, 100)
-
+
c.set_default(:formatter, Configatron::Delayed.new {CoverMe::HtmlFormatter})
c.set_default(:at_exit, Proc.new {
if CoverMe.config.formatter == CoverMe::HtmlFormatter
@@ -44,7 +44,7 @@ def set_defaults # :nodoc:
when /darwin/
'open'
when /linux/
- '/etc/alternatives/x-www-browser'
+ 'xdg-open'
when /mswin|mingw/
'start'
when /cygwin/

0 comments on commit 08e2472

Please sign in to comment.
Something went wrong with that request. Please try again.