yodatra 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/yodatra/base.rb CHANGED
@@ -3,15 +3,15 @@ require 'sinatra/reloader'
3
3
 
4
4
  require File.expand_path '../boot', __FILE__
5
5
  require File.expand_path '../initializers', __FILE__
6
- require File.expand_path '../logger', __FILE__
6
+
7
7
 
8
8
  module Yodatra
9
9
  class Base < Sinatra::Base
10
10
  configure :development do
11
11
  register Sinatra::Reloader
12
12
  end
13
- register Boot
14
- register Initializers
15
- register Logger
13
+
14
+ register Yodatra::Boot
15
+ register Yodatra::Initializers
16
16
  end
17
17
  end
@@ -1,19 +1,20 @@
1
1
  module Yodatra
2
- module Logger
3
- def self.registered(app)
4
- filename = File.join(Dir.pwd, 'log', "#{app.environment}.log")
5
- app.configure do
6
- app.enable :logging
7
- file = File.new(filename, 'a+')
8
- file.sync = true
9
- app.use Rack::CommonLogger, file
10
- end
11
- require 'sinatra/logger'
12
- app.register Sinatra::Logger
13
- app.set :logger_level, :debug unless app.environment == 'production'
14
- # set the full path to the log file
15
- app.set :logger_log_file, lambda { filename }
2
+ class Logger < Sinatra::Base
3
+
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
10
+ 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 }
16
17
 
17
- end #/ self.registered
18
18
  end
19
+
19
20
  end
@@ -1,3 +1,3 @@
1
1
  module Yodatra
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
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.2
4
+ version: 0.1.3
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-01-26 00:00:00.000000000 Z
12
+ date: 2014-02-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack