log_buddy 0.1.1 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,11 @@
1
+ v0.1.5 Clean up specs and remove noise from spec run
2
+
3
+ v0.1.4 Micronauts Unite! Test Suite now runs via Micronaut - http://github.com/spicycode/micronaut/
4
+
5
+ v0.1.3 Use plain old echoe; really fix rubygems errors (I hope)
6
+
7
+ v0.1.2 Attempting to fix rubygems errors
8
+
1
9
  v0.1.1. Handle exceptions from within the block
2
10
 
3
11
  v0.1.0. Specify, clean up
data/Manifest CHANGED
@@ -1,12 +1,15 @@
1
1
  CHANGELOG
2
- examples.rb
3
- init.rb
4
- lib/log_buddy.rb
5
2
  LICENSE
6
- log_buddy.gemspec
7
3
  Manifest
8
- Rakefile
9
4
  README.rdoc
10
- spec/helper.rb
11
- spec/log_buddy_init_spec.rb
12
- spec/log_buddy_spec.rb
5
+ Rakefile
6
+ examples/example_helper.rb
7
+ examples/log_buddy_example.rb
8
+ examples/log_buddy_init_example.rb
9
+ examples/log_example.rb
10
+ examples.rb
11
+ init.rb
12
+ lib/log_buddy/mixin.rb
13
+ lib/log_buddy/utils.rb
14
+ lib/log_buddy/version.rb
15
+ lib/log_buddy.rb
data/README.rdoc CHANGED
@@ -54,10 +54,10 @@ See examples.rb for live examples you can run.
54
54
 
55
55
  == URLS
56
56
 
57
- * Log bugs, issues, and suggestions on Trac: http://opensource.thinkrelevance.com/wiki/log_buddy
58
- * View Source: http://github.com/relevance/logbuddy/tree/master
57
+ * Log bugs, issues, and suggestions at Lighthouse: http://relevance.lighthouseapp.com/projects/19074-log-buddy/overview
58
+ * View Source: http://github.com/relevance/logbuddy
59
59
  * Git clone Source: git://github.com/relevance/logbuddy.git
60
- * RDocs: http://thinkrelevance.rubyforge.org/log_buddy/
60
+ * RDocs: http://thinkrelevance.rubyforge.org/log_buddy
61
61
 
62
62
  == LICENSE:
63
63
 
data/Rakefile CHANGED
@@ -1,16 +1,9 @@
1
- begin
2
- gem 'technicalpickles-echoe'
3
- rescue LoadError => e
4
- puts "couldn't find the correct version of echoe - please install from forked version on github: http://github.com/technicalpickles/echoe/"
5
- puts "gem sources -a http://gems.github.com"
6
- puts "sudo gem install technicalpickles-echoe"
7
- end
8
-
9
1
  require 'rubygems'
2
+ gem 'echoe'
10
3
  require 'echoe'
11
- require './lib/log_buddy.rb'
4
+ require File.join(File.dirname(__FILE__), *%w[lib log_buddy version])
12
5
 
13
- echoe = Echoe.new('log_buddy', LogBuddy::VERSION) do |p|
6
+ echoe = Echoe.new('log_buddy', LogBuddy::VERSION::STRING) do |p|
14
7
  p.rubyforge_name = 'thinkrelevance'
15
8
  p.author = 'Rob Sanheim - Relevance'
16
9
  p.email = 'opensource@thinkrelevance.com'
@@ -22,14 +15,32 @@ echoe = Echoe.new('log_buddy', LogBuddy::VERSION) do |p|
22
15
  p.rdoc_template = rdoc_template
23
16
  end
24
17
 
