yodatra 0.3.11 → 0.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yodatra/logger.rb +7 -9
- data/lib/yodatra/version.rb +1 -1
- data/yodatra.gemspec +2 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b574da67cdd7454ef9000945bb97a5f32ea9bec
|
4
|
+
data.tar.gz: 8673ca455b6b1ca29739e1de7b3d53857c34fa2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dd359496e5c7aa846abc26696eeaa0d4475772924c4800fe5bdfadbf11d3e5a5d6fc7a37833aa8b0c8f6b70b523c418c1c8dfe15bc26aa5be207e24da4d6046
|
7
|
+
data.tar.gz: 07d6eb00cd7d2117f4c1430314807df113813f1608587f508418d0846105cbd13d20cea629ce5fa68bea22f6101479317ee58066b52f2004962a07af694d74cf
|
data/lib/yodatra/logger.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require "clogger"
|
2
|
+
|
1
3
|
module Yodatra
|
2
4
|
class Logger < Sinatra::Base
|
3
5
|
|
@@ -6,16 +8,12 @@ module Yodatra
|
|
6
8
|
set :root, Dir.pwd
|
7
9
|
end
|
8
10
|
configure :development, :production do
|
9
|
-
|
10
|
-
|
11
|
-
file_stdout = File.new(
|
12
|
-
file_stderr = File.new(filename_stderr, 'a+')
|
11
|
+
path ||= File.join(Dir.pwd, 'log', "#{environment}.log")
|
12
|
+
format ||= :Combined
|
13
|
+
file_stdout = File.new(path, 'a+')
|
13
14
|
file_stdout.sync = true
|
14
|
-
|
15
|
-
use Rack::CommonLogger, file_stdout
|
16
|
-
$stderr.reopen(file_stderr)
|
15
|
+
use Clogger, :logger => file_stdout, :format => format
|
17
16
|
end
|
18
17
|
|
19
18
|
end
|
20
|
-
|
21
|
-
end
|
19
|
+
end
|
data/lib/yodatra/version.rb
CHANGED
data/yodatra.gemspec
CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new 'yodatra', Yodatra::VERSION do |s|
|
|
17
17
|
s.add_dependency 'sinatra', '~> 1.4.4', '>= 1.4.4'
|
18
18
|
s.add_dependency 'sinatra-activerecord', '>= 1.2.4'
|
19
19
|
s.add_dependency 'sinatra-logger'
|
20
|
+
s.add_dependency 'clogger'
|
20
21
|
s.add_dependency 'sinatra-contrib', '~> 1.4.2', '>= 1.4.2'
|
21
22
|
s.add_dependency 'rack-protection', '~> 1.4'
|
22
|
-
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yodatra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Bonaud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -72,6 +72,20 @@ dependencies:
|
|
72
72
|
- - '>='
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: clogger
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - '>='
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
75
89
|
- !ruby/object:Gem::Dependency
|
76
90
|
name: sinatra-contrib
|
77
91
|
requirement: !ruby/object:Gem::Requirement
|