front_end_builds 0.0.24 → 0.0.25
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2789045f4bc8f29052d63f84186504fc7800dc8c
|
4
|
+
data.tar.gz: 8ae5cfc6bac178ec2742dca76b8cbf36e6562143
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc63cf0fd1dbeb4824defe85ce1e202341bdb11ceada8f5b6a9bedad420c63ed1bc1eab4ba90209c3d45f5f71ac5c57945ee36509249fccbfaed26aef8185b0b
|
7
|
+
data.tar.gz: 6eec4e3ece21c3db125432d8c1f0c533e45d5966783afd5678a57a54bb25a7ad922c488fd4c01d1c0e5cc367b6999cd0faccdaca9ef67e28cbf118d303d36a66
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'front_end_builds/middleware/admin_assets'
|
2
|
+
|
1
3
|
module FrontEndBuilds
|
2
4
|
class Engine < ::Rails::Engine
|
3
5
|
isolate_namespace FrontEndBuilds
|
@@ -10,7 +12,7 @@ module FrontEndBuilds
|
|
10
12
|
end
|
11
13
|
|
12
14
|
initializer "static assets" do |app|
|
13
|
-
app.middleware.
|
15
|
+
app.middleware.use(FrontEndBuilds::Middleware::AdminAssets, "#{root}/public")
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'rack/utils'
|
2
|
+
require 'active_support/core_ext/uri'
|
3
|
+
require 'action_dispatch/middleware/static'
|
4
|
+
|
5
|
+
module FrontEndBuilds
|
6
|
+
module Middleware
|
7
|
+
|
8
|
+
class AdminAssets < ::ActionDispatch::Static
|
9
|
+
def front_end_build_asset_regex
|
10
|
+
@_regex ||= /^\/front_end_builds\/assets\//
|
11
|
+
end
|
12
|
+
|
13
|
+
def requesting_feb_assets?(path)
|
14
|
+
path.match(front_end_build_asset_regex)
|
15
|
+
end
|
16
|
+
|
17
|
+
def call(env)
|
18
|
+
path = env['PATH_INFO']
|
19
|
+
|
20
|
+
# Only call Static middleware if we know this is a request for
|
21
|
+
# a front end build asset.
|
22
|
+
if requesting_feb_assets?(path)
|
23
|
+
super
|
24
|
+
else
|
25
|
+
@app.call(env)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: front_end_builds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Toronto
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-01
|
12
|
+
date: 2015-02-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sqlite3
|
@@ -138,6 +138,7 @@ files:
|
|
138
138
|
- lib/front_end_builds.rb
|
139
139
|
- lib/front_end_builds/engine.rb
|
140
140
|
- lib/front_end_builds/ext/routes.rb
|
141
|
+
- lib/front_end_builds/middleware/admin_assets.rb
|
141
142
|
- lib/front_end_builds/routing_constraints/html_routing_constraint.rb
|
142
143
|
- lib/front_end_builds/version.rb
|
143
144
|
- lib/tasks/front_end_builds_tasks.rake
|