25
- desc 'Test LogBuddy.'
26
- Rake::TestTask.new(:test) do |t|
27
- t.libs << 'lib'
28
- t.pattern = 'spec/**/*_spec.rb'
29
- t.verbose = true
18
+ Rake.application.instance_variable_get(:@tasks).delete("default")
19
+ Rake.application.instance_variable_get(:@tasks).delete("test")
20
+
21
+ namespace :micronaut do
22
+
23
+ desc 'Run all examples'
24
+ task :examples do
25
+ examples = Dir["examples/**/*_example.rb"].map { |g| Dir.glob(g) }.flatten
26
+ examples.map! {|f| %Q(require "#{f}")}
27
+ command = "-e '#{examples.join("; ")}'"
28
+ ruby command
29
+ end
30
+
31
+ desc "Run all examples using rcov"
32
+ task :coverage do
33
+ examples = Dir["examples/**/*_example.rb"].map { |g| Dir.glob(g) }.flatten
34
+ system "rcov --exclude \"examples/*,gems/*,db/*,/Library/Ruby/*,config/*\" --text-report --sort coverage --no-validator-links #{examples.join(' ')}"
35
+ end
36
+
30
37
  end
31
38
 
39
+ task :default => 'micronaut:coverage'
40
+
41
+ # The below results in 'input stream exhausted' - dunno why?
32
42
  # task :release => [:test, :publish_docs, :announce]
33
43
 
44
+ echoe.spec.add_development_dependency "echoe"
34
45
  echoe.spec.add_development_dependency "allison"
35
46
  echoe.spec.add_development_dependency "markaby"
@@ -1,9 +1,9 @@
1
+ require 'logger'
1
2
  require 'rubygems'
2
- require "test/unit"
3
- require "test/spec"
4
- require "test/spec/should-output"
3
+ gem 'spicycode-micronaut', "= 0.0.4"
4
+ gem 'mocha'
5
5
  require "mocha"
6
- require "redgreen" unless Object.const_defined?("TextMate")
6
+ require 'micronaut'
7
7
  require File.expand_path(File.join(File.dirname(__FILE__), "..", "lib", "log_buddy"))
8
8
 
9
9
  def silence_warnings
@@ -12,3 +12,5 @@ def silence_warnings
12
12
  ensure
13
13
  $VERBOSE = old_verbose
14
14
  end
15
+
16
+ Micronaut::Runner.autorun
@@ -0,0 +1,37 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), *%w[example_helper]))
2
+
3
+ describe LogBuddy do
4
+
5
+ it "has logger" do
6
+ LogBuddy.should respond_to(:logger)
7
+ end
8
+
9
+ it "has stdout config option" do
10
+ LogBuddy.should respond_to(:log_to_stdout?)
11
+ end
12
+
13
+ describe "init" do
14
+ it "mixes itself into Object instance and class level by default" do
15
+ Object.expects(:include).with(LogBuddy::Mixin)
16
+ Object.expects(:extend).with(LogBuddy::Mixin)
17
+ LogBuddy.init
18
+ end
19
+
20
+ it "adds logger method to Object instance and class" do
21
+ LogBuddy.init
22
+ Object.new.should respond_to(:logger)
23
+ Object.should respond_to(:logger)
24
+ end
25
+
26
+ it "defaults to log to stdout (as well as logger)" do
27
+ LogBuddy.init
28
+ LogBuddy.log_to_stdout?.should == true
29
+ end
30
+
31
+ it "can be configured to log to stdout" do
32
+ LogBuddy.init :stdout => false
33
+ LogBuddy.log_to_stdout?.should == true
34
+ end
35
+ end
36
+
37
+ end
@@ -0,0 +1,30 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), *%w[example_helper]))
2
+
3
+ describe LogBuddy do
4
+ describe "init" do
5
+ after { reset_safe_log_buddy_mode }
6
+
7
+ it "doesnt mixin to object if SAFE_LOG_BUDDY is true" do
8
+ LogBuddy.expects(:init).never
9
+ ENV["SAFE_LOG_BUDDY"] = "true"
10
+ load_init
11
+ end
12
+
13
+ it "mixin to object if SAFE_LOG_BUDDY is true" do
14
+ LogBuddy.expects(:init).once
15
+ load_init
16
+ end
17
+
18
+ def load_init
19
+ silence_warnings do
20
+ load File.join(File.dirname(__FILE__), *%w[.. init.rb])
21
+ end
22
+ end
23
+
24
+ def reset_safe_log_buddy_mode
25
+ ENV["SAFE_LOG_BUDDY"] = nil
26
+ end
27
+
28
+ end
29
+
30
+ end
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), *%w[helper]))
1
+ require File.expand_path(File.join(File.dirname(__FILE__), *%w[example_helper]))
2
2
 
