log_buddy 0.4.9 → 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
- data/{README.rdoc → README.markdown} +11 -14
- data/Rakefile +44 -35
- data/VERSION.yml +4 -0
- data/examples/log_buddy/example_helper.rb +3 -1
- metadata +22 -72
- data/CHANGELOG +0 -29
- data/Manifest +0 -18
- data/examples.rb +0 -31
- data/init.rb +0 -2
- data/log_buddy.gemspec +0 -46
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
# LogBuddy
|
2
2
|
|
3
|
-
|
3
|
+
## DESCRIPTION:
|
4
4
|
|
5
5
|
log_buddy is your friendly little log buddy at your side, helping you dev, debug, and test.
|
6
6
|
|
7
|
-
|
7
|
+
## SYNOPSIS:
|
8
8
|
|
9
9
|
Require the init.rb file to use log_buddy. By default, it will add two methods to every object at the instance and class level: "d" and "logger". To use log_buddy without the automatic object intrusion, set ENV["SAFE_LOG_BUDDY"] = true before requiring the init.rb.
|
10
10
|
|
@@ -40,23 +40,23 @@ See examples.rb for live examples you can run.
|
|
40
40
|
|
41
41
|
When you occasionally want to disable LogBuddy (but you don't want to have to remove all your debug statements), you can pass the :disabled option into init's options hash:
|
42
42
|
|
43
|
-
|
43
|
+
LogBuddy.init :disabled => true
|
44
44
|
|
45
|
-
|
45
|
+
## REQUIREMENTS:
|
46
46
|
|
47
47
|
* Ruby 1.8.6 or JRuby (tested with 1.1RC3)
|
48
48
|
* untested on Ruby versions before 1.8.6, but should work fine
|
49
49
|
|
50
|
-
|
50
|
+
## ISSUES
|
51
51
|
|
52
52
|
* This is meant for non-production use while developing and testing --> it does stuff that is slow and you probably don't want happening in your production environment.
|
53
53
|
* Don't even try using this in irb.
|
54
54
|
|
55
|
-
|
55
|
+
## INSTALL:
|
56
56
|
|
57
|
-
|
57
|
+
sudo gem install log_buddy
|
58
58
|
|
59
|
-
|
59
|
+
## URLS
|
60
60
|
|
61
61
|
* Log bugs, issues, and suggestions at Lighthouse: http://relevance.lighthouseapp.com/projects/19074-log-buddy/overview
|
62
62
|
* View Source: http://github.com/relevance/log_buddy
|
@@ -64,7 +64,7 @@ When you occasionally want to disable LogBuddy (but you don't want to have to re
|
|
64
64
|
* Continuous Integration: http://runcoderun.com/relevance/log_buddy
|
65
65
|
* RDocs: http://thinkrelevance.rubyforge.org/log_buddy
|
66
66
|
|
67
|
-
|
67
|
+
## LICENSE:
|
68
68
|
|
69
69
|
(The MIT License)
|
70
70
|
|
@@ -87,7 +87,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
87
87
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
88
88
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
89
89
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
90
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
91
|
-
|
92
|
-
|
93
|
-
|
90
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -1,43 +1,52 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
rdoc_template = `allison --path`.strip << ".rb"
|
18
|
-
p.rdoc_template = rdoc_template
|
2
|
+
begin
|
3
|
+
require 'jeweler'
|
4
|
+
Jeweler::Tasks.new do |gem|
|
5
|
+
gem.name = "log_buddy"
|
6
|
+
gem.summary = %Q{Log Buddy is your little development buddy.}
|
7
|
+
gem.description = %Q{Log statements along with their name easily. Mixin a logger everywhere when you need it.}
|
8
|
+
gem.email = "rsanheim@gmail.com"
|
9
|
+
gem.homepage = "http://github.com/relevance/log_buddy"
|
10
|
+
gem.authors = ["Rob Sanheim"]
|
11
|
+
gem.add_development_dependency "spicycode-micronaut"
|
12
|
+
gem.rubyforge_project = 'thinkrelevance'
|
13
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
14
|
+
end
|
15
|
+
rescue LoadError
|
16
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
19
17
|
end
|
20
18
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
Micronaut::RakeTask.new(:examples)
|
19
|
+
begin
|
20
|
+
gem "spicycode-micronaut"
|
21
|
+
require 'micronaut/rake_task'
|
22
|
+
|
23
|
+
Micronaut::RakeTask.new(:examples) do |examples|
|
24
|
+
examples.pattern = 'examples/**/*_example.rb'
|
25
|
+
examples.ruby_opts << '-Ilib -Iexamples'
|
26
|
+
end
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
t.rcov_opts = %[--exclude "gems/*,/Library/Ruby/*,config/*" --text-summary --sort coverage --no-validator-links]
|
28
|
+
Micronaut::RakeTask.new(:rcov) do |examples|
|
29
|
+
examples.pattern = 'examples/**/*_example.rb'
|
30
|
+
examples.rcov_opts = %[-Ilib -Iexamples --exclude "gems/*,/Library/Ruby/*,config/*" --text-summary --sort coverage --no-validator-links]
|
31
|
+
examples.rcov = true
|
32
32
|
end
|
33
|
-
end
|
34
33
|
|
35
|
-
task :default => '
|
34
|
+
task :default => 'rcov'
|
35
|
+
rescue LoadError
|
36
|
+
puts "Micronaut not available to run tests. Install it with: sudo gem install spicycode-micronaut -s http://gems.github.com"
|
37
|
+
end
|
36
38
|
|
37
|
-
|
38
|
-
|
39
|
+
require 'rake/rdoctask'
|
40
|
+
Rake::RDocTask.new do |rdoc|
|
41
|
+
if File.exist?('VERSION.yml')
|
42
|
+
config = YAML.load(File.read('VERSION.yml'))
|
43
|
+
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
|
44
|
+
else
|
45
|
+
version = ""
|
46
|
+
end
|
39
47
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
48
|
+
rdoc.rdoc_dir = 'rdoc'
|
49
|
+
rdoc.title = "log_buddy #{version}"
|
50
|
+
rdoc.rdoc_files.include('README*')
|
51
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
52
|
+
end
|
data/VERSION.yml
ADDED
metadata
CHANGED
@@ -1,57 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: log_buddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Rob Sanheim
|
7
|
+
- Rob Sanheim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-04-20 00:00:00 -04: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:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: echoe
|
27
|
-
type: :development
|
28
|
-
version_requirement:
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: "0"
|
34
|
-
version:
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: allison
|
37
|
-
type: :development
|
38
|
-
version_requirement:
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: "0"
|
44
|
-
version:
|
45
|
-
- !ruby/object:Gem::Dependency
|
46
|
-
name: markaby
|
47
|
-
type: :development
|
48
|
-
version_requirement:
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - ">="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: "0"
|
54
|
-
version:
|
55
15
|
- !ruby/object:Gem::Dependency
|
56
16
|
name: spicycode-micronaut
|
57
17
|
type: :development
|
@@ -63,50 +23,36 @@ dependencies:
|
|
63
23
|
version: "0"
|
64
24
|
version:
|
65
25
|
description: Log statements along with their name easily. Mixin a logger everywhere when you need it.
|
66
|
-
email:
|
26
|
+
email: rsanheim@gmail.com
|
67
27
|
executables: []
|
68
28
|
|
69
29
|
extensions: []
|
70
30
|
|
71
31
|
extra_rdoc_files:
|
72
|
-
- CHANGELOG
|
73
|
-
- lib/log_buddy/gem_logger.rb
|
74
|
-
- lib/log_buddy/mixin.rb
|
75
|
-
- lib/log_buddy/utils.rb
|
76
|
-
- lib/log_buddy/version.rb
|
77
|
-
- lib/log_buddy.rb
|
78
32
|
- LICENSE
|
79
|
-
-
|
80
|
-
- README.rdoc
|
33
|
+
- README.markdown
|
81
34
|
files:
|
82
|
-
-
|
35
|
+
- LICENSE
|
36
|
+
- README.markdown
|
37
|
+
- Rakefile
|
38
|
+
- VERSION.yml
|
83
39
|
- examples/log_buddy/example_helper.rb
|
84
40
|
- examples/log_buddy/gem_logger_example.rb
|
85
41
|
- examples/log_buddy/log_buddy_example.rb
|
86
42
|
- examples/log_buddy/log_buddy_init_example.rb
|
87
43
|
- examples/log_buddy/log_example.rb
|
88
|
-
-
|
89
|
-
- init.rb
|
44
|
+
- lib/log_buddy.rb
|
90
45
|
- lib/log_buddy/gem_logger.rb
|
91
46
|
- lib/log_buddy/mixin.rb
|
92
47
|
- lib/log_buddy/utils.rb
|
93
48
|
- lib/log_buddy/version.rb
|
94
|
-
- lib/log_buddy.rb
|
95
|
-
- LICENSE
|
96
|
-
- log_buddy.gemspec
|
97
|
-
- Manifest
|
98
|
-
- Rakefile
|
99
|
-
- README.rdoc
|
100
49
|
has_rdoc: true
|
101
50
|
homepage: http://github.com/relevance/log_buddy
|
51
|
+
licenses: []
|
52
|
+
|
102
53
|
post_install_message:
|
103
54
|
rdoc_options:
|
104
|
-
- --
|
105
|
-
- --inline-source
|
106
|
-
- --title
|
107
|
-
- Log_buddy
|
108
|
-
- --main
|
109
|
-
- README.rdoc
|
55
|
+
- --charset=UTF-8
|
110
56
|
require_paths:
|
111
57
|
- lib
|
112
58
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -119,14 +65,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
65
|
requirements:
|
120
66
|
- - ">="
|
121
67
|
- !ruby/object:Gem::Version
|
122
|
-
version: "
|
68
|
+
version: "0"
|
123
69
|
version:
|
124
70
|
requirements: []
|
125
71
|
|
126
72
|
rubyforge_project: thinkrelevance
|
127
|
-
rubygems_version: 1.3.
|
73
|
+
rubygems_version: 1.3.2
|
128
74
|
signing_key:
|
129
|
-
specification_version:
|
75
|
+
specification_version: 3
|
130
76
|
summary: Log Buddy is your little development buddy.
|
131
|
-
test_files:
|
132
|
-
|
77
|
+
test_files:
|
78
|
+
- examples/log_buddy/example_helper.rb
|
79
|
+
- examples/log_buddy/gem_logger_example.rb
|
80
|
+
- examples/log_buddy/log_buddy_example.rb
|
81
|
+
- examples/log_buddy/log_buddy_init_example.rb
|
82
|
+
- examples/log_buddy/log_example.rb
|
data/CHANGELOG
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
v0.4.9 Added gem logging for debugging help when tracking down Gem activation errors
|
2
|
-
|
3
|
-
v0.2.3 Updating Micronaut
|
4
|
-
|
5
|
-
v0.2.0. Better log output of objects based on their type, very similar to Logger/irb behavior; update to micronaut 0.1.0
|
6
|
-
|
7
|
-
v0.1.5. Clean up specs and remove noise from spec run
|
8
|
-
|
9
|
-
v0.1.4. Micronauts Unite! Test Suite now runs via Micronaut - http://github.com/spicycode/micronaut/
|
10
|
-
|
11
|
-
v0.1.3. Use plain old echoe; really fix rubygems errors (I hope)
|
12
|
-
|
13
|
-
v0.1.2. Attempting to fix rubygems errors
|
14
|
-
|
15
|
-
v0.1.1. Handle exceptions from within the block
|
16
|
-
|
17
|
-
v0.1.0. Specify, clean up
|
18
|
-
|
19
|
-
v0.0.6. changed to mixing to Object by default - set ENV["SAFE_LOG_BUDDY"] = true to override
|
20
|
-
|
21
|
-
v0.0.5. update echoe dependency to work with github
|
22
|
-
|
23
|
-
v0.0.4. add dev dependencies, remove gem calls from rdoc task
|
24
|
-
|
25
|
-
v0.0.3. specs and tweaks
|
26
|
-
|
27
|
-
v0.0.2. rdocs; support for multiple statements in one "d" call separated by semicolons
|
28
|
-
|
29
|
-
v0.0.1. Initial release to github; Birthday
|
data/Manifest
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
CHANGELOG
|
2
|
-
examples/log_buddy/example_helper.rb
|
3
|
-
examples/log_buddy/gem_logger_example.rb
|
4
|
-
examples/log_buddy/log_buddy_example.rb
|
5
|
-
examples/log_buddy/log_buddy_init_example.rb
|
6
|
-
examples/log_buddy/log_example.rb
|
7
|
-
examples.rb
|
8
|
-
init.rb
|
9
|
-
lib/log_buddy/gem_logger.rb
|
10
|
-
lib/log_buddy/mixin.rb
|
11
|
-
lib/log_buddy/utils.rb
|
12
|
-
lib/log_buddy/version.rb
|
13
|
-
lib/log_buddy.rb
|
14
|
-
LICENSE
|
15
|
-
log_buddy.gemspec
|
16
|
-
Manifest
|
17
|
-
Rakefile
|
18
|
-
README.rdoc
|
data/examples.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
require 'lib/log_buddy'
|
2
|
-
LogBuddy.init
|
3
|
-
|
4
|
-
a = "foo"
|
5
|
-
@a = "my var"
|
6
|
-
@@bar = "class var!"
|
7
|
-
def bark
|
8
|
-
"woof!"
|
9
|
-
end
|
10
|
-
|
11
|
-
module Foo;
|
12
|
-
def self.module_method
|
13
|
-
"hi!!"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
|
18
|
-
# LogBuddy calls and their output:
|
19
|
-
|
20
|
-
d "hi" # hi
|
21
|
-
d { a } # a = "foo"
|
22
|
-
d { @a } # @a = "my var"
|
23
|
-
d { @@bar } # @@bar = "class var!"
|
24
|
-
d { bark } # bark = "woof!"
|
25
|
-
d { Foo::module_method } # Foo::module_method = "hi!!"
|
26
|
-
|
27
|
-
hsh = {:foo => "bar", "key" => "value"}
|
28
|
-
array = [1,2,3,4,"5"]
|
29
|
-
|
30
|
-
d { hsh }
|
31
|
-
d { array }
|
data/init.rb
DELETED
data/log_buddy.gemspec
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
Gem::Specification.new do |s|
|
4
|
-
s.name = %q{log_buddy}
|
5
|
-
s.version = "0.4.9"
|
6
|
-
|
7
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = ["Rob Sanheim - Relevance"]
|
9
|
-
s.date = %q{2009-01-20}
|
10
|
-
s.description = %q{Log statements along with their name easily. Mixin a logger everywhere when you need it.}
|
11
|
-
s.email = %q{opensource@thinkrelevance.com}
|
12
|
-
s.extra_rdoc_files = ["CHANGELOG", "lib/log_buddy/gem_logger.rb", "lib/log_buddy/mixin.rb", "lib/log_buddy/utils.rb", "lib/log_buddy/version.rb", "lib/log_buddy.rb", "LICENSE", "log_buddy.gemspec", "README.rdoc"]
|
13
|
-
s.files = ["CHANGELOG", "examples/log_buddy/example_helper.rb", "examples/log_buddy/gem_logger_example.rb", "examples/log_buddy/log_buddy_example.rb", "examples/log_buddy/log_buddy_init_example.rb", "examples/log_buddy/log_example.rb", "examples.rb", "init.rb", "lib/log_buddy/gem_logger.rb", "lib/log_buddy/mixin.rb", "lib/log_buddy/utils.rb", "lib/log_buddy/version.rb", "lib/log_buddy.rb", "LICENSE", "log_buddy.gemspec", "Manifest", "Rakefile", "README.rdoc"]
|
14
|
-
s.has_rdoc = true
|
15
|
-
s.homepage = %q{http://github.com/relevance/log_buddy}
|
16
|
-
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Log_buddy", "--main", "README.rdoc"]
|
17
|
-
s.require_paths = ["lib"]
|
18
|
-
s.rubyforge_project = %q{thinkrelevance}
|
19
|
-
s.rubygems_version = %q{1.3.1}
|
20
|
-
s.summary = %q{Log Buddy is your little development buddy.}
|
21
|
-
|
22
|
-
if s.respond_to? :specification_version then
|
23
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
24
|
-
s.specification_version = 2
|
25
|
-
|
26
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
27
|
-
s.add_development_dependency(%q<echoe>, [">= 0"])
|
28
|
-
s.add_development_dependency(%q<echoe>, [">= 0"])
|
29
|
-
s.add_development_dependency(%q<allison>, [">= 0"])
|
30
|
-
s.add_development_dependency(%q<markaby>, [">= 0"])
|
31
|
-
s.add_development_dependency(%q<spicycode-micronaut>, [">= 0"])
|
32
|
-
else
|
33
|
-
s.add_dependency(%q<echoe>, [">= 0"])
|
34
|
-
s.add_dependency(%q<echoe>, [">= 0"])
|
35
|
-
s.add_dependency(%q<allison>, [">= 0"])
|
36
|
-
s.add_dependency(%q<markaby>, [">= 0"])
|
37
|
-
s.add_dependency(%q<spicycode-micronaut>, [">= 0"])
|
38
|
-
end
|
39
|
-
else
|
40
|
-
s.add_dependency(%q<echoe>, [">= 0"])
|
41
|
-
s.add_dependency(%q<echoe>, [">= 0"])
|
42
|
-
s.add_dependency(%q<allison>, [">= 0"])
|
43
|
-
s.add_dependency(%q<markaby>, [">= 0"])
|
44
|
-
s.add_dependency(%q<spicycode-micronaut>, [">= 0"])
|
45
|
-
end
|
46
|
-
end
|