assets_pipeline 0.0.1 → 0.0.2
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 +4 -4
- data/.bundle/config +2 -0
- data/assets_pipeline.gemspec +1 -1
- data/lib/assets_pipeline.rb +2 -1
- data/lib/assets_pipeline/asset_url_helper.rb +11 -15
- metadata +3 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ba90af10456b7b5226abd4ab9485bc6dadccb6f
|
4
|
+
data.tar.gz: 179b627b67f30b66de27053a1c4caa91cad2a02d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c0c9f0c3ab557ed2d662e9993525cb7a5bc79534233eca1928f70b47694f8193b44264ac84598c5e4f29b3a2fe63b3a26d560a510cda0a19e7f4787b5f2f4be
|
7
|
+
data.tar.gz: 1321f70c1ad85a814578c93e9b08eb372adf947070ecd54c37ebcc87cb0aa53420cf5fb7579a4e843b919c9c058f64d7bac0d10858bc389b23ab3a41a46c4777
|
data/.bundle/config
ADDED
data/assets_pipeline.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'assets_pipeline'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.2'
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.authors = ['Aleksandr Fomin', 'Marat Abdullin', 'Nikolay Sverchkov']
|
6
6
|
s.email = ['ll.wg.bin@gmail.com', 'esend.work@gmail.com', 'ssnikolay@gmail.com']
|
data/lib/assets_pipeline.rb
CHANGED
@@ -21,7 +21,8 @@ module AssetsPipeline
|
|
21
21
|
initializer 'load assets_pipeline integration' do
|
22
22
|
ActiveSupport.on_load :action_view do
|
23
23
|
require 'assets_pipeline/asset_url_helper'
|
24
|
-
|
24
|
+
::ActionView::Helpers::AssetUrlHelper.prepend ::AssetsPipeline::AssetUrlHelper
|
25
|
+
include ::AssetsPipeline::AssetUrlHelper
|
25
26
|
end
|
26
27
|
end
|
27
28
|
end
|
@@ -1,24 +1,20 @@
|
|
1
1
|
module AssetsPipeline
|
2
2
|
module AssetUrlHelper
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
def compute_asset_path(path, options = {})
|
7
|
-
asset_path_from_manifest(clean_path(super))
|
8
|
-
end
|
3
|
+
def compute_asset_path(path, options = {})
|
4
|
+
asset_path_from_manifest(clean_path(super))
|
5
|
+
end
|
9
6
|
|
10
|
-
|
7
|
+
private
|
11
8
|
|
12
|
-
|
13
|
-
|
9
|
+
def asset_path_from_manifest(asset_path)
|
10
|
+
config = Rails.application.config
|
14
11
|
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
rev_path = config.assets_pipeline.manifest[asset_path] || asset_path
|
13
|
+
[config.assets_pipeline.prefix, rev_path].join('/')
|
14
|
+
end
|
18
15
|
|
19
|
-
|
20
|
-
|
21
|
-
end
|
16
|
+
def clean_path(path)
|
17
|
+
path.split('/').select(&:present?).join('/')
|
22
18
|
end
|
23
19
|
end
|
24
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assets_pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksandr Fomin
|
@@ -63,6 +63,7 @@ executables: []
|
|
63
63
|
extensions: []
|
64
64
|
extra_rdoc_files: []
|
65
65
|
files:
|
66
|
+
- ".bundle/config"
|
66
67
|
- ".gitignore"
|
67
68
|
- ".rspec"
|
68
69
|
- ".travis.yml"
|
@@ -99,7 +100,4 @@ rubygems_version: 2.5.1
|
|
99
100
|
signing_key:
|
100
101
|
specification_version: 4
|
101
102
|
summary: Asset Pipeline for Rails with your favourite js bundler
|
102
|
-
test_files:
|
103
|
-
- spec/asset_url_helper_spec.rb
|
104
|
-
- spec/fixtures/manifest.json
|
105
|
-
- spec/spec_helper.rb
|
103
|
+
test_files: []
|