3
3
  module SomeModule
4
4
  def self.say_something(name)
@@ -9,58 +9,45 @@ module SomeModule
9
9
  "hello"
10
10
  end
11
11
 
12
- def self.raise_exception
13
- raise Exception
12
+ def self.raise_runtime_error
13
+ raise RuntimeError
14
14
  end
15
15
  end
16
16
 
17
- describe "LogBuddy" do
18
- describe "object extensions" do
19
- it "mixes itself into Object instance and class level by default" do
20
- Object.expects(:include).with(LogBuddy::Mixin)
21
- Object.expects(:extend).with(LogBuddy::Mixin)
22
- LogBuddy.init
23
- end
17
+ describe LogBuddy::Mixin, " behavior" do
24
18
 
25
- it "adds logger method to Object instance and class" do
19
+ it "uses RAILS_DEFAULT_LOGGER if its defined" do
20
+ begin
21
+ Object.const_set "RAILS_DEFAULT_LOGGER", stub_everything
26
22
  LogBuddy.init
27
- Object.new.should.respond_to :logger
28
- Object.should.respond_to :logger
29
- end
30
-
31
- it "uses RAILS_DEFAULT_LOGGER if its defined" do
32
- begin
33
- Object.const_set "RAILS_DEFAULT_LOGGER", stub_everything
34
- LogBuddy.init
35
- Object.logger.should == RAILS_DEFAULT_LOGGER
36
- ensure
37
- Object.send :remove_const, "RAILS_DEFAULT_LOGGER"
38
- end
23
+ Object.logger.should == RAILS_DEFAULT_LOGGER
24
+ ensure
25
+ Object.send :remove_const, "RAILS_DEFAULT_LOGGER"
39
26
  end
27
+ end
40
28
 
41
- it "uses a plain STDOUT Ruby logger if there is no RAILS_DEFAULT_LOGGER" do
42
- LogBuddy.init
43
- Object.logger.should == LogBuddy.default_logger
44
- end
29
+ it "uses a plain STDOUT Ruby logger if there is no RAILS_DEFAULT_LOGGER" do
30
+ LogBuddy.init
31
+ Object.logger.should == LogBuddy.logger
32
+ end
45
33
 
46
- it "can override the default logger" do
47
- file_logger = Logger.new "test.log"
48
- LogBuddy.init :default_logger => file_logger
49
- Object.logger.should == file_logger
50
- end
34
+ it "can override the default logger" do
35
+ file_logger = Logger.new "test.log"
36
+ LogBuddy.init :logger => file_logger
37
+ Object.logger.should == file_logger
51
38
  end
52
39
 
53
40
  describe "outputting the code being logged and its result" do
54
- before { LogBuddy.init }
41
+ before { LogBuddy.init :log_to_stdout => false }
55
42
  it "should log to default logger" do
56
- LogBuddy.expects(:default_logger).returns(logger = mock)
43
+ LogBuddy.expects(:logger).returns(logger = mock)
57
44
  logger.expects(:debug).with(anything)
58
- d {'hi'}
45
+ d {'hi man'}
59
46
  end
60
47
 
61
48
  it "should log a plain arg" do
62
- LogBuddy.expects(:debug).with('hi')
63
- d 'hi'
49
+ LogBuddy.expects(:debug).with('hey yo')
50
+ d 'hey yo'
64
51
  end
65
52
 
66
53
  it "logs both if given an arg and a block" do
@@ -71,7 +58,7 @@ describe "LogBuddy" do
71
58
  end
72
59
 
