cyborg 0.5.16 → 0.5.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cyborg.rb +4 -0
- data/lib/cyborg/middleware.rb +2 -1
- data/lib/cyborg/plugin.rb +4 -2
- data/lib/cyborg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d776f9abceda0bd53460b5d13f99ce467a96d0a9
|
4
|
+
data.tar.gz: 9bdce401f1c32154bca9180ede6ff74942d7434f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb850b40be39bc1e9bfce8a0bcf17672b0706e73fec5c4303cb9f4fc0b0c08c3d8c18c1760995d960e5246fbe0f43fb4abe7d1a34c218e48ed2362677f4288f1
|
7
|
+
data.tar.gz: 209b0b53027061bb74ff37bcfe2f96e850fbb44582710d8ef8c6bd5f9a0a4cb1bcadc044ed6e8050761c751081276f610e8d5eb510f59a287a14ea069c5a8082
|
data/lib/cyborg.rb
CHANGED
data/lib/cyborg/middleware.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'rack/cors'
|
2
|
+
require 'action_dispatch/middleware/static'
|
2
3
|
|
3
4
|
module Cyborg
|
4
5
|
class Application < Rails::Application
|
@@ -19,7 +20,7 @@ module Cyborg
|
|
19
20
|
class StaticAssets
|
20
21
|
|
21
22
|
# Rails 5 middleware patch
|
22
|
-
if
|
23
|
+
if Cyborg.rails5?
|
23
24
|
|
24
25
|
def initialize(app, path, index: 'index', headers: {}, engine_name: nil)
|
25
26
|
@app = app
|
data/lib/cyborg/plugin.rb
CHANGED
@@ -37,8 +37,10 @@ module Cyborg
|
|
37
37
|
require 'cyborg/middleware'
|
38
38
|
|
39
39
|
initializer "#{name}.static_assets" do |app|
|
40
|
-
|
41
|
-
|
40
|
+
if !Cyborg.rails5? || app.config.public_file_server.enabled
|
41
|
+
app.middleware.insert_after ::ActionDispatch::Static, Cyborg::StaticAssets, "#{root}/public", engine_name: Cyborg.plugin.name
|
42
|
+
app.middleware.insert_before ::ActionDispatch::Static, Rack::Deflater
|
43
|
+
end
|
42
44
|
end
|
43
45
|
end)
|
44
46
|
end
|
data/lib/cyborg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyborg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|