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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b84085bc71de2a6048ecdce56fc05deb45fec949
4
- data.tar.gz: d84ef8991f6d3129826658ecb64721f0036b1628
3
+ metadata.gz: b00ade57237e52fa9d1e5d825d26764fb2db8608
4
+ data.tar.gz: d1a88def8bf8b20ae2f3701daebf9337037b342d
5
5
  SHA512:
6
- metadata.gz: adbbf4b2865c718822c4d98e34333cf0dcae39f8392cbbe9bd9252cac40c00d7997c78202e9ae30798a693743cfc60e4c9bac18b3379c1785f7a46a3e71fa881
7
- data.tar.gz: ad2cfcd14d1364111790e33c17468f6b0558b2142b65a081d3c36e5323029e83a3b42f59f3ad011ffb2360a47fe276721eae28e349351cc1e49b9d6f1b4ed199
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 = $1
37
- ## TODO: Don't hardcode `assets`. Get it dynamically from the config.
38
- path = asset_url "assets/#{folder}"
39
- %Q[var f="#{path}"]
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 = sprockets.resolve(decoded_resource)
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.
@@ -1,3 +1,3 @@
1
1
  module HypeAssets
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
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.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-28 00:00:00.000000000 Z
11
+ date: 2016-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler