relevance-log_buddy 0.4.10 → 0.4.11
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.
- data/.gitignore +7 -0
- data/.treasure_map.rb +17 -0
- data/CHANGELOG +31 -0
- data/Rakefile +2 -2
- data/VERSION.yml +1 -1
- data/examples/log_buddy/gem_logger_example.rb +30 -26
- data/examples.rb +31 -0
- data/init.rb +2 -0
- data/lib/log_buddy/gem_logger.rb +2 -2
- data/log_buddy.gemspec +65 -0
- metadata +9 -3
data/.gitignore
ADDED
data/.treasure_map.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
map_for(:log_buddy) do |wizard|
|
2
|
+
|
3
|
+
wizard.keep_a_watchful_eye_for 'lib', 'examples'
|
4
|
+
|
5
|
+
wizard.prepare_spell_for %r%examples/(.*)_example\.rb% do |spell_component|
|
6
|
+
["examples/#{spell_component[1]}_example.rb"]
|
7
|
+
end
|
8
|
+
|
9
|
+
wizard.prepare_spell_for %r%examples/example_helper\.rb% do |spell_component|
|
10
|
+
Dir["examples/**/*_example.rb"]
|
11
|
+
end
|
12
|
+
|
13
|
+
wizard.prepare_spell_for %r%lib/(.*)\.rb% do |spell_component|
|
14
|
+
["examples/#{spell_component[1]}_example.rb"]
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
data/CHANGELOG
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
v0.4.10 Switch to jeweler; remove dependencies that were superfluous
|
2
|
+
|
3
|
+
v0.4.9 Added gem logging for debugging help when tracking down Gem activation errors
|
4
|
+
|
5
|
+
v0.2.3 Updating Micronaut
|
6
|
+
|
7
|
+
v0.2.0. Better log output of objects based on their type, very similar to Logger/irb behavior; update to micronaut 0.1.0
|
8
|
+
|
9
|
+
v0.1.5. Clean up specs and remove noise from spec run
|
10
|
+
|
11
|
+
v0.1.4. Micronauts Unite! Test Suite now runs via Micronaut - http://github.com/spicycode/micronaut/
|
12
|
+
|
13
|
+
v0.1.3. Use plain old echoe; really fix rubygems errors (I hope)
|
14
|
+
|
15
|
+
v0.1.2. Attempting to fix rubygems errors
|
16
|
+
|
17
|
+
v0.1.1. Handle exceptions from within the block
|
18
|
+
|
19
|
+
v0.1.0. Specify, clean up
|
20
|
+
|
21
|
+
v0.0.6. changed to mixing to Object by default - set ENV["SAFE_LOG_BUDDY"] = true to override
|
22
|
+
|
23
|
+
v0.0.5. update echoe dependency to work with github
|
24
|
+
|
25
|
+
v0.0.4. add dev dependencies, remove gem calls from rdoc task
|
26
|
+
|
27
|
+
v0.0.3. specs and tweaks
|
28
|
+
|
29
|
+
v0.0.2. rdocs; support for multiple statements in one "d" call separated by semicolons
|
30
|
+
|
31
|
+
v0.0.1. Initial release to github; Birthday
|
data/Rakefile
CHANGED
@@ -27,7 +27,7 @@ begin
|
|
27
27
|
|
28
28
|
Micronaut::RakeTask.new(:rcov) do |examples|
|
29
29
|
examples.pattern = 'examples/**/*_example.rb'
|
30
|
-
examples.rcov_opts = %[-Ilib -Iexamples --exclude "gems/*,/Library/Ruby/*,config/*" --text-summary --sort coverage
|
30
|
+
examples.rcov_opts = %[-Ilib -Iexamples --exclude "gems/*,/Library/Ruby/*,config/*" --text-summary --sort coverage]
|
31
31
|
examples.rcov = true
|
32
32
|
end
|
33
33
|
|
@@ -49,4 +49,4 @@ Rake::RDocTask.new do |rdoc|
|
|
49
49
|
rdoc.title = "log_buddy #{version}"
|
50
50
|
rdoc.rdoc_files.include('README*')
|
51
51
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
52
|
-
end
|
52
|
+
end
|
data/VERSION.yml
CHANGED
@@ -10,36 +10,40 @@ describe LogBuddy::GemLogger do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
end
|
13
|
-
|
14
|
-
|
13
|
+
|
14
|
+
if RUBY_VERSION =! '1.9.1'
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
describe "Gem#activation monkey patching for logging" do
|
17
|
+
|
18
|
+
before do
|
19
|
+
LogBuddy.init
|
20
|
+
LogBuddy::GemLogger.log_gems!
|
21
|
+
end
|
20
22
|
|
21
|
-
|
22
|
-
|
23
|
+
it "should log the gem name and version and where it was called from" do
|
24
|
+
Gem.stubs(:activate_without_logging)
|
25
|
+
|
26
|
+
LogBuddy.expects(:debug).with do |msg|
|
27
|
+
msg.should include(%[Gem activation for gem: 'gem-name' version: '0.5' called from:\n])
|
28
|
+
gem_calling_line = __LINE__ + 3
|
29
|
+
msg.should include(%[examples/log_buddy/gem_logger_example.rb:#{gem_calling_line}])
|
30
|
+
end
|
31
|
+
gem "gem-name", "0.5"
|
32
|
+
end
|
23
33
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
34
|
+
it "should do the original gem activation call" do
|
35
|
+
LogBuddy.stubs(:debug)
|
36
|
+
Gem.expects(:activate_without_logging).with('gem-name', ">= 1.0.0")
|
37
|
+
gem "gem-name", ">= 1.0.0"
|
28
38
|
end
|
29
|
-
gem "gem-name", "0.5"
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should do the original gem activation call" do
|
33
|
-
LogBuddy.stubs(:debug)
|
34
|
-
Gem.expects(:activate_without_logging).with('gem-name', ">= 1.0.0")
|
35
|
-
gem "gem-name", ">= 1.0.0"
|
36
|
-
end
|
37
|
-
|
38
|
-
it "should add alias gem_without_logging" do
|
39
|
-
Gem.should respond_to(:activate)
|
40
|
-
Gem.should respond_to(:activate_without_logging)
|
41
|
-
end
|
42
39
|
|
40
|
+
it "should add alias gem_without_logging" do
|
41
|
+
Gem.should respond_to(:activate)
|
42
|
+
Gem.should respond_to(:activate_without_logging)
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
43
47
|
end
|
44
48
|
|
45
|
-
end
|
49
|
+
end
|
data/examples.rb
ADDED
@@ -0,0 +1,31 @@
|
|
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
ADDED
data/lib/log_buddy/gem_logger.rb
CHANGED
data/log_buddy.gemspec
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{log_buddy}
|
5
|
+
s.version = "0.4.11"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Rob Sanheim"]
|
9
|
+
s.date = %q{2009-05-22}
|
10
|
+
s.description = %q{Log statements along with their name easily. Mixin a logger everywhere when you need it.}
|
11
|
+
s.email = %q{rsanheim@gmail.com}
|
12
|
+
s.extra_rdoc_files = [
|
13
|
+
"LICENSE",
|
14
|
+
"README.markdown"
|
15
|
+
]
|
16
|
+
s.files = [
|
17
|
+
".gitignore",
|
18
|
+
".treasure_map.rb",
|
19
|
+
"CHANGELOG",
|
20
|
+
"LICENSE",
|
21
|
+
"README.markdown",
|
22
|
+
"Rakefile",
|
23
|
+
"VERSION.yml",
|
24
|
+
"examples.rb",
|
25
|
+
"examples/log_buddy/example_helper.rb",
|
26
|
+
"examples/log_buddy/gem_logger_example.rb",
|
27
|
+
"examples/log_buddy/log_buddy_example.rb",
|
28
|
+
"examples/log_buddy/log_buddy_init_example.rb",
|
29
|
+
"examples/log_buddy/log_example.rb",
|
30
|
+
"init.rb",
|
31
|
+
"lib/log_buddy.rb",
|
32
|
+
"lib/log_buddy/gem_logger.rb",
|
33
|
+
"lib/log_buddy/mixin.rb",
|
34
|
+
"lib/log_buddy/utils.rb",
|
35
|
+
"lib/log_buddy/version.rb",
|
36
|
+
"log_buddy.gemspec"
|
37
|
+
]
|
38
|
+
s.has_rdoc = true
|
39
|
+
s.homepage = %q{http://github.com/relevance/log_buddy}
|
40
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
41
|
+
s.require_paths = ["lib"]
|
42
|
+
s.rubyforge_project = %q{thinkrelevance}
|
43
|
+
s.rubygems_version = %q{1.3.1}
|
44
|
+
s.summary = %q{Log Buddy is your little development buddy.}
|
45
|
+
s.test_files = [
|
46
|
+
"examples/log_buddy/example_helper.rb",
|
47
|
+
"examples/log_buddy/gem_logger_example.rb",
|
48
|
+
"examples/log_buddy/log_buddy_example.rb",
|
49
|
+
"examples/log_buddy/log_buddy_init_example.rb",
|
50
|
+
"examples/log_buddy/log_example.rb"
|
51
|
+
]
|
52
|
+
|
53
|
+
if s.respond_to? :specification_version then
|
54
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
55
|
+
s.specification_version = 2
|
56
|
+
|
57
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
58
|
+
s.add_development_dependency(%q<spicycode-micronaut>, [">= 0"])
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<spicycode-micronaut>, [">= 0"])
|
61
|
+
end
|
62
|
+
else
|
63
|
+
s.add_dependency(%q<spicycode-micronaut>, [">= 0"])
|
64
|
+
end
|
65
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relevance-log_buddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Sanheim
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-05-22 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -32,20 +32,26 @@ extra_rdoc_files:
|
|
32
32
|
- LICENSE
|
33
33
|
- README.markdown
|
34
34
|
files:
|
35
|
+
- .gitignore
|
36
|
+
- .treasure_map.rb
|
37
|
+
- CHANGELOG
|
35
38
|
- LICENSE
|
36
39
|
- README.markdown
|
37
40
|
- Rakefile
|
38
41
|
- VERSION.yml
|
42
|
+
- examples.rb
|
39
43
|
- examples/log_buddy/example_helper.rb
|
40
44
|
- examples/log_buddy/gem_logger_example.rb
|
41
45
|
- examples/log_buddy/log_buddy_example.rb
|
42
46
|
- examples/log_buddy/log_buddy_init_example.rb
|
43
47
|
- examples/log_buddy/log_example.rb
|
48
|
+
- init.rb
|
44
49
|
- lib/log_buddy.rb
|
45
50
|
- lib/log_buddy/gem_logger.rb
|
46
51
|
- lib/log_buddy/mixin.rb
|
47
52
|
- lib/log_buddy/utils.rb
|
48
53
|
- lib/log_buddy/version.rb
|
54
|
+
- log_buddy.gemspec
|
49
55
|
has_rdoc: true
|
50
56
|
homepage: http://github.com/relevance/log_buddy
|
51
57
|
post_install_message:
|
@@ -70,7 +76,7 @@ requirements: []
|
|
70
76
|
rubyforge_project: thinkrelevance
|
71
77
|
rubygems_version: 1.2.0
|
72
78
|
signing_key:
|
73
|
-
specification_version:
|
79
|
+
specification_version: 2
|
74
80
|
summary: Log Buddy is your little development buddy.
|
75
81
|
test_files:
|
76
82
|
- examples/log_buddy/example_helper.rb
|