hype_assets 0.1.1 → 0.1.3
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/CHANGELOG.md +11 -0
- data/lib/hype_assets/hype_template.rb +7 -5
- data/lib/hype_assets/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: b00ade57237e52fa9d1e5d825d26764fb2db8608
|
4
|
+
data.tar.gz: d1a88def8bf8b20ae2f3701daebf9337037b342d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f44868b120e819bf472f0eec3c08c47511b68fc55c0beffbaa5c011ff6c84c49874543300b17b2eb040c9453177574dc5a9a5963b75f8b06617f114e1d4dc502
|
7
|
+
data.tar.gz: b3cf8254661f932d77f0d4abe4b645159627463f2595202a0f53079c27568966d215492d253729ebd759abd66a53be9cbeb776243b7248a17e60dad7f8326e7e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 0.1.3 2016-03-28
|
4
|
+
* Issue #4: Don't hardcode `assets`. Get it dynamically from the config.
|
5
|
+
OK, we're using Sprockets directly now (not Rails). The docs
|
6
|
+
flag the method we are using (`.context_class`) as deprecated, however
|
7
|
+
they don't indicate what should be used instead.
|
8
|
+
|
9
|
+
|
10
|
+
## 0.1.2 2016-03-28
|
11
|
+
* Issue #4: Don't hardcode `assets`. Get it dynamically from the config.
|
12
|
+
Half-baked solution: We are using Rails rather than Sprockets directly.
|
13
|
+
|
3
14
|
|
4
15
|
## 0.1.1 2016-03-28
|
5
16
|
* Issue #5: Force a recompile of the `*.hype` file whenever a dependency changes,
|
@@ -33,10 +33,12 @@ class HypeAssets::HypeTemplate
|
|
33
33
|
## Replace: var f="animation_name.hyperesources"
|
34
34
|
## With: var f="https://my.cdn.com/assets/animation_name.hyperesources"
|
35
35
|
hype_script.sub!(/var f="([^"]+)"/) {
|
36
|
-
folder
|
37
|
-
|
38
|
-
|
39
|
-
|
36
|
+
folder = $1
|
37
|
+
asset_host = sprockets.context_class.config.asset_host # shouldn't end in /
|
38
|
+
prefix = sprockets.context_class.assets_prefix # begins with /
|
39
|
+
|
40
|
+
url = "#{asset_host}#{prefix}/#{folder}"
|
41
|
+
%Q[var f="#{url}"]
|
40
42
|
}
|
41
43
|
|
42
44
|
|
@@ -102,7 +104,7 @@ class HypeAssets::HypeTemplate
|
|
102
104
|
## "foo.hyperesources/file"
|
103
105
|
## "file-digest:///foo.hyperesources/file"
|
104
106
|
## "/absolute/path/to/foo.hyperesources/file"
|
105
|
-
absolute_path
|
107
|
+
absolute_path = sprockets.resolve(decoded_resource)
|
106
108
|
file_digest_uri = sprockets.build_file_digest_uri(absolute_path)
|
107
109
|
## NOTE: build_file_digest_uri just tacks on a file-digest:// prefix.
|
108
110
|
## It does //not// generate a digest hashcode.
|
data/lib/hype_assets/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hype_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noach Magedman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|