sinatra-logger 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +19 -5
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/sinatra/logger.rb +22 -6
- data/sinatra-logger.gemspec +7 -7
- metadata +17 -7
data/README.rdoc
CHANGED
@@ -5,9 +5,6 @@ A Sinatra extension that makes logging within Your apps easy.
|
|
5
5
|
|
6
6
|
== Installation
|
7
7
|
|
8
|
-
# Add Gemcutter to your RubyGems sources
|
9
|
-
$ gem sources -a http://gemcutter.com
|
10
|
-
|
11
8
|
$ (sudo)? gem install sinatra-logger
|
12
9
|
|
13
10
|
== Dependencies
|
@@ -16,7 +13,7 @@ This Gem depends upon the following:
|
|
16
13
|
|
17
14
|
=== Runtime:
|
18
15
|
|
19
|
-
* sinatra ( >= 1.0
|
16
|
+
* sinatra ( >= 1.0 )
|
20
17
|
* logger
|
21
18
|
|
22
19
|
=== Development & Tests:
|
@@ -32,11 +29,28 @@ This Gem depends upon the following:
|
|
32
29
|
To get logging in your app, just register the extension
|
33
30
|
in your sub-classed Sinatra app:
|
34
31
|
|
35
|
-
class YourApp < Sinatra::Base
|
32
|
+
class YourApp < Sinatra::Base
|
33
|
+
|
34
|
+
# NB! you need to set the root of the app first
|
35
|
+
set :root, '/path/2/the/root/of/your/app'
|
36
36
|
|
37
37
|
register(Sinatra::Logger)
|
38
38
|
<snip...>
|
39
39
|
end
|
40
|
+
|
41
|
+
|
42
|
+
In your "classic" Sinatra app, you just require the extension like this:
|
43
|
+
|
44
|
+
require 'rubygems'
|
45
|
+
require 'sinatra'
|
46
|
+
require 'sinatra/logger'
|
47
|
+
|
48
|
+
# NB! you need to set the root of the app first
|
49
|
+
set :root, '/path/2/the/root/of/your/app'
|
50
|
+
|
51
|
+
<snip...>
|
52
|
+
|
53
|
+
|
40
54
|
|
41
55
|
Then in your App's route or helper method declarations, just use the <tt>#logger</tt>...
|
42
56
|
|
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ begin
|
|
10
10
|
gem.email = "kematzy@gmail.com"
|
11
11
|
gem.homepage = "http://github.com/kematzy/sinatra-logger"
|
12
12
|
gem.authors = ["kematzy"]
|
13
|
-
gem.add_dependency( "sinatra", ">= 0
|
13
|
+
gem.add_dependency( "sinatra", ">= 1.0")
|
14
14
|
gem.add_development_dependency( "rspec", ">= 1.3.0")
|
15
15
|
gem.add_development_dependency( "sinatra-tests", ">= 0.1.6")
|
16
16
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/sinatra/logger.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
|
2
|
-
require 'sinatra/base'
|
3
2
|
require 'logger'
|
4
3
|
|
5
4
|
module Sinatra
|
@@ -11,9 +10,6 @@ module Sinatra
|
|
11
10
|
#
|
12
11
|
# == Installation
|
13
12
|
#
|
14
|
-
# # Add Gemcutter to your RubyGems sources
|
15
|
-
# $ gem sources -a http://gemcutter.com
|
16
|
-
#
|
17
13
|
# $ (sudo)? gem install sinatra-logger
|
18
14
|
#
|
19
15
|
# == Dependencies
|
@@ -22,7 +18,7 @@ module Sinatra
|
|
22
18
|
#
|
23
19
|
# === Runtime:
|
24
20
|
#
|
25
|
-
# * sinatra ( >= 1.0
|
21
|
+
# * sinatra ( >= 1.0 )
|
26
22
|
# * logger
|
27
23
|
#
|
28
24
|
# === Development & Tests:
|
@@ -40,10 +36,28 @@ module Sinatra
|
|
40
36
|
#
|
41
37
|
# class YourApp < Sinatra::Base
|
42
38
|
#
|
39
|
+
# # NB! you need to set the root of the app first
|
40
|
+
# # set :root, '/path/2/the/root/of/your/app'
|
41
|
+
#
|
43
42
|
# register(Sinatra::Logger)
|
43
|
+
#
|
44
44
|
# <snip...>
|
45
|
+
#
|
45
46
|
# end
|
46
47
|
#
|
48
|
+
#
|
49
|
+
# In your "classic" Sinatra app, you just require the extension like this:
|
50
|
+
#
|
51
|
+
# require 'rubygems'
|
52
|
+
# require 'sinatra'
|
53
|
+
# require 'sinatra/logger'
|
54
|
+
#
|
55
|
+
# # NB! you need to set the root of the app first
|
56
|
+
# # set :root, '/path/2/the/root/of/your/app'
|
57
|
+
#
|
58
|
+
# <snip...>
|
59
|
+
#
|
60
|
+
#
|
47
61
|
# Then in your App's route or helper method declarations, just use the <tt>#logger</tt>...
|
48
62
|
#
|
49
63
|
# get '/some/route' do
|
@@ -135,7 +149,7 @@ module Sinatra
|
|
135
149
|
#
|
136
150
|
module Logger
|
137
151
|
|
138
|
-
VERSION = '0.1.
|
152
|
+
VERSION = '0.1.1'
|
139
153
|
##
|
140
154
|
# Returns the version string for this extension
|
141
155
|
#
|
@@ -182,4 +196,6 @@ module Sinatra
|
|
182
196
|
|
183
197
|
end #/module Logger
|
184
198
|
|
199
|
+
register(Sinatra::Logger)
|
200
|
+
|
185
201
|
end #/ Sinatra
|
data/sinatra-logger.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sinatra-logger}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["kematzy"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-08-29}
|
13
13
|
s.description = %q{A Sinatra extension that makes logging easy}
|
14
14
|
s.email = %q{kematzy@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.homepage = %q{http://github.com/kematzy/sinatra-logger}
|
33
33
|
s.rdoc_options = ["--charset=UTF-8"]
|
34
34
|
s.require_paths = ["lib"]
|
35
|
-
s.rubygems_version = %q{1.3.
|
35
|
+
s.rubygems_version = %q{1.3.7}
|
36
36
|
s.summary = %q{Easy logging with Sinatra}
|
37
37
|
s.test_files = [
|
38
38
|
"spec/sinatra/logger_spec.rb",
|
@@ -43,17 +43,17 @@ Gem::Specification.new do |s|
|
|
43
43
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
44
44
|
s.specification_version = 3
|
45
45
|
|
46
|
-
if Gem::Version.new(Gem::
|
47
|
-
s.add_runtime_dependency(%q<sinatra>, [">= 0
|
46
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
47
|
+
s.add_runtime_dependency(%q<sinatra>, [">= 1.0"])
|
48
48
|
s.add_development_dependency(%q<rspec>, [">= 1.3.0"])
|
49
49
|
s.add_development_dependency(%q<sinatra-tests>, [">= 0.1.6"])
|
50
50
|
else
|
51
|
-
s.add_dependency(%q<sinatra>, [">= 0
|
51
|
+
s.add_dependency(%q<sinatra>, [">= 1.0"])
|
52
52
|
s.add_dependency(%q<rspec>, [">= 1.3.0"])
|
53
53
|
s.add_dependency(%q<sinatra-tests>, [">= 0.1.6"])
|
54
54
|
end
|
55
55
|
else
|
56
|
-
s.add_dependency(%q<sinatra>, [">= 0
|
56
|
+
s.add_dependency(%q<sinatra>, [">= 1.0"])
|
57
57
|
s.add_dependency(%q<rspec>, [">= 1.3.0"])
|
58
58
|
s.add_dependency(%q<sinatra-tests>, [">= 0.1.6"])
|
59
59
|
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 25
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- kematzy
|
@@ -14,30 +15,33 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-08-29 00:00:00 +08:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: sinatra
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ">="
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 15
|
27
30
|
segments:
|
28
|
-
- 0
|
29
|
-
- 10
|
30
31
|
- 1
|
31
|
-
|
32
|
+
- 0
|
33
|
+
version: "1.0"
|
32
34
|
type: :runtime
|
33
35
|
version_requirements: *id001
|
34
36
|
- !ruby/object:Gem::Dependency
|
35
37
|
name: rspec
|
36
38
|
prerelease: false
|
37
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
38
41
|
requirements:
|
39
42
|
- - ">="
|
40
43
|
- !ruby/object:Gem::Version
|
44
|
+
hash: 27
|
41
45
|
segments:
|
42
46
|
- 1
|
43
47
|
- 3
|
@@ -49,9 +53,11 @@ dependencies:
|
|
49
53
|
name: sinatra-tests
|
50
54
|
prerelease: false
|
51
55
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
52
57
|
requirements:
|
53
58
|
- - ">="
|
54
59
|
- !ruby/object:Gem::Version
|
60
|
+
hash: 23
|
55
61
|
segments:
|
56
62
|
- 0
|
57
63
|
- 1
|
@@ -90,23 +96,27 @@ rdoc_options:
|
|
90
96
|
require_paths:
|
91
97
|
- lib
|
92
98
|
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
93
100
|
requirements:
|
94
101
|
- - ">="
|
95
102
|
- !ruby/object:Gem::Version
|
103
|
+
hash: 3
|
96
104
|
segments:
|
97
105
|
- 0
|
98
106
|
version: "0"
|
99
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
100
109
|
requirements:
|
101
110
|
- - ">="
|
102
111
|
- !ruby/object:Gem::Version
|
112
|
+
hash: 3
|
103
113
|
segments:
|
104
114
|
- 0
|
105
115
|
version: "0"
|
106
116
|
requirements: []
|
107
117
|
|
108
118
|
rubyforge_project:
|
109
|
-
rubygems_version: 1.3.
|
119
|
+
rubygems_version: 1.3.7
|
110
120
|
signing_key:
|
111
121
|
specification_version: 3
|
112
122
|
summary: Easy logging with Sinatra
|