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 CHANGED
@@ -1,5 +1,6 @@
1
- Yodatra [![Build Status](https://travis-ci.org/squareteam/yodatra.png?branch=master)](https://travis-ci.org/squareteam/yodatra) [![Coverage Status](https://coveralls.io/repos/squareteam/yodatra/badge.png)](https://coveralls.io/r/squareteam/yodatra)
1
+ Yodatra
2
2
  ===
3
+ [![Build Status](https://travis-ci.org/squareteam/yodatra.png?branch=master)](https://travis-ci.org/squareteam/yodatra) [![Coverage Status](https://coveralls.io/repos/squareteam/yodatra/badge.png)](https://coveralls.io/r/squareteam/yodatra) [![Gem Version](https://badge.fury.io/rb/yodatra.png)](http://badge.fury.io/rb/yodatra)
3
4
 
4
5
  Backend development you shall do. And yodatra you shall use.
5
6
 
@@ -2,18 +2,19 @@ module Yodatra
2
2
  class Logger < Sinatra::Base
3
3
 
4
4
  configure do
5
- enable :logging
6
- filename = File.join(Dir.pwd, 'log', "#{environment}.log")
7
- file = File.new(filename, 'a+')
8
- file.sync = true
9
- use Rack::CommonLogger, file
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
 
@@ -1,3 +1,3 @@
1
1
  module Yodatra
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
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.6
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-09 00:00:00.000000000 Z
12
+ date: 2014-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack