webpack-assets 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 776500726eea9f7d954821d7f7bc7b529248439e
4
- data.tar.gz: 53f808bcd6995303e127b3318201f58dc7b37788
3
+ metadata.gz: 0ab2fc0d5850ec8336921ef93ed7bc141b334096
4
+ data.tar.gz: 2bfc978c7ecb48c8d2b02d1c749821cc1c797acc
5
5
  SHA512:
6
- metadata.gz: 4db9dc4eb34bebc0d3bee32a0decbb3607d6c08088b51105685fa025750f4f424f70bd8c89fb0d229625abc03f16c704068761df0e7567c12a825e92295b8c0b
7
- data.tar.gz: 574b67198a1678a067b477940437a96da798deffef7b99fbbc72fbeedd52018c9083bf0a290694c558a9d21dc953a2c13cd40f885de1a93105bf6a1ce1b41b31
6
+ metadata.gz: 682f2ce352c5b1b67222779ad8e97dd3302cbc8fd13f2fa3b74bae5c7e61d78118630a64d0d6bcd99255f0a2802895cd96d88d19c71323950df6930013a99e31
7
+ data.tar.gz: 92cb7a1e2a3974fb38b71cfe9b6cf57833ce6c3f333766e7148d3ddae4ad2c5118f160a678d1d510afd1307d6ec44a6d6968015bfeff3ab1e86529d70169b297
@@ -1,5 +1,5 @@
1
1
  module Webpack
2
2
  module Assets
3
- VERSION = '0.2.1'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
@@ -48,7 +48,7 @@ module Webpack
48
48
  else
49
49
  static_file = Webpack.fetch_static_file("#{Webpack.config.static_path}/#{path}")
50
50
  if Webpack.config.cdn_host.present?
51
- "//#{Webpack.config.cdn_host}#{static_file}"
51
+ "#{protocol}#{Webpack.config.cdn_host}#{static_file}"
52
52
  else
53
53
  static_file
54
54
  end
@@ -57,8 +57,12 @@ module Webpack
57
57
 
58
58
  private
59
59
 
60
+ def protocol
61
+ @view_context.request.protocol.presence || '//'
62
+ end
63
+
60
64
  def server_url(path)
61
- "//#{server_host}#{Webpack.config.public_path}/#{path}"
65
+ "#{protocol}#{server_host}#{Webpack.config.public_path}/#{path}"
62
66
  end
63
67
 
64
68
  def server_host
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.2.1
4
+ version: 0.3.0
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-04-29 00:00:00.000000000 Z
11
+ date: 2016-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  requirements: []
126
126
  rubyforge_project:
127
- rubygems_version: 2.4.8
127
+ rubygems_version: 2.4.5
128
128
  signing_key:
129
129
  specification_version: 4
130
130
  summary: Webpack Assets for Rails.