amp-html 0.7.7 → 0.7.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +3 -3
- data/INSTALL.md +1 -0
- data/README.md +3 -3
- data/amp-html.gemspec +7 -6
- data/lib/{amp_html.rb → amp-html.rb} +0 -0
- data/lib/amp_html/configuration.rb +13 -13
- data/lib/amp_html/test.rb +6 -6
- data/lib/amp_html/version.rb +1 -1
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1c4ca5e0f89a675e04bac0ad8fcf848a0d18ec5
|
4
|
+
data.tar.gz: 6ee07bdae90cb016dfa40bbec68d18b145da7b92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5585ad3f49451ef6618f3f6310048ec23720e55caafbe7f51e219c64029d2fa5c0c95bacc628bbd5814ab3f96a8b3401cc6b4090f02cb1a55b1b81d2bfc6f0c
|
7
|
+
data.tar.gz: 4a0d2ef31353e95945e03f9f98874d31a9d4d591ee2d80f40ed74114b53dbd57afa62cec517fa6e3d2d3c155621ff693ff5b2cff09088031f85e71a1fdae2a8d
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
|
6
6
|
# Travis CI
|
7
|
-
gem 'rspec-rails', '~> 3.
|
7
|
+
gem 'rspec-rails', '~> 3.6'
|
8
8
|
|
9
9
|
# Development
|
10
10
|
group :development do
|
11
|
-
gem 'rubocop', '~> 0.
|
11
|
+
gem 'rubocop', '~> 0.49', require: false
|
12
12
|
end
|
data/INSTALL.md
CHANGED
data/README.md
CHANGED
@@ -37,7 +37,7 @@ Use the powerful features of AMP to make your Rails app consistently fast, beaut
|
|
37
37
|
|
38
38
|
### Quick info
|
39
39
|
|
40
|
-
#### Latest release: 0.7.
|
40
|
+
#### Latest release: 0.7.8 (Pre-release)
|
41
41
|
|
42
42
|
[**Changelog**](https://github.com/slooob/amp-html/blob/master/CHANGELOG.md), [Grab it from Rubygems](https://rubygems.org/gems/amp-html)
|
43
43
|
|
@@ -46,7 +46,7 @@ Use the powerful features of AMP to make your Rails app consistently fast, beaut
|
|
46
46
|
Rails >= 4.0.0
|
47
47
|
Ruby >= 2.0
|
48
48
|
|
49
|
-
### The AMP-HTML wiki
|
49
|
+
### The AMP-HTML wiki & documentation
|
50
50
|
|
51
51
|
The AMP-HTML Wiki has lots of additional information about AMP-HTML including many "how-to" articles and answers to the most frequently asked questions. Please browse the Wiki after finishing this README:
|
52
52
|
|
@@ -58,7 +58,7 @@ If you discover a problem with AMP-HTML, we would like to know about it. However
|
|
58
58
|
|
59
59
|
[https://github.com/slooob/amp-html/wiki/Bug-reports](https://github.com/slooob/amp-html/wiki/Bug-reports)
|
60
60
|
|
61
|
-
If you have discovered a security related bug, please do *NOT* use the GitHub issue tracker. Send an email to [
|
61
|
+
If you have discovered a security related bug, please do *NOT* use the GitHub issue tracker. Send an email to [developer@slooob.com](mailto:developer@slooob.com).
|
62
62
|
|
63
63
|
### Example applications
|
64
64
|
|
data/amp-html.gemspec
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
require File.expand_path
|
2
|
+
require File.expand_path File.join('..', 'lib', 'amp_html', 'version'), __FILE__
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.name = 'amp-html'
|
6
6
|
gem.version = AmpHtml::VERSION
|
7
7
|
gem.platform = Gem::Platform::RUBY
|
8
|
-
gem.summary = 'Reliable and high-performant apps with AMP & Rails.'
|
9
|
-
gem.description = "[BETA] AmpHtml is a universal solution to integrate the AMP Project (Accelerated Mobile Pages Project) into your Rails app with ease. It enables you to quickly spin-up, build and test your app with AMP, while fulfilling the app's unique requirements. It comes with a bunch of superpowers like user authentication, notifications, blogs, animations and support for assets in AMP. Make your app consistently fast, beautiful and high-performing across devices and distribution platforms."
|
8
|
+
gem.summary = 'Reliable and high-performant apps with AMP & Rails. Formerly `amphtml`.'
|
9
|
+
gem.description = "[BETA, Formerly `amphtml`] AmpHtml is a universal solution to integrate the AMP Project (Accelerated Mobile Pages Project) into your Rails app with ease. It enables you to quickly spin-up, build and test your app with AMP, while fulfilling the app's unique requirements. It comes with a bunch of superpowers like user authentication, notifications, blogs, animations and support for assets in AMP. Make your app consistently fast, beautiful and high-performing across devices and distribution platforms."
|
10
10
|
gem.authors = ['Jonas Hübotter']
|
11
11
|
gem.email = 'developer@slooob.com'
|
12
12
|
gem.homepage = 'https://github.com/slooob/amp-html' # https://railsamp.com
|
@@ -17,13 +17,14 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.bindir = 'bin'
|
18
18
|
gem.executables = ['amp-html']
|
19
19
|
|
20
|
-
gem.post_install_message = IO.read
|
20
|
+
gem.post_install_message = IO.read 'INSTALL.md'
|
21
21
|
|
22
22
|
gem.required_ruby_version = '>= 2.0'
|
23
23
|
|
24
|
-
|
25
24
|
gem.add_dependency 'rails', '>= 4.0.0'
|
26
|
-
|
25
|
+
|
26
|
+
# Development
|
27
|
+
gem.add_dependency 'thor', '~> 0.20'
|
27
28
|
gem.add_dependency 'launchy', '~> 2.4'
|
28
29
|
gem.add_dependency 'highline', '~> 1.7'
|
29
30
|
end
|
File without changes
|
@@ -41,7 +41,7 @@ module AmpHtml
|
|
41
41
|
|
42
42
|
def self.assets_only_amp
|
43
43
|
config = get_config
|
44
|
-
if config.key(:assets) && config[:assets].key
|
44
|
+
if config.key(:assets) && config[:assets].key(:only_amp)
|
45
45
|
config[:assets][:only_amp]
|
46
46
|
else
|
47
47
|
if AmpHtml.split_view
|
@@ -55,7 +55,7 @@ module AmpHtml
|
|
55
55
|
|
56
56
|
def self.application_name
|
57
57
|
config = get_config
|
58
|
-
if config.key(:application) && config[:application].key
|
58
|
+
if config.key(:application) && config[:application].key(:name)
|
59
59
|
config[:application][:name]
|
60
60
|
else
|
61
61
|
Rails.application.class.parent
|
@@ -63,7 +63,7 @@ module AmpHtml
|
|
63
63
|
end
|
64
64
|
def self.application_type
|
65
65
|
config = get_config
|
66
|
-
if config.key(:application) && config[:application].key
|
66
|
+
if config.key(:application) && config[:application].key(:type)
|
67
67
|
config[:application][:type]
|
68
68
|
else
|
69
69
|
nil
|
@@ -71,7 +71,7 @@ module AmpHtml
|
|
71
71
|
end
|
72
72
|
def self.application_date_published
|
73
73
|
config = get_config
|
74
|
-
if config.key(:application) && config[:application].key
|
74
|
+
if config.key(:application) && config[:application].key(:date_published)
|
75
75
|
config[:application][:date_published]
|
76
76
|
else
|
77
77
|
DateTime.now
|
@@ -79,7 +79,7 @@ module AmpHtml
|
|
79
79
|
end
|
80
80
|
def self.application_image
|
81
81
|
config = get_config
|
82
|
-
if config.key(:application) && config[:application].key
|
82
|
+
if config.key(:application) && config[:application].key(:image)
|
83
83
|
config[:application][:image]
|
84
84
|
else
|
85
85
|
nil
|
@@ -89,7 +89,7 @@ module AmpHtml
|
|
89
89
|
|
90
90
|
def self.forms_selector
|
91
91
|
config = get_config
|
92
|
-
if config.key(:forms) && config[:forms].key
|
92
|
+
if config.key(:forms) && config[:forms].key(:amp_selector)
|
93
93
|
config[:forms][:amp_selector]
|
94
94
|
else
|
95
95
|
false
|
@@ -99,7 +99,7 @@ module AmpHtml
|
|
99
99
|
|
100
100
|
def self.analytics_default_vendor
|
101
101
|
config = get_config
|
102
|
-
if config.key(:analytics) && config[:analytics].key
|
102
|
+
if config.key(:analytics) && config[:analytics].key(:default_vendor)
|
103
103
|
config[:analytics][:default_vendor]
|
104
104
|
else
|
105
105
|
nil
|
@@ -108,7 +108,7 @@ module AmpHtml
|
|
108
108
|
|
109
109
|
def self.google_analytics_account
|
110
110
|
config = get_config
|
111
|
-
if config.key(:analytics) && config[:analytics].key(:google_analytics) && config[:analytics][:google_analytics].key
|
111
|
+
if config.key(:analytics) && config[:analytics].key(:google_analytics) && config[:analytics][:google_analytics].key(:account)
|
112
112
|
config[:analytics][:google_analytics][:account]
|
113
113
|
else
|
114
114
|
nil
|
@@ -118,7 +118,7 @@ module AmpHtml
|
|
118
118
|
|
119
119
|
def self.ad_default_network
|
120
120
|
config = get_config
|
121
|
-
if config.key(:ad) && config[:ad].key
|
121
|
+
if config.key(:ad) && config[:ad].key(:default_network)
|
122
122
|
config[:ad][:default_network]
|
123
123
|
else
|
124
124
|
nil
|
@@ -127,7 +127,7 @@ module AmpHtml
|
|
127
127
|
|
128
128
|
def self.auto_ads_default_network
|
129
129
|
config = get_config
|
130
|
-
if config.key(:ad) && config[:ad].key(:auto_ads) && config[:ad][:auto_ads].key
|
130
|
+
if config.key(:ad) && config[:ad].key(:auto_ads) && config[:ad][:auto_ads].key(:default_network)
|
131
131
|
config[:ad][:auto_ads][:default_network]
|
132
132
|
else
|
133
133
|
nil
|
@@ -137,7 +137,7 @@ module AmpHtml
|
|
137
137
|
|
138
138
|
def self.social_share_default_provider
|
139
139
|
config = get_config
|
140
|
-
if config.key(:social) && config[:social].key(:share) && config[:social][:share].key
|
140
|
+
if config.key(:social) && config[:social].key(:share) && config[:social][:share].key(:default_provider)
|
141
141
|
config[:social][:share][:default_provider]
|
142
142
|
else
|
143
143
|
nil
|
@@ -145,7 +145,7 @@ module AmpHtml
|
|
145
145
|
end
|
146
146
|
def self.social_share_default_data_share_endpoint
|
147
147
|
config = get_config
|
148
|
-
if config.key(:social) && config[:social].key(:share) && config[:social][:share].key
|
148
|
+
if config.key(:social) && config[:social].key(:share) && config[:social][:share].key(:default_data_share_endpoint)
|
149
149
|
config[:social][:share][:default_data_share_endpoint]
|
150
150
|
else
|
151
151
|
nil
|
@@ -160,7 +160,7 @@ module AmpHtml
|
|
160
160
|
require 'yaml'
|
161
161
|
|
162
162
|
begin
|
163
|
-
YAML.load_file
|
163
|
+
YAML.load_file 'config/amp-html.yml'
|
164
164
|
rescue Exception
|
165
165
|
warn 'WARNING (AMP): You need to run `rails g amp-html:bundle` first.'
|
166
166
|
exit
|
data/lib/amp_html/test.rb
CHANGED
@@ -105,11 +105,11 @@ module AmpHtml
|
|
105
105
|
|
106
106
|
def self.markup_test results
|
107
107
|
if results.present?
|
108
|
-
puts check1 = IO.read(File.join AmpHtml.root, 'amp_html', 'test', 'templates', 'markup', 'meta_viewport.md') unless results.has_value?
|
109
|
-
puts check2 = IO.read(File.join AmpHtml.root, 'amp_html', 'test', 'templates', 'markup', 'head_body.md') unless results.has_value?('<head') || results.has_value?
|
110
|
-
puts check3 = IO.read(File.join AmpHtml.root, 'amp_html', 'test', 'templates', 'markup', 'amp_html_doctype.md') unless results.has_value?
|
111
|
-
puts check4 = IO.read(File.join AmpHtml.root, 'amp_html', 'test', 'templates', 'markup', 'canonical_document_link.md') unless results.has_value?
|
112
|
-
puts check5 = IO.read(File.join AmpHtml.root, 'amp_html', 'test', 'templates', 'markup', 'amp_head.md') unless results.has_value?
|
108
|
+
puts check1 = IO.read(File.join AmpHtml.root, 'amp_html', 'test', 'templates', 'markup', 'meta_viewport.md') unless results.has_value?('<meta name="viewport" content="width=device-width,minimum-scale=1')
|
109
|
+
puts check2 = IO.read(File.join AmpHtml.root, 'amp_html', 'test', 'templates', 'markup', 'head_body.md') unless results.has_value?('<head') || results.has_value?('<body')
|
110
|
+
puts check3 = IO.read(File.join AmpHtml.root, 'amp_html', 'test', 'templates', 'markup', 'amp_html_doctype.md') unless results.has_value?('amp_html_doctype')
|
111
|
+
puts check4 = IO.read(File.join AmpHtml.root, 'amp_html', 'test', 'templates', 'markup', 'canonical_document_link.md') unless results.has_value?('canonical_document_link')
|
112
|
+
puts check5 = IO.read(File.join AmpHtml.root, 'amp_html', 'test', 'templates', 'markup', 'amp_head.md') unless results.has_value?('amp_head')
|
113
113
|
puts check6 = IO.read(File.join AmpHtml.root, 'amp_html', 'test', 'templates', 'markup', 'canonical_document_link.md') if AmpHtml.split_view && results.has_value?('amp_document_link') == false
|
114
114
|
end
|
115
115
|
unless check1 && check2 && check3 && check4 && check5 && check6
|
@@ -157,7 +157,7 @@ module AmpHtml
|
|
157
157
|
puts source
|
158
158
|
end
|
159
159
|
end
|
160
|
-
return true if results.keys.size == 1 && results[results.keys.first] == '-amp-' && results.keys.first.include?
|
160
|
+
return true if results.keys.size == 1 && results[results.keys.first] == '-amp-' && results.keys.first.include?('application/amp/_resources.html')
|
161
161
|
else
|
162
162
|
return true
|
163
163
|
end
|
data/lib/amp_html/version.rb
CHANGED
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: 0.7.
|
4
|
+
version: 0.7.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Hübotter
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: '0.20'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: '0.20'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: launchy
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.7'
|
69
|
-
description: "[BETA] AmpHtml is a universal solution to integrate
|
70
|
-
(Accelerated Mobile Pages Project) into your Rails app with ease.
|
71
|
-
to quickly spin-up, build and test your app with AMP, while fulfilling
|
72
|
-
unique requirements. It comes with a bunch of superpowers like user authentication,
|
69
|
+
description: "[BETA, Formerly `amphtml`] AmpHtml is a universal solution to integrate
|
70
|
+
the AMP Project (Accelerated Mobile Pages Project) into your Rails app with ease.
|
71
|
+
It enables you to quickly spin-up, build and test your app with AMP, while fulfilling
|
72
|
+
the app's unique requirements. It comes with a bunch of superpowers like user authentication,
|
73
73
|
notifications, blogs, animations and support for assets in AMP. Make your app consistently
|
74
74
|
fast, beautiful and high-performing across devices and distribution platforms."
|
75
75
|
email: developer@slooob.com
|
@@ -94,7 +94,7 @@ files:
|
|
94
94
|
- Rakefile
|
95
95
|
- amp-html.gemspec
|
96
96
|
- bin/amp-html
|
97
|
-
- lib/
|
97
|
+
- lib/amp-html.rb
|
98
98
|
- lib/amp_html/cli.rb
|
99
99
|
- lib/amp_html/components/docs/README.md
|
100
100
|
- lib/amp_html/components/docs/ad.md
|
@@ -271,7 +271,9 @@ homepage: https://github.com/slooob/amp-html
|
|
271
271
|
licenses:
|
272
272
|
- MIT
|
273
273
|
metadata: {}
|
274
|
-
post_install_message:
|
274
|
+
post_install_message: |
|
275
|
+
**Thank you for installing amp-html!**
|
276
|
+
Learn more about how to get started here: https://github.com/slooob/amp-html/wiki/Getting-started
|
275
277
|
rdoc_options: []
|
276
278
|
require_paths:
|
277
279
|
- lib
|
@@ -290,5 +292,5 @@ rubyforge_project:
|
|
290
292
|
rubygems_version: 2.6.12
|
291
293
|
signing_key:
|
292
294
|
specification_version: 4
|
293
|
-
summary: Reliable and high-performant apps with AMP & Rails.
|
295
|
+
summary: Reliable and high-performant apps with AMP & Rails. Formerly `amphtml`.
|
294
296
|
test_files: []
|