yodatra 0.1.6 → 0.1.7
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.md +2 -1
- data/lib/yodatra/logger.rb +12 -11
- data/lib/yodatra/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
Yodatra
|
1
|
+
Yodatra
|
2
2
|
===
|
3
|
+
[](https://travis-ci.org/squareteam/yodatra) [](https://coveralls.io/r/squareteam/yodatra) [](http://badge.fury.io/rb/yodatra)
|
3
4
|
|
4
5
|
Backend development you shall do. And yodatra you shall use.
|
5
6
|
|
data/lib/yodatra/logger.rb
CHANGED
@@ -2,18 +2,19 @@ module Yodatra
|
|
2
2
|
class Logger < Sinatra::Base
|
3
3
|
|
4
4
|
configure do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
set :logging, true
|
6
|
+
set :root, Dir.pwd
|
7
|
+
end
|
8
|
+
configure :development, :production do
|
9
|
+
filename_stdout = File.join(root, 'log', "#{environment}.log")
|
10
|
+
filename_stderr = File.join(root, 'log', "#{environment}.err.log")
|
11
|
+
file_stdout = File.new(filename_stdout, 'a+')
|
12
|
+
file_stderr = File.new(filename_stderr, 'a+')
|
13
|
+
file_stdout.sync = true
|
14
|
+
file_stderr.sync = true
|
15
|
+
use Rack::CommonLogger, file_stdout
|
16
|
+
$stderr.reopen(file_stderr)
|
10
17
|
end
|
11
|
-
|
12
|
-
#require 'sinatra/logger'
|
13
|
-
#register Sinatra::Logger
|
14
|
-
# set :logger_level, :debug unless environment == 'production'
|
15
|
-
# set the full path to the log file
|
16
|
-
# set :logger_log_file, lambda { filename }
|
17
18
|
|
18
19
|
end
|
19
20
|
|
data/lib/yodatra/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yodatra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-02-
|
12
|
+
date: 2014-02-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|