log-me 0.0.0 → 0.0.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.
data/README.rdoc CHANGED
@@ -7,7 +7,7 @@ LogMe is especially useful when you need to log Web Service calls or HTTP reques
7
7
  == Instalation
8
8
 
9
9
  === Gemfile
10
- gem 'log-me'
10
+ gem 'log-me', '~> 0.0.1'
11
11
 
12
12
  === Command line
13
13
  $ gem install log-me
@@ -31,7 +31,7 @@ In your gem:
31
31
  end
32
32
 
33
33
  Using your gem:
34
- some = CoolGem.SomeClass.new
34
+ some = CoolGem::SomeClass.new
35
35
  some.do_something
36
36
 
37
37
  By default will be logged in STDOUT using log level :info:
data/Rakefile CHANGED
@@ -19,7 +19,7 @@ Jeweler::Tasks.new do |gem|
19
19
  gem.homepage = "http://github.com/prodis/log-me"
20
20
  gem.license = "MIT"
21
21
  gem.summary = %Q{A simple way to configure log in your gem.}
22
- gem.description = %Q{LogMe is especially useful when you need to log Web Service calls or HTTP requests and responses.}
22
+ gem.description = %Q{LogMe is a simple way to configure log in your gem and it's especially useful when you need to log Web Service calls or HTTP requests and responses.}
23
23
  gem.email = "prodis@gmail.com"
24
24
  gem.authors = ["Prodis a.k.a. Fernando Hamasaki"]
25
25
  gem.version = LogMe::Version::VERSION
data/lib/log-me.rb CHANGED
@@ -28,7 +28,7 @@ module LogMe
28
28
  end
29
29
 
30
30
  module Configuration
31
- def configure_me
31
+ def configure
32
32
  yield self if block_given?
33
33
  end
34
34
  end
data/lib/logme/version.rb CHANGED
@@ -3,7 +3,7 @@ module LogMe
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 0
6
- PATCH = 0
6
+ PATCH = 1
7
7
  VERSION = [MAJOR, MINOR, PATCH].join(".")
8
8
  end
9
9
  end
data/log-me.gemspec CHANGED
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{log-me}
8
- s.version = "0.0.0"
8
+ s.version = "0.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Prodis a.k.a. Fernando Hamasaki"]
12
- s.date = %q{2011-08-24}
13
- s.description = %q{LogMe is especially useful when you need to log Web Service calls or HTTP requests and responses.}
12
+ s.date = %q{2011-08-28}
13
+ s.description = %q{LogMe is a simple way to configure log in your gem and it's especially useful when you need to log Web Service calls or HTTP requests and responses.}
14
14
  s.email = %q{prodis@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "README.rdoc"
data/spec/log-me_spec.rb CHANGED
@@ -13,9 +13,9 @@ describe LogMe do
13
13
 
14
14
  context "when log is disabled" do
15
15
  around do |example|
16
- FakeModule.configure_me { |config| config.log_enabled = false }
16
+ FakeModule.configure { |config| config.log_enabled = false }
17
17
  example.run
18
- FakeModule.configure_me { |config| config.log_enabled = true }
18
+ FakeModule.configure { |config| config.log_enabled = true }
19
19
  end
20
20
 
21
21
  it "returns false" do
@@ -31,9 +31,9 @@ describe LogMe do
31
31
 
32
32
  context "when log level is set" do
33
33
  around do |example|
34
- FakeModule.configure_me { |config| config.log_level = :debug }
34
+ FakeModule.configure { |config| config.log_level = :debug }
35
35
  example.run
36
- FakeModule.configure_me { |config| config.log_level = :info }
36
+ FakeModule.configure { |config| config.log_level = :info }
37
37
  end
38
38
 
39
39
  it "returns set level" do
@@ -50,7 +50,7 @@ describe LogMe do
50
50
  context "when set logger" do
51
51
  it "returns set logger" do
52
52
  fake_logger = Class.new
53
- FakeModule.configure_me { |config| config.logger = fake_logger }
53
+ FakeModule.configure { |config| config.logger = fake_logger }
54
54
  FakeModule.logger.should == fake_logger
55
55
  end
56
56
  end
@@ -59,7 +59,7 @@ describe LogMe do
59
59
  describe "#log" do
60
60
  before :each do
61
61
  @log_stream = StringIO.new
62
- FakeModule.configure_me { |config| config.logger = ::Logger.new(@log_stream) }
62
+ FakeModule.configure { |config| config.logger = ::Logger.new(@log_stream) }
63
63
  end
64
64
 
65
65
  context "when log is enabled" do
@@ -76,9 +76,9 @@ describe LogMe do
76
76
 
77
77
  context "when log is disabled" do
78
78
  around do |example|
79
- FakeModule.configure_me { |config| config.log_enabled = false }
79
+ FakeModule.configure { |config| config.log_enabled = false }
80
80
  example.run
81
- FakeModule.configure_me { |config| config.log_enabled = true }
81
+ FakeModule.configure { |config| config.log_enabled = true }
82
82
  end
83
83
 
84
84
  it "does not log the message" do
@@ -89,9 +89,9 @@ describe LogMe do
89
89
 
90
90
  context "when log level is set" do
91
91
  around do |example|
92
- FakeModule.configure_me { |config| config.log_level = :debug }
92
+ FakeModule.configure { |config| config.log_level = :debug }
93
93
  example.run
94
- FakeModule.configure_me { |config| config.log_level = :info }
94
+ FakeModule.configure { |config| config.log_level = :info }
95
95
  end
96
96
 
97
97
  it "calls log level set method" do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: log-me
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.0
5
+ version: 0.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Prodis a.k.a. Fernando Hamasaki
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-24 00:00:00 -03:00
13
+ date: 2011-08-28 00:00:00 -03:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -57,7 +57,7 @@ dependencies:
57
57
  type: :development
58
58
  prerelease: false
59
59
  version_requirements: *id004
60
- description: LogMe is especially useful when you need to log Web Service calls or HTTP requests and responses.
60
+ description: LogMe is a simple way to configure log in your gem and it's especially useful when you need to log Web Service calls or HTTP requests and responses.
61
61
  email: prodis@gmail.com
62
62
  executables: []
63
63