js-asset_paths 0.1.0 → 0.1.1
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/.ruby-version +1 -1
- data/lib/js_asset_paths/generator.rb +16 -4
- data/lib/js_asset_paths/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e71a626267813a44330759040855bb79398c4514
|
4
|
+
data.tar.gz: 7f5eb2009ca8e56139a9a6773adbbbcf3bf46760
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbdffe97506147d167c8bc663bb02f89125489aabc834891d4848828acc26619a58cdb3df9c1cd88e1e5d77aa65769edadf16a7243385ce08fcbfaee86a664a9
|
7
|
+
data.tar.gz: cf25c74fff2c6e119903c3cae150bfedc46aea4b5282911fc19d0184a2a0fdf338e75dd8931d8a6e63cbc3b6a02c3e98677dab1ec1c83d6e634e9468e3d9081a
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.0-
|
1
|
+
2.0.0-p353
|
@@ -9,13 +9,25 @@ module JsAssetPaths
|
|
9
9
|
private
|
10
10
|
|
11
11
|
def self.asset_hash
|
12
|
-
|
13
|
-
memo.
|
12
|
+
assets.each_file.each_with_object({}) do |filepath, memo|
|
13
|
+
memo[filepath.relative_path_from(base_asset_path)] = output_path(filepath)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
def self.
|
18
|
-
|
17
|
+
def self.base_asset_path
|
18
|
+
Rails.root.join('app', 'assets')
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.output_path(filepath)
|
22
|
+
if context.digest_assets?
|
23
|
+
"#{filepath.basename(filepath.extname)}-#{assets.file_digest(filepath)}#{filepath.extname}"
|
24
|
+
else
|
25
|
+
filepath.basename.to_s
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.assets
|
30
|
+
environment.assets
|
19
31
|
end
|
20
32
|
end
|
21
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: js-asset_paths
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sonnym
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.0.
|
111
|
+
rubygems_version: 2.0.14
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Access paths to compiled assets from in javascript.
|