amp-html 0.7.18 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +82 -77
  3. data/README.md +61 -75
  4. data/app/helpers/amp_html/asset_helper.rb +11 -0
  5. data/app/helpers/amp_html/base_helper.rb +14 -0
  6. data/app/helpers/amp_html/dynamic_content_helper.rb +14 -0
  7. data/app/helpers/amp_html/layouts_helper.rb +11 -0
  8. data/app/helpers/amp_html/media_helper.rb +15 -0
  9. data/app/views/mozaic/amp/_amp-link.html.erb +1 -0
  10. data/app/views/mozaic/amp/_audio.html.erb +11 -0
  11. data/app/views/mozaic/amp/_canonical-link.html.erb +1 -0
  12. data/app/views/mozaic/amp/_components.html.erb +6 -0
  13. data/app/views/mozaic/amp/_doctype.html.erb +4 -0
  14. data/app/views/mozaic/amp/_font.html.erb +2 -0
  15. data/app/views/mozaic/amp/_form-response.html.erb +5 -0
  16. data/app/views/mozaic/amp/_form.html.erb +3 -0
  17. data/app/views/mozaic/amp/_head.html.erb +13 -0
  18. data/app/views/mozaic/amp/_img.html.erb +1 -0
  19. data/app/views/mozaic/amp/_input.html.erb +1 -0
  20. data/app/views/mozaic/amp/_mustache.html.erb +3 -0
  21. data/app/views/mozaic/amp/_selector.html.erb +3 -0
  22. data/app/views/mozaic/amp/_video.html.erb +11 -0
  23. data/lib/amp-html.rb +4 -20
  24. data/lib/amp-html/configuration.rb +13 -158
  25. data/lib/amp-html/engine.rb +6 -0
  26. data/lib/amp-html/railtie.rb +109 -0
  27. data/lib/amp-html/version.rb +1 -9
  28. data/lib/generators/amp_html_generator.rb +27 -0
  29. data/lib/generators/templates/{assets/stylesheets/application.scss → application.css} +1 -1
  30. data/lib/generators/templates/initializer.rb +14 -0
  31. data/lib/generators/templates/layout.html.erb +15 -0
  32. metadata +53 -204
  33. data/.github/issue_template.md +0 -16
  34. data/.github/pull_request_template.md +0 -21
  35. data/.gitignore +0 -13
  36. data/.travis.yml +0 -4
  37. data/CODE_OF_CONDUCT.md +0 -46
  38. data/CONTRIBUTING.md +0 -1
  39. data/DEPRECATIONS.md +0 -9
  40. data/Gemfile +0 -12
  41. data/Gemfile.lock +0 -164
  42. data/INSTALL.md +0 -2
  43. data/OWNERS.yaml +0 -1
  44. data/Rakefile +0 -6
  45. data/amp-html.gemspec +0 -30
  46. data/bin/amp-html +0 -4
  47. data/lib/amp-html/cli.rb +0 -113
  48. data/lib/amp-html/components/docs/README.md +0 -101
  49. data/lib/amp-html/components/docs/ad.md +0 -83
  50. data/lib/amp-html/components/docs/analytics.md +0 -131
  51. data/lib/amp-html/components/docs/anim.md +0 -66
  52. data/lib/amp-html/components/docs/fonts.md +0 -63
  53. data/lib/amp-html/components/docs/forms.md +0 -79
  54. data/lib/amp-html/components/docs/iframe.md +0 -62
  55. data/lib/amp-html/components/docs/javascript.md +0 -71
  56. data/lib/amp-html/components/docs/lists.md +0 -168
  57. data/lib/amp-html/components/docs/media.md +0 -52
  58. data/lib/amp-html/components/docs/mustache.md +0 -46
  59. data/lib/amp-html/components/docs/notifications.md +0 -0
  60. data/lib/amp-html/components/docs/schema.md +0 -80
  61. data/lib/amp-html/components/docs/service_worker.md +0 -60
  62. data/lib/amp-html/components/docs/social.md +0 -130
  63. data/lib/amp-html/components/docs/stylesheets.md +0 -50
  64. data/lib/amp-html/components/help.rb +0 -19
  65. data/lib/amp-html/components/install.rb +0 -34
  66. data/lib/amp-html/components/templates/ERROR.md +0 -5
  67. data/lib/amp-html/components/templates/README.md +0 -12
  68. data/lib/amp-html/configuration/docs/README.md +0 -0
  69. data/lib/amp-html/configuration/help.rb +0 -11
  70. data/lib/amp-html/helpers/docs/README.md +0 -98
  71. data/lib/amp-html/helpers/docs/amp.md +0 -0
  72. data/lib/amp-html/helpers/docs/amp_ad.md +0 -86
  73. data/lib/amp-html/helpers/docs/amp_analytics.md +0 -76
  74. data/lib/amp-html/helpers/docs/amp_anim.md +0 -68
  75. data/lib/amp-html/helpers/docs/amp_audio.md +0 -54
  76. data/lib/amp-html/helpers/docs/amp_auto_ads.md +0 -43
  77. data/lib/amp-html/helpers/docs/amp_close_user_notification_button.md +0 -0
  78. data/lib/amp-html/helpers/docs/amp_css.md +0 -37
  79. data/lib/amp-html/helpers/docs/amp_css_link.md +0 -0
  80. data/lib/amp-html/helpers/docs/amp_custom_ad.md +0 -0
  81. data/lib/amp-html/helpers/docs/amp_document_link.md +0 -0
  82. data/lib/amp-html/helpers/docs/amp_embed.md +0 -86
  83. data/lib/amp-html/helpers/docs/amp_facebook.md +0 -70
  84. data/lib/amp-html/helpers/docs/amp_fallback.md +0 -47
  85. data/lib/amp-html/helpers/docs/amp_font.md +0 -0
  86. data/lib/amp-html/helpers/docs/amp_font_link.md +0 -0
  87. data/lib/amp-html/helpers/docs/amp_form.md +0 -0
  88. data/lib/amp-html/helpers/docs/amp_form_response.md +0 -0
  89. data/lib/amp-html/helpers/docs/amp_gfycat.md +0 -0
  90. data/lib/amp-html/helpers/docs/amp_global_css.md +0 -0
  91. data/lib/amp-html/helpers/docs/amp_google_analytics.md +0 -0
  92. data/lib/amp-html/helpers/docs/amp_google_font.md +0 -0
  93. data/lib/amp-html/helpers/docs/amp_head.md +0 -0
  94. data/lib/amp-html/helpers/docs/amp_html_doctype.md +0 -0
  95. data/lib/amp-html/helpers/docs/amp_iframe.md +0 -0
  96. data/lib/amp-html/helpers/docs/amp_image.md +0 -0
  97. data/lib/amp-html/helpers/docs/amp_input.md +0 -0
  98. data/lib/amp-html/helpers/docs/amp_instagram.md +0 -0
  99. data/lib/amp-html/helpers/docs/amp_js.md +0 -0
  100. data/lib/amp-html/helpers/docs/amp_link.md +0 -0
  101. data/lib/amp-html/helpers/docs/amp_list.md +0 -0
  102. data/lib/amp-html/helpers/docs/amp_live_list.md +0 -0
  103. data/lib/amp-html/helpers/docs/amp_live_list_items.md +0 -0
  104. data/lib/amp-html/helpers/docs/amp_live_list_pagination.md +0 -0
  105. data/lib/amp-html/helpers/docs/amp_live_list_update.md +0 -0
  106. data/lib/amp-html/helpers/docs/amp_mustache.md +0 -0
  107. data/lib/amp-html/helpers/docs/amp_pin_it.md +0 -0
  108. data/lib/amp-html/helpers/docs/amp_pin_widget.md +0 -0
  109. data/lib/amp-html/helpers/docs/amp_pinterest_follow.md +0 -0
  110. data/lib/amp-html/helpers/docs/amp_pixel.md +0 -0
  111. data/lib/amp-html/helpers/docs/amp_placeholder.md +0 -0
  112. data/lib/amp-html/helpers/docs/amp_reddit.md +0 -0
  113. data/lib/amp-html/helpers/docs/amp_resources.md +0 -0
  114. data/lib/amp-html/helpers/docs/amp_selector.md +0 -0
  115. data/lib/amp-html/helpers/docs/amp_serviceworker.md +0 -0
  116. data/lib/amp-html/helpers/docs/amp_social_share.md +0 -0
  117. data/lib/amp-html/helpers/docs/amp_soundcloud.md +0 -0
  118. data/lib/amp-html/helpers/docs/amp_twitter.md +0 -0
  119. data/lib/amp-html/helpers/docs/amp_user_notification.md +0 -0
  120. data/lib/amp-html/helpers/docs/amp_video.md +0 -0
  121. data/lib/amp-html/helpers/docs/amp_video_ad.md +0 -0
  122. data/lib/amp-html/helpers/docs/amp_vine.md +0 -0
  123. data/lib/amp-html/helpers/docs/amp_youtube.md +0 -0
  124. data/lib/amp-html/helpers/docs/audio_tag.md +0 -0
  125. data/lib/amp-html/helpers/docs/canonical_document_link.md +0 -0
  126. data/lib/amp-html/helpers/docs/form_tag.md +0 -0
  127. data/lib/amp-html/helpers/docs/image_tag.md +0 -0
  128. data/lib/amp-html/helpers/docs/input_tag.md +0 -0
  129. data/lib/amp-html/helpers/docs/javascript_include_tag.md +0 -0
  130. data/lib/amp-html/helpers/docs/noscript_tag.md +0 -0
  131. data/lib/amp-html/helpers/docs/schema_tag.md +0 -0
  132. data/lib/amp-html/helpers/docs/stylesheet_link_tag.md +0 -0
  133. data/lib/amp-html/helpers/docs/video_tag.md +0 -0
  134. data/lib/amp-html/helpers/help.rb +0 -23
  135. data/lib/amp-html/root.rb +0 -7
  136. data/lib/amp-html/test.rb +0 -169
  137. data/lib/amp-html/test/help.rb +0 -11
  138. data/lib/amp-html/test/templates/README.md +0 -43
  139. data/lib/amp-html/test/templates/css/!important.md +0 -1
  140. data/lib/amp-html/test/templates/css/-amp-.md +0 -1
  141. data/lib/amp-html/test/templates/css/-moz-binding.md +0 -1
  142. data/lib/amp-html/test/templates/css/@import.md +0 -1
  143. data/lib/amp-html/test/templates/css/behavior.md +0 -1
  144. data/lib/amp-html/test/templates/css/filter.md +0 -1
  145. data/lib/amp-html/test/templates/css/i-amp-.md +0 -1
  146. data/lib/amp-html/test/templates/css/overflow.md +0 -1
  147. data/lib/amp-html/test/templates/html/applet.md +0 -1
  148. data/lib/amp-html/test/templates/html/audio.md +0 -1
  149. data/lib/amp-html/test/templates/html/base.md +0 -1
  150. data/lib/amp-html/test/templates/html/embed.md +0 -1
  151. data/lib/amp-html/test/templates/html/frame.md +0 -1
  152. data/lib/amp-html/test/templates/html/frameset.md +0 -1
  153. data/lib/amp-html/test/templates/html/http-equiv.md +0 -1
  154. data/lib/amp-html/test/templates/html/iframe.md +0 -1
  155. data/lib/amp-html/test/templates/html/img.md +0 -1
  156. data/lib/amp-html/test/templates/html/javascript_include_tag.md +0 -1
  157. data/lib/amp-html/test/templates/html/object.md +0 -1
  158. data/lib/amp-html/test/templates/html/onclick.md +0 -1
  159. data/lib/amp-html/test/templates/html/onmousehover.md +0 -1
  160. data/lib/amp-html/test/templates/html/param.md +0 -1
  161. data/lib/amp-html/test/templates/html/stylesheet_link_tag.md +0 -1
  162. data/lib/amp-html/test/templates/html/video.md +0 -1
  163. data/lib/amp-html/test/templates/markup/!doctype.md +0 -1
  164. data/lib/amp-html/test/templates/markup/amp_document_link.md +0 -1
  165. data/lib/amp-html/test/templates/markup/amp_head.md +0 -1
  166. data/lib/amp-html/test/templates/markup/amp_html_doctype.md +0 -1
  167. data/lib/amp-html/test/templates/markup/canonical_document_link.md +0 -1
  168. data/lib/amp-html/test/templates/markup/head_body.md +0 -1
  169. data/lib/amp-html/test/templates/markup/html.md +0 -1
  170. data/lib/amp-html/test/templates/markup/meta_viewport.md +0 -1
  171. data/lib/amp-html/validate.rb +0 -46
  172. data/lib/amp-html/validate/help.rb +0 -11
  173. data/lib/amp-html/validate/templates/README.md +0 -32
  174. data/lib/generators/amp_html/assets_generator.rb +0 -31
  175. data/lib/generators/amp_html/bundle_generator.rb +0 -50
  176. data/lib/generators/amp_html/components_generator.rb +0 -84
  177. data/lib/generators/amp_html/helpers_generator.rb +0 -32
  178. data/lib/generators/amp_html/install_generator.rb +0 -53
  179. data/lib/generators/amp_html/views_generator.rb +0 -62
  180. data/lib/generators/templates/assets/README.md +0 -0
  181. data/lib/generators/templates/components/README.md +0 -0
  182. data/lib/generators/templates/components/views/_components.html.erb +0 -141
  183. data/lib/generators/templates/components/views/_google_analytics.html.erb +0 -23
  184. data/lib/generators/templates/helpers/README.md +0 -0
  185. data/lib/generators/templates/helpers/amp/fallback_tag_helper.rb +0 -16
  186. data/lib/generators/templates/helpers/amp/font_tag_helper.rb +0 -37
  187. data/lib/generators/templates/helpers/amp/link_tag_helper.rb +0 -11
  188. data/lib/generators/templates/helpers/amp/mustache_tag_helper.rb +0 -13
  189. data/lib/generators/templates/helpers/amp/noscript_tag_helper.rb +0 -13
  190. data/lib/generators/templates/helpers/amp/placeholder_tag_helper.rb +0 -16
  191. data/lib/generators/templates/helpers/amp/schema_tag_helper.rb +0 -16
  192. data/lib/generators/templates/helpers/amp/stylesheets_tag_helper.rb +0 -21
  193. data/lib/generators/templates/helpers/amp_tag_helper.rb.erb +0 -65
  194. data/lib/generators/templates/helpers/asset_tag_helper.rb.erb +0 -119
  195. data/lib/generators/templates/helpers/form_tag_helper.rb.erb +0 -79
  196. data/lib/generators/templates/install/README.md +0 -0
  197. data/lib/generators/templates/install/amp-html.rb.erb +0 -19
  198. data/lib/generators/templates/install/amp-html.yml.erb +0 -189
  199. data/lib/generators/templates/views/README.md +0 -0
  200. data/lib/generators/templates/views/application.html.erb +0 -71
  201. data/lib/generators/templates/views/application/_head.html.erb +0 -47
  202. data/lib/generators/templates/views/application/_resources.html.erb +0 -16
  203. data/lib/generators/templates/views/application/_schema.html.erb +0 -6
  204. data/lib/generators/templates/views/config/mime_types.rb +0 -8
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .DS_Store
4
- .bundle
5
- .rvmrc
6
- .ruby-version
7
- .yardoc
8
- .rake_tasks~
9
- coverage/*
10
- doc/*
11
- log/*
12
- pkg/*
13
- .idea/*
@@ -1,4 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3.3
4
- install: bundle install --without development --deployment --jobs=3 --retry=3
@@ -1,46 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- ## Our Standards
8
-
9
- Examples of behavior that contributes to creating a positive environment include:
10
-
11
- * Using welcoming and inclusive language
12
- * Being respectful of differing viewpoints and experiences
13
- * Gracefully accepting constructive criticism
14
- * Focusing on what is best for the community
15
- * Showing empathy towards other community members
16
-
17
- Examples of unacceptable behavior by participants include:
18
-
19
- * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
- * Trolling, insulting/derogatory comments, and personal or political attacks
21
- * Public or private harassment
22
- * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
- * Other conduct which could reasonably be considered inappropriate in a professional setting
24
-
25
- ## Our Responsibilities
26
-
27
- Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
-
29
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
-
31
- ## Scope
32
-
33
- This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
-
35
- ## Enforcement
36
-
37
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at help@slooob.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
-
39
- Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
-
41
- ## Attribution
42
-
43
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
-
45
- [homepage]: http://contributor-covenant.org
46
- [version]: http://contributor-covenant.org/version/1/4/
@@ -1 +0,0 @@
1
- # Contributing
@@ -1,9 +0,0 @@
1
- # Deprecations
2
-
3
- ### 2.0
4
-
5
- * deprecate `amp_global_css` helper - will be removed in 2.0
6
-
7
- ### 1.0
8
-
9
- * deprecate `amp_resources` helper - will be removed in 1.0
data/Gemfile DELETED
@@ -1,12 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
-
6
- # Travis CI
7
- gem 'rspec-rails', '~> 3.6'
8
-
9
- # Development
10
- group :development do
11
- gem 'rubocop', '~> 0.49', require: false
12
- end
@@ -1,164 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- amp-html (0.7.18)
5
- highline (~> 1.7)
6
- launchy (~> 2.4)
7
- rails (>= 4.0.0)
8
- thor (~> 0.20)
9
-
10
- GEM
11
- remote: https://rubygems.org/
12
- specs:
13
- actioncable (5.1.3)
14
- actionpack (= 5.1.3)
15
- nio4r (~> 2.0)
16
- websocket-driver (~> 0.6.1)
17
- actionmailer (5.1.3)
18
- actionpack (= 5.1.3)
19
- actionview (= 5.1.3)
20
- activejob (= 5.1.3)
21
- mail (~> 2.5, >= 2.5.4)
22
- rails-dom-testing (~> 2.0)
23
- actionpack (5.1.3)
24
- actionview (= 5.1.3)
25
- activesupport (= 5.1.3)
26
- rack (~> 2.0)
27
- rack-test (~> 0.6.3)
28
- rails-dom-testing (~> 2.0)
29
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
- actionview (5.1.3)
31
- activesupport (= 5.1.3)
32
- builder (~> 3.1)
33
- erubi (~> 1.4)
34
- rails-dom-testing (~> 2.0)
35
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
36
- activejob (5.1.3)
37
- activesupport (= 5.1.3)
38
- globalid (>= 0.3.6)
39
- activemodel (5.1.3)
40
- activesupport (= 5.1.3)
41
- activerecord (5.1.3)
42
- activemodel (= 5.1.3)
43
- activesupport (= 5.1.3)
44
- arel (~> 8.0)
45
- activesupport (5.1.3)
46
- concurrent-ruby (~> 1.0, >= 1.0.2)
47
- i18n (~> 0.7)
48
- minitest (~> 5.1)
49
- tzinfo (~> 1.1)
50
- addressable (2.5.1)
51
- public_suffix (~> 2.0, >= 2.0.2)
52
- arel (8.0.0)
53
- ast (2.3.0)
54
- builder (3.2.3)
55
- concurrent-ruby (1.0.5)
56
- diff-lcs (1.3)
57
- erubi (1.6.1)
58
- globalid (0.4.0)
59
- activesupport (>= 4.2.0)
60
- highline (1.7.8)
61
- i18n (0.8.6)
62
- launchy (2.4.3)
63
- addressable (~> 2.3)
64
- loofah (2.0.3)
65
- nokogiri (>= 1.5.9)
66
- mail (2.6.6)
67
- mime-types (>= 1.16, < 4)
68
- method_source (0.8.2)
69
- mime-types (3.1)
70
- mime-types-data (~> 3.2015)
71
- mime-types-data (3.2016.0521)
72
- mini_portile2 (2.2.0)
73
- minitest (5.10.3)
74
- nio4r (2.1.0)
75
- nokogiri (1.8.0)
76
- mini_portile2 (~> 2.2.0)
77
- nokogiri (1.8.0-x86-mingw32)
78
- mini_portile2 (~> 2.2.0)
79
- parallel (1.12.0)
80
- parser (2.4.0.0)
81
- ast (~> 2.2)
82
- powerpack (0.1.1)
83
- public_suffix (2.0.5)
84
- rack (2.0.3)
85
- rack-test (0.6.3)
86
- rack (>= 1.0)
87
- rails (5.1.3)
88
- actioncable (= 5.1.3)
89
- actionmailer (= 5.1.3)
90
- actionpack (= 5.1.3)
91
- actionview (= 5.1.3)
92
- activejob (= 5.1.3)
93
- activemodel (= 5.1.3)
94
- activerecord (= 5.1.3)
95
- activesupport (= 5.1.3)
96
- bundler (>= 1.3.0)
97
- railties (= 5.1.3)
98
- sprockets-rails (>= 2.0.0)
99
- rails-dom-testing (2.0.3)
100
- activesupport (>= 4.2.0)
101
- nokogiri (>= 1.6)
102
- rails-html-sanitizer (1.0.3)
103
- loofah (~> 2.0)
104
- railties (5.1.3)
105
- actionpack (= 5.1.3)
106
- activesupport (= 5.1.3)
107
- method_source
108
- rake (>= 0.8.7)
109
- thor (>= 0.18.1, < 2.0)
110
- rainbow (2.2.2)
111
- rake
112
- rake (12.0.0)
113
- rspec-core (3.6.0)
114
- rspec-support (~> 3.6.0)
115
- rspec-expectations (3.6.0)
116
- diff-lcs (>= 1.2.0, < 2.0)
117
- rspec-support (~> 3.6.0)
118
- rspec-mocks (3.6.0)
119
- diff-lcs (>= 1.2.0, < 2.0)
120
- rspec-support (~> 3.6.0)
121
- rspec-rails (3.6.1)
122
- actionpack (>= 3.0)
123
- activesupport (>= 3.0)
124
- railties (>= 3.0)
125
- rspec-core (~> 3.6.0)
126
- rspec-expectations (~> 3.6.0)
127
- rspec-mocks (~> 3.6.0)
128
- rspec-support (~> 3.6.0)
129
- rspec-support (3.6.0)
130
- rubocop (0.49.1)
131
- parallel (~> 1.10)
132
- parser (>= 2.3.3.1, < 3.0)
133
- powerpack (~> 0.1)
134
- rainbow (>= 1.99.1, < 3.0)
135
- ruby-progressbar (~> 1.7)
136
- unicode-display_width (~> 1.0, >= 1.0.1)
137
- ruby-progressbar (1.8.1)
138
- sprockets (3.7.1)
139
- concurrent-ruby (~> 1.0)
140
- rack (> 1, < 3)
141
- sprockets-rails (3.2.0)
142
- actionpack (>= 4.0)
143
- activesupport (>= 4.0)
144
- sprockets (>= 3.0.0)
145
- thor (0.20.0)
146
- thread_safe (0.3.6)
147
- tzinfo (1.2.3)
148
- thread_safe (~> 0.1)
149
- unicode-display_width (1.3.0)
150
- websocket-driver (0.6.5)
151
- websocket-extensions (>= 0.1.0)
152
- websocket-extensions (0.1.2)
153
-
154
- PLATFORMS
155
- ruby
156
- x86-mingw32
157
-
158
- DEPENDENCIES
159
- amp-html!
160
- rspec-rails (~> 3.6)
161
- rubocop (~> 0.49)
162
-
163
- BUNDLED WITH
164
- 1.15.4
data/INSTALL.md DELETED
@@ -1,2 +0,0 @@
1
- **Thank you for installing amp-html!**
2
- Learn more about getting started here: https://github.com/slooob/amp-html/wiki/Getting-started
@@ -1 +0,0 @@
1
- - jonhue
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
@@ -1,30 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path File.join('..', 'lib', 'amp-html', 'version'), __FILE__
3
-
4
- Gem::Specification.new do |gem|
5
- gem.name = 'amp-html'
6
- gem.version = AmpHtml::VERSION
7
- gem.platform = Gem::Platform::RUBY
8
- gem.summary = 'Reliable high-performant apps with AMP & Rails. Formerly `amphtml`.'
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."
10
- gem.authors = ['Jonas Hübotter']
11
- gem.email = 'developer@slooob.com'
12
- gem.homepage = 'https://github.com/slooob/amp-html' # https://railsamp.com
13
- gem.license = 'MIT'
14
-
15
- gem.files = `git ls-files`.split("\n")
16
- gem.require_paths = ['lib']
17
- gem.bindir = 'bin'
18
- gem.executables = ['amp-html']
19
-
20
- gem.post_install_message = IO.read 'INSTALL.md'
21
-
22
- gem.required_ruby_version = '>= 2.0'
23
-
24
- gem.add_dependency 'rails', '>= 4.0.0'
25
-
26
- # Development
27
- gem.add_dependency 'thor', '~> 0.20'
28
- gem.add_dependency 'launchy', '~> 2.4'
29
- gem.add_dependency 'highline', '~> 1.7'
30
- end
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'amp-html'
4
- AmpHtml::Cli.start
@@ -1,113 +0,0 @@
1
- require 'thor'
2
-
3
- class AmpHtml::Cli < Thor
4
-
5
- check_unknown_options!
6
-
7
- desc 'version', 'Display currently used version'
8
- map %w[--version] => :version
9
-
10
- def version
11
- puts ::AmpHtml::Version.current
12
- end
13
-
14
-
15
- desc 'helpers', 'Learn more about AMP-HTML view helpers'
16
- map %w[--helpers] => :helpers
17
-
18
- def helpers
19
- puts ::AmpHtml::Helpers::Help.all
20
- end
21
-
22
-
23
- desc 'helper NAME', 'Get infomration about a specific AMP-HTML helper'
24
- map %w[--helper] => :helper
25
-
26
- def helper name
27
- puts ::AmpHtml::Helpers::Help.helper name
28
- end
29
-
30
-
31
- desc 'configuration', 'Learn how to configure AMP-HTML'
32
- map %w[--configuration] => :configuration
33
-
34
- def configuration
35
- puts ::AmpHtml::Configuration::Help.all
36
- end
37
-
38
-
39
- desc 'components', 'Learn more about AMP-HTML installable components'
40
- map %w[--components] => :components
41
-
42
- def components
43
- puts ::AmpHtml::Components::Help.all
44
- end
45
-
46
-
47
- desc 'component NAME', 'Get infomration about a specific AMP-HTML installable component'
48
- map %w[--component] => :component
49
-
50
- def component name
51
- puts ::AmpHtml::Components::Help.component name
52
- end
53
-
54
-
55
- desc 'bundle', 'Install all AMP-HTML components specified in the config/AmpHtml.yml file'
56
- map %w[-b --bundle] => :bundle
57
-
58
- def bundle
59
- puts ::AmpHtml::Components::Install.bundle
60
- end
61
-
62
- desc 'install COMPONENT', 'Install a specific AMP-HTML component'
63
- map %w[-b --bundle] => :install
64
-
65
- def install component
66
- puts ::AmpHtml::Components::Install.install component
67
- end
68
-
69
-
70
- desc 'validate URL', 'Validate a specific AMP-HTML view'
71
- map %w[--validate] => :validate
72
-
73
- option :server_running, desc: 'Passes information that the server is running (optional)', type: :boolean, default: false, aliases: '-r'
74
- option :help, desc: 'Additional help information', type: :boolean, default: false, aliases: '-h'
75
-
76
- def validate url
77
- unless options[:help]
78
- if options[:server_running]
79
- puts ::AmpHtml::Validate.validate url, true
80
- else
81
- puts ::AmpHtml::Validate.validate url, false
82
- end
83
- else
84
- puts ::AmpHtml::Validate::Help.all
85
- end
86
- end
87
-
88
-
89
- desc 'test NAME', 'Test AMP-HTML components. Run test all to bundle tests.'
90
- map %w[-t --test] => :test
91
-
92
- option :split, desc: 'Use this option if you are using SplitView', type: :boolean, default: false, aliases: '-s'
93
- # option :fix, desc: 'Suggest ways to fix errors along the way', type: :boolean, default: false, aliases: '-f'
94
- # option :autofix, desc: 'Attempt to automatically fix errors (not recommended)', type: :boolean, default: false, aliases: '-af'
95
- option :help, desc: 'Additional help information', type: :boolean, default: false, aliases: '-h'
96
-
97
- def test name
98
- unless options[:help]
99
- if name == 'all'
100
- puts ::AmpHtml::Test.all
101
- elsif name == 'markup'
102
- puts ::AmpHtml::Test.markup
103
- elsif name == 'html'
104
- puts ::AmpHtml::Test.html
105
- elsif name == 'css'
106
- puts ::AmpHtml::Test.css
107
- end
108
- else
109
- puts ::AmpHtml::Test::Help.all
110
- end
111
- end
112
-
113
- end
@@ -1,101 +0,0 @@
1
-
2
- # AMP-HTML Components
3
-
4
-
5
- ## All Components
6
-
7
- All currently supported components for AMP-HTML. New are added continuously.
8
-
9
- ### Built-in
10
-
11
- * [Media BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/media.md)
12
- * [Forms BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/forms.md)
13
- * [Schema.org](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/schema.md)
14
- * [Fonts BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/fonts.md)
15
- * [Stylesheets](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/stylesheets.md)
16
- * [Mustache.js](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/mustache.md)
17
-
18
- ### Installable
19
-
20
- * [Advertisements BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/ad.md)
21
- * [Analytics BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/analytics.md)
22
- * [Animated Images BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/anim.md)
23
- * [Iframe BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/iframe.md)
24
- * [Notifications BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/notifications.md)
25
- * [Social BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/social.md)
26
- * [Javascript BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/javascript.md)
27
- * [Service Worker BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/service_worker.md)
28
- * [Lists BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/lists.md)
29
-
30
-
31
- ## Installing Components
32
-
33
- AMP-HTML makes it easy to add new feature-sets with components without bloating your app right from the beginning.
34
-
35
- You can install any component by running:
36
-
37
- amp-html install NAME
38
-
39
- So running `amp-html install analytics` will install the AMP-HTML Analytics component.
40
-
41
- You can view all currently installed components in your AMP-HTML configuration file (`config/amp-html.yml`).
42
-
43
- After editing the list of components in your configuration run:
44
-
45
- amp-html bundle
46
-
47
- to install all added and uninstall all removed components.
48
-
49
- **Now you are ready to use your added components.**
50
- To learn more about the features of a specific component, take a look at their dedicated references.
51
-
52
- To update your configuration file after new components got added to AMP-HTML run:
53
-
54
- rails g amp_html:install
55
-
56
-
57
- ## About Components
58
-
59
- AMP-HTML components are an easy way to use AMP and Rails to build slim, performant and powerful applications. They allow to add the exact superpower or feature your app needs. You stay in control of what features your app uses and which not.
60
-
61
- ### What features are components?
62
-
63
- The vanilla version of AMP-HTML comes just with everything you need to get you and your app started with AMP. To really profit from all the features that AMP-HTML provides, you need to install components. Some components like "Iframe" or "Animated Images" are considerably smaller than others like "Authentication" and "Notifications". You decide which components your app needs.
64
-
65
- ### DeepIntegration Components
66
-
67
- DeepIntegration components are usually larger, more complex components, that integrate more deeply into your app. They often provide options to get configured in your AMP-HTML configuration file (`config/amp-html.yml`) and / or they require to be setup in your view. You can learn more about whether a certain component has DeepIntegration or not by looking at their dedicated references.
68
-
69
- ### Availability of Components
70
-
71
- The availability of components summarizes whether a component is included in the vanilla version of AMP-HTML or if it needs to be installed in order to get used.
72
-
73
- ---
74
-
75
- ## New Components
76
-
77
- Take a look at the newest additions of components to AMP-HTML.
78
-
79
- * [Lists BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/lists.md)
80
- * [Mustache.js](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/mustache.md)
81
- * [Service Worker BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/service_worker.md)
82
- * [Forms BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/forms.md)
83
- * [Javascript BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/javascript.md)
84
-
85
-
86
- ## Components in BETA
87
-
88
- Take a look at the newest additions of components to AMP-HTML.
89
-
90
- * [Forms BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/forms.md)
91
- * [Media BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/media.md)
92
- * [Fonts BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/fonts.md)
93
- * [Advertisements BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/ad.md)
94
- * [Analytics BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/analytics.md)
95
- * [Animated Images BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/anim.md)
96
- * [Iframe BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/iframe.md)
97
- * [Notifications BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/notifications.md)
98
- * [Social BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/social.md)
99
- * [Javascript BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/javascript.md)
100
- * [Service Worker BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/service_worker.md)
101
- * [Lists BETA](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/lists.md)