amp-html 1.0.0 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3d04137dc58a45e0d839c7c8ebda233933742d811eb24f77d28b55540d0ceeb
4
- data.tar.gz: b6af3f3e9eb81ad71bdfda150c3192221af46a8fd63b7f74f94926a35341e959
3
+ metadata.gz: d3fe2287cdfe4c4e9affc65691e2cd219a08680b27e8aa437119ec78b011a44e
4
+ data.tar.gz: d3953a2516a7a75a89045629535644e35e150913d3344bae5dde63168b8556fb
5
5
  SHA512:
6
- metadata.gz: f0e7527572c0322273f426a213f50d3bf7a1fbea30a409645dffc39fd5c680439457427e8a4a6706a24a5a48cd673c52931b88a62c5cde59c3d8abf7774de5e9
7
- data.tar.gz: 9746b409662ecdef3b4c291d2b335164ce63ddc3da609cb09d79884b2c9c8a67181431f25ab4e2b8bb4be4a9f5a56188af2b6706edea99e5650eebfa5139f638
6
+ metadata.gz: 5036faefbf235d67e07aa407f6a0f27d38c7e5b86a9afe0cb5426ce3ccedc42c3bbe985ef88988d3572ef098107870f659c7dbd70679d7ba30d3087a309020d7
7
+ data.tar.gz: 62d92bf61441f2ebb85f3bc7428b4c4a55dbc91f6c90878b884531d6388702066b9961a5e4da0857c3d998c1fffa80fcd9b9fd59242ec2c449e3603711c51528
@@ -4,6 +4,13 @@
4
4
 
5
5
  * nothing yet
6
6
 
7
+ ### 1.0.1 - 2018/01/14
8
+
9
+ * enhancements
10
+ * updated dependencies
11
+ * bugfixes
12
+ * fixed assets reference in production environment
13
+
7
14
  ### 1.0.0 - 2018/01/14
8
15
 
9
16
  * features
@@ -10,5 +10,16 @@ module AmpHtml
10
10
  end
11
11
  end
12
12
 
13
+ # Fix for accessing AMP assets in different environments
14
+ def get_asset name
15
+ if Rails.application.assets
16
+ asset = Rails.application.assets[name]
17
+ return asset.to_s if asset
18
+ end
19
+ asset = Rails.application.assets_manifest.assets[name]
20
+ return nil unless asset
21
+ return File.binread(File.join(Rails.application.assets_manifest.dir, asset))
22
+ end
23
+
13
24
  end
14
25
  end
@@ -7,7 +7,7 @@
7
7
 
8
8
  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
9
9
  <style amp-custom>
10
- <%= Rails.application.assets['application.css'] if AmpHtml.configuration.inherit_stylesheets %>
11
- <%= Rails.application.assets['amp/application.css'] %>
10
+ <%= get_asset 'application.css' if AmpHtml.configuration.inherit_stylesheets %>
11
+ <%= get_asset 'amp/application.css' %>
12
12
  <%= area :css %>
13
13
  </style>
@@ -1,5 +1,5 @@
1
1
  module AmpHtml
2
2
 
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amp-html
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter
@@ -11,7 +11,7 @@ cert_chain: []
11
11
  date: 2018-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -24,6 +24,34 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '5.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: actionpack
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: sprockets-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.2'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.2'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: mozaic
29
57
  requirement: !ruby/object:Gem::Requirement