73
60
  it "does nothing without a block" do
74
- should.not.raise { d }
61
+ lambda { d }.should_not raise_error
75
62
  end
76
63
 
77
64
  it "should output only local vars in the block" do
@@ -114,9 +101,25 @@ describe "LogBuddy" do
114
101
  d { local1; local2; @ivar1 }
115
102
  end
116
103
 
117
- it "should gracefully handle exceptions" do
118
- LogBuddy.expects(:debug).with('LogBuddy caught an exception: Exception')
119
- d { SomeModule.raise_exception }
104
+ it "should gracefully handle runtimer errors" do
105
+ LogBuddy.expects(:debug).with('LogBuddy caught an exception: RuntimeError')
106
+ d { SomeModule.raise_runtime_error }
107
+ end
108
+
109
+ end
110
+
111
+ describe "stdout" do
112
+ before { Logger.any_instance.stubs(:debug) }
113
+ it "logs to stdout as well as the default logger" do
114
+ LogBuddy.init :log_to_stdout => true
115
+ LogBuddy.expects(:stdout_puts).with(%["foo" = 'foo'\n])
116
+ d { "foo" }
117
+ end
118
+
119
+ it "doesnt log to stdout if stdout configured off" do
120
+ LogBuddy.init :log_to_stdout => false
121
+ LogBuddy.expects(:stdout_puts).never
122
+ d { "foo" }
120
123
  end
121
124
  end
122
125
  end
data/init.rb CHANGED
@@ -1,2 +1,2 @@
1
- require 'log_buddy'
1
+ require File.join(File.dirname(__FILE__), *%w[lib log_buddy])
2
2
  LogBuddy.init unless ENV["SAFE_LOG_BUDDY"]
