bezel-app 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bezel-app.gemspec +1 -1
- data/lib/server_connection.rb +2 -2
- data/lib/static_assets.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dece49b290b2d5f1f2cae576fe707c3839ff560c
|
4
|
+
data.tar.gz: 07f4c25ed19fce225634011cdbcfbf679ed33828
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8b84fd44386b770c1afeefd8a497570d9263a2a146ce6e74d78a409eaba08d9dc05e6ca3dcd656ebf1b57b15e87e2c338442c274cf7f5dfa2e029c75af140d4
|
7
|
+
data.tar.gz: 29835cafccb7986e65def3d803a711340088cce1b90d49222cc7b467058d77169f5b730582747a3e52d204ad15bf8cfa1b3bdc859efbba86252ee10014251453
|
data/bezel-app.gemspec
CHANGED
data/lib/server_connection.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'rack'
|
2
|
-
require './config/routes'
|
2
|
+
# require './config/routes'
|
3
3
|
require_relative 'static_assets'
|
4
4
|
require_relative 'show_exceptions'
|
5
5
|
require_relative 'db_connection'
|
@@ -7,7 +7,7 @@ require_relative 'db_connection'
|
|
7
7
|
module Bezel
|
8
8
|
class ServerConnection
|
9
9
|
def self.start
|
10
|
-
DBConnection.open
|
10
|
+
# DBConnection.open
|
11
11
|
|
12
12
|
asset_app = Proc.new do |env|
|
13
13
|
req = Rack::Request.new(env)
|
data/lib/static_assets.rb
CHANGED
@@ -6,17 +6,17 @@ module Bezel
|
|
6
6
|
|
7
7
|
def call(env)
|
8
8
|
file_path = "." + env['PATH_INFO']
|
9
|
-
if file_path =~ (
|
9
|
+
if file_path =~ (/app\/assets/)
|
10
10
|
res = Rack::Response.new
|
11
|
-
extension =
|
11
|
+
extension = File.extname(file_path)
|
12
12
|
begin
|
13
|
-
|
13
|
+
extension = ".json" if extension == ".map"
|
14
|
+
res["Content-Type"] = Rack::Mime::MIME_TYPES[extension]
|
14
15
|
content = File.read(file_path)
|
15
16
|
res.write(content)
|
16
17
|
rescue
|
17
18
|
res.status = 404
|
18
19
|
end
|
19
|
-
|
20
20
|
res.finish
|
21
21
|
else
|
22
22
|
@app.call(env)
|