webpack-assets 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/webpack/assets/version.rb +1 -1
- data/lib/webpack/configuration.rb +3 -0
- data/lib/webpack/view_helpers.rb +10 -5
- 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: 9ede827fa5e12eaa04d9d43d362074d81ef5bca2
|
4
|
+
data.tar.gz: 7d510b3fc8d947b92981c1e1070ee3a8f7e31634
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 155c5f5063ae98dd66ee6b3468eb6aed9a8336c721a23dd095d45c75f431946d3b29591d090aeb7a157cd3977ec8ade09e91635e3ae01ddbc61627e508e7841a
|
7
|
+
data.tar.gz: 032fe6bfa3a2f3adfbb7297fe6938a091fbb377c2fd8b7b085aa393d6eea349e89397837fe44fb48244c3703345fdd6f9bc49e0680ae30d79c399b70e59d60c3
|
data/lib/webpack/view_helpers.rb
CHANGED
@@ -57,16 +57,21 @@ module Webpack
|
|
57
57
|
|
58
58
|
private
|
59
59
|
|
60
|
-
def protocol
|
61
|
-
@view_context.request.protocol.presence || '//'
|
62
|
-
end
|
63
|
-
|
64
60
|
def server_url(path)
|
65
61
|
"#{protocol}#{server_host}#{Webpack.config.public_path}/#{path}"
|
66
62
|
end
|
67
63
|
|
64
|
+
def protocol
|
65
|
+
return "#{Webpack.config.protocol}://" if Webpack.config.protocol
|
66
|
+
view_context.try(:request).try(:protocol) || '//'
|
67
|
+
end
|
68
|
+
|
68
69
|
def server_host
|
69
|
-
Webpack.config.host
|
70
|
+
return Webpack.config.host if Webpack.config.host
|
71
|
+
|
72
|
+
host = view_context.try(:request).try(:host) || 'localhost'
|
73
|
+
|
74
|
+
"#{host}:#{Webpack.config.port}"
|
70
75
|
end
|
71
76
|
end
|
72
77
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpack-assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Nartimov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|