@@ -0,0 +1,32 @@
1
+ module LogBuddy
2
+ # The main Mixin that gets added on the #init call
3
+ module Mixin
4
+ # This is where the magic happens. This method can take a plain old string, and it will log
5
+ # it like any call to Logger#debug. To get the name of the thing you are logging and its value,
6
+ # use the block form:
7
+ # d { @a }
8
+ #
9
+ # Seperate with semicolons for multiple things - pretty much any valid ruby will work.
10
+ # d { @@foo; MY_CONST }
11
+ # d { @person; @@place; object.method() }
12
+ #
13
+ def d(msg = nil, &blk)
14
+ LogBuddy.debug(msg) if msg
15
+ return unless block_given?
16
+ begin
17
+ logged_line = LogBuddy.read_line(caller[0])
18
+ arguments = LogBuddy.parse_args(logged_line)
19
+ arguments.each do |arg|
20
+ result = eval(arg, blk.binding)
21
+ LogBuddy.debug(%[#{arg} = '#{result}'\n])
22
+ end
23
+ rescue RuntimeError => e
24
+ LogBuddy.debug "LogBuddy caught an exception: #{e.message}"
25
+ end
26
+ end
27
+
28
+ def logger
29
+ LogBuddy.logger
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,29 @@
1
+ module LogBuddy
2
+ module Utils
3
+
4
+ def debug(str)
5
+ stdout_puts(str) if log_to_stdout?
6
+ logger.debug(str)
7
+ end
8
+
9
+ def stdout_puts(str)
10
+ puts str
11
+ end
12
+
13
+ # Returns array of arguments in the block
14
+ # You must ues the brace form (ie d { "hi" }) and not do...end
15
+ def parse_args(logged_line)
16
+ block_contents = logged_line[/\{(.*)\}/, 1]
17
+ args = block_contents.split(";").map {|arg| arg.strip }
18
+ end
19
+
20
+ # Return the calling line
21
+ def read_line(frame)
22
+ file, line_number = frame.split(/:/, 2)
23
+ line_number = line_number.to_i
24
+ lines = File.readlines(file)
25
+
26
+ lines[line_number - 1]
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,9 @@
1
+ module LogBuddy
2
+ module VERSION #:nodoc:
3
+ MAJOR = 0
4
+ MINOR = 1
5
+ TINY = 5
6
+
7
+ STRING = [MAJOR, MINOR, TINY].join('.')
8
+ end
9
+ end
data/lib/log_buddy.rb CHANGED
@@ -1,7 +1,11 @@
1
+ require File.join(File.dirname(__FILE__), *%w[log_buddy utils])
2
+ require File.join(File.dirname(__FILE__), *%w[log_buddy mixin])
3
+ require File.join(File.dirname(__FILE__), *%w[log_buddy version])
4
+
1
5
  =begin rdoc
2
6
  LogBuddy is a developer tool for easy logging while testing, debugging, and inspecting.
3
7
 
4
- Log shortcut method to give you easy, concise output of variables with their names and values.
8
+ The log shortcut method to give you easy, concise output of variables with their names and values.
5
9
 
6
10
  Examples:
7
11
  a = "foo"
@@ -15,15 +19,19 @@ Examples:
15
19
  d { bark } # logs "bark = woof!"
16
20
 
17
21
  =end
18
- class LogBuddy
19
- VERSION = '0.1.1'
20
-
21
- # Use LogBuddy!
22
+ module LogBuddy
23
+ # Configure and include LogBuddy into Object.
24
+ # You can pass in any of the following configuration options:
25
+ #
26
+ # * <tt>:logger</tt> - the logger instance that LogBuddy should use (if not provided,
27
+ # tries to default to RAILS_DEFAULT_LOGGER, and then to a STDOUT logger).
28
+ # * <tt):log_to_stdout</tt> - whether LogBuddy should _also_ log to STDOUT, very helpful for Autotest (default is +true+).
22
29
  def self.init(options = {})
23
- @logger = options[:default_logger]
30
+ @logger = options[:logger]
31
+ @log_to_stdout = options.has_key?(:log_to_stdout) ? options[:log_to_stdout] : true
24
32
  mixin_to_object
25
33
  end
26
-
34
+
27
35
  # Add the LogBuddy::Mixin to Object instance and class level.
28
36
  def self.mixin_to_object
29
37
  Object.class_eval {
@@ -31,77 +39,28 @@ class LogBuddy
31
39
  extend LogBuddy::Mixin
32
40
  }
33
41
  end
34
-
35
- # The main Mixin that gets added on the #init call
36
- module Mixin
37
- # This is where the magic happens. This method can take a plain old string, and it will log
38
- # it like any call to Logger#debug. To get the name of the thing you are logging and its value,
39
- # use the block form:
40
- # d { @a }
41
- #
42
- # Seperate with semicolons for multiple things - pretty much any valid ruby will work.
43
- # d { @@foo; MY_CONST }
44
- # d { @person; @@place; object.method() }
45
- #
46
- def d(msg = nil, &blk)
47
- LogBuddy.debug(msg) if msg
48
- return unless block_given?
49
- begin
50
- logged_line = LogBuddy.read_line(caller[0])
51
- arguments = LogBuddy.parse_args(logged_line)
52
- arguments.each do |arg|
53
- result = eval(arg, blk.binding)
54
- LogBuddy.debug(%[#{arg} = '#{result}'\n])
55
- end
56
- rescue Exception => e
57
- LogBuddy.debug "LogBuddy caught an exception: #{e.message}"
58
- end
59
- end
60
42
 
61
- # Add a default logger to everything, everywhere.
43
+ class << self
44
+ include LogBuddy::Utils
62
45
  def logger
63
- LogBuddy.default_logger
46
+ return @logger if @logger
47
+ @logger = init_default_logger
64
48
  end
65
- end
66
-
67
- private
68
-
69
- # Default logger LogBuddy will use
70
- def self.default_logger
71
- return @logger if @logger
72
- @logger = init_default_logger
73
- end
74
-
75
- # Attempt to establish a default logger - first try RAILS_DEFAULT_LOGGER,
76
- # then fallback to default.
77
- def self.init_default_logger
78
- if Object.const_defined?("RAILS_DEFAULT_LOGGER")
79
- @logger = Object.const_get("RAILS_DEFAULT_LOGGER")
80
- else
81
- require 'logger'
82
- @logger = Logger.new(STDOUT)
49
+
50
+ def log_to_stdout?
51
+ @log_to_stdout
52
+ end
53
+
54
+ private
55
+
56
+ def init_default_logger
57
+ if Object.const_defined?("RAILS_DEFAULT_LOGGER")
58
+ @logger = Object.const_get("RAILS_DEFAULT_LOGGER")
59
+ else
60
+ require 'logger'
61
+ @logger = Logger.new(STDOUT)
62
+ end
83
63
  end
84
- end
85
-
86
- # Just debug it
87
- def self.debug(str)
88
- default_logger.debug(str)
89
- end
90
-
91
- # Returns array of arguments in the block
92
- # You must ues the brace form (ie d { "hi" }) and not do...end
93
- def self.parse_args(logged_line)
94
- block_contents = logged_line[/\{(.*)\}/, 1]
95
- args = block_contents.split(";").map {|arg| arg.strip }
96
- end
97
-
98
- # Return the calling line
99
- def self.read_line(frame)
100
- file, line_number = frame.split(/:/, 2)
101
- line_number = line_number.to_i
102
- lines = File.readlines(file)
103
64
 
104
- lines[line_number - 1]
105
65
  end
106
-
107
66
  end
data/log_buddy.gemspec CHANGED
@@ -2,21 +2,21 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{log_buddy}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.5"
6
6
 
7
- s.required_rubygems_version = Gem::Requirement.new("= 1.2") if s.respond_to? :required_rubygems_version=
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Rob Sanheim - Relevance"]
9
- s.date = %q{2008-10-30}
9
+ s.date = %q{2008-12-05}
10
10
  s.description = %q{Log statements along with their name easily. Mixin a logger everywhere when you need it.}
11
11
  s.email = %q{opensource@thinkrelevance.com}
12
- s.extra_rdoc_files = ["CHANGELOG", "lib/log_buddy.rb", "LICENSE", "README.rdoc"]
13
- s.files = ["CHANGELOG", "examples.rb", "init.rb", "lib/log_buddy.rb", "LICENSE", "log_buddy.gemspec", "Manifest", "Rakefile", "README.rdoc", "spec/helper.rb", "spec/log_buddy_init_spec.rb", "spec/log_buddy_spec.rb"]
12
+ s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.rdoc", "lib/log_buddy/mixin.rb", "lib/log_buddy/utils.rb", "lib/log_buddy/version.rb", "lib/log_buddy.rb"]
13
+ s.files = ["CHANGELOG", "LICENSE", "Manifest", "README.rdoc", "Rakefile", "examples/example_helper.rb", "examples/log_buddy_example.rb", "examples/log_buddy_init_example.rb", "examples/log_example.rb", "examples.rb", "init.rb", "lib/log_buddy/mixin.rb", "lib/log_buddy/utils.rb", "lib/log_buddy/version.rb", "lib/log_buddy.rb", "log_buddy.gemspec"]
14
14
  s.has_rdoc = true
15
15
  s.homepage = %q{http://opensource.thinkrelevance.com/wiki/log_buddy}
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Log_buddy", "--main", "README.rdoc"]
17
17
  s.require_paths = ["lib"]
18
18
  s.rubyforge_project = %q{thinkrelevance}
19
- s.rubygems_version = %q{1.3.0}
19
+ s.rubygems_version = %q{1.3.1}
20
20
  s.summary = %q{Log Buddy is your little development buddy.}
21
21
 
22
22
  if s.respond_to? :specification_version then
@@ -24,15 +24,18 @@ Gem::Specification.new do |s|
24
24
  s.specification_version = 2
25
25
 
26
26
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
+ s.add_development_dependency(%q<echoe>, [">= 0"])
27
28
  s.add_development_dependency(%q<echoe>, [">= 0"])
28
29
  s.add_development_dependency(%q<allison>, [">= 0"])
29
30
  s.add_development_dependency(%q<markaby>, [">= 0"])
30
31
  else
32
+ s.add_dependency(%q<echoe>, [">= 0"])
31
33
  s.add_dependency(%q<echoe>, [">= 0"])
32
34
  s.add_dependency(%q<allison>, [">= 0"])
33
35
  s.add_dependency(%q<markaby>, [">= 0"])
34
36
  end
35
37
  else
38
+ s.add_dependency(%q<echoe>, [">= 0"])
36
39
  s.add_dependency(%q<echoe>, [">= 0"])
37
40
  s.add_dependency(%q<allison>, [">= 0"])
38
41
  s.add_dependency(%q<markaby>, [">= 0"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log_buddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Sanheim - Relevance
@@ -9,9 +9,19 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-30 00:00:00 -04:00
12
+ date: 2008-12-05 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: echoe
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
15
25
  - !ruby/object:Gem::Dependency
16
26
  name: echoe
17
27
  type: :development
@@ -50,22 +60,29 @@ extensions: []
50
60
 
51
61
  extra_rdoc_files:
52
62
  - CHANGELOG
53
- - lib/log_buddy.rb
54
63
  - LICENSE
55
64
  - README.rdoc
65
+ - lib/log_buddy/mixin.rb
66
+ - lib/log_buddy/utils.rb
67
+ - lib/log_buddy/version.rb
68
+ - lib/log_buddy.rb
56
69
  files:
57
70
  - CHANGELOG
71
+ - LICENSE
72
+ - Manifest
73
+ - README.rdoc
74
+ - Rakefile
75
+ - examples/example_helper.rb
76
+ - examples/log_buddy_example.rb
77
+ - examples/log_buddy_init_example.rb
78
+ - examples/log_example.rb
58
79
  - examples.rb
59
80
  - init.rb
81
+ - lib/log_buddy/mixin.rb
82
+ - lib/log_buddy/utils.rb
83
+ - lib/log_buddy/version.rb
60
84
  - lib/log_buddy.rb
61
- - LICENSE
62
85
  - log_buddy.gemspec
63
- - Manifest
64
- - Rakefile
65
- - README.rdoc
66
- - spec/helper.rb
67
- - spec/log_buddy_init_spec.rb
68
- - spec/log_buddy_spec.rb
69
86
  has_rdoc: true
70
87
  homepage: http://opensource.thinkrelevance.com/wiki/log_buddy
71
88
  post_install_message:
@@ -86,14 +103,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
103
  version:
87
104
  required_rubygems_version: !ruby/object:Gem::Requirement
88
105
  requirements:
89
- - - "="
106
+ - - ">="
90
107
  - !ruby/object:Gem::Version
91
108
  version: "1.2"
92
109
  version:
93
110
  requirements: []
94
111
 
95
112
  rubyforge_project: thinkrelevance
96
- rubygems_version: 1.3.0
113
+ rubygems_version: 1.3.1
97
114
  signing_key:
98
115
  specification_version: 2
99
116
  summary: Log Buddy is your little development buddy.
@@ -1,27 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), *%w[helper]))
2
-
3
- describe "LogBuddy init" do
4
- after { reset_safe_log_buddy_mode }
5
-
6
- it "doesnt mixin to object if SAFE_LOG_BUDDY is true" do
7
- LogBuddy.expects(:init).never
8
- ENV["SAFE_LOG_BUDDY"] = "true"
9
- load_init
10
- end
11
-
12
- it "mixin to object if SAFE_LOG_BUDDY is true" do
13
- LogBuddy.expects(:init).once
14
- load_init
15
- end
16
-
17
- def load_init
18
- silence_warnings do
19
- load File.join(File.dirname(__FILE__), *%w[.. init.rb])
20
- end
21
- end
22
-
23
- def reset_safe_log_buddy_mode
24
- ENV["SAFE_LOG_BUDDY"] = nil
25
- end
26
-
27
- end