yodatra 0.1.2 → 0.1.3
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/lib/yodatra/base.rb +4 -4
- data/lib/yodatra/logger.rb +16 -15
- data/lib/yodatra/version.rb +1 -1
- metadata +2 -2
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
|
-
|
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
|
-
|
14
|
-
register
|
15
|
-
register
|
13
|
+
|
14
|
+
register Yodatra::Boot
|
15
|
+
register Yodatra::Initializers
|
16
16
|
end
|
17
17
|
end
|
data/lib/yodatra/logger.rb
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
module Yodatra
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
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.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-
|
12
|
+
date: 2014-02-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|