amp-html 0.7.12 → 0.7.13

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: a621f88a55f21ff3f6dd8324fac15cc5ee5fc827
4
- data.tar.gz: 376afbc1bd162710bc942a0c978bdc5f364f7366
3
+ metadata.gz: 044ef67d3c0544122fd4ab014a6aa97a9a8e6d85
4
+ data.tar.gz: 3e20be0f58bc5e9fad74af020095b3d3a06cf142
5
5
  SHA512:
6
- metadata.gz: 358bdbf11bd6ce2c528080ecd422626d2dd1761a0c858215d569f26661e3e6f279571ccf110997776e5e43d0b097345812d3d3a894940091308d8f16f3e026a7
7
- data.tar.gz: a575485536cec40390f71717a8cde52b639a5595edaf17202d260c742256f80e387dcf3ad7f5a6bb49dc9415547db9a9be48a8901b868f67c7ba55fc3e387ec2
6
+ metadata.gz: 1aafe515c6b79b370ee06e5925e96f52d0fd92ec44b5df3a67fb9a6610a44b3f6d9a678c0ca1ce0e5d4dac42620fe0b1ac84e5dd1e60c8450a1175ded4c6b426
7
+ data.tar.gz: 643d77c41ef0c6f117d76c6b902855805410ee563d01de198253e386614ce265af2fe4a0f825e1c47e7be25e3c77826ef4930d8d2bf14b58a5a5e0894e5701f6
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  * nothing yet
6
6
 
7
+ ### 0.7.13 (Pre-release) - 2017-08-24
8
+
9
+ * minor bugfixes
10
+
7
11
  ### 0.7.12 (Pre-release) - 2017-08-24
8
12
 
9
13
  * minor bugfixes
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.12 (Pre-release)
40
+ #### Latest release: 0.7.13 (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
 
@@ -104,23 +104,23 @@ gem 'amp-html', github: 'https://github.com/slooob/amp-html.git'
104
104
 
105
105
  AmpHtml comes with three different generators. If you want to bundle them execute:
106
106
 
107
- $ rails g amp-html:bundle
107
+ $ rails g amp_html:bundle
108
108
 
109
109
  That will generate all the files you need to create a universal AMP app (recommended).
110
110
 
111
111
  If you want to use [SplitView](https://github.com/slooob/amp-html/wiki/Docs:-SplitView) to create views with and without AMP simultaneously, execute instead:
112
112
 
113
- $ rails g amp-html:bundle --split
113
+ $ rails g amp_html:bundle --split
114
114
 
115
115
  To add components ([List of components](https://github.com/slooob/amp-html/blob/master/lib/amp-html/components/docs/README.md)) to the generator simply include the component as an option:
116
116
 
117
- $ rails g amp-html:bundle --analytics --notifications
117
+ $ rails g amp_html:bundle --analytics --notifications
118
118
 
119
119
  You can also run the three generators independently:
120
120
 
121
- $ rails g amp-html:install
122
- $ rails g amp-html:helpers
123
- $ rails g amp-html:views
121
+ $ rails g amp_html:install
122
+ $ rails g amp_html:helpers
123
+ $ rails g amp_html:views
124
124
 
125
125
  *Each* of them supports the `--split || -s` option to use **both** regular views and AMP views.
126
126
  To add components, you need to pass them as option to each generator.
@@ -51,7 +51,7 @@ To learn more about the features of a specific component, take a look at their d
51
51
 
52
52
  To update your configuration file after new components got added to AMP-HTML run:
53
53
 
54
- rails g amp-html:install
54
+ rails g amp_html:install
55
55
 
56
56
 
57
57
  ## About Components
@@ -6,8 +6,8 @@ module AmpHtml
6
6
  class Install
7
7
 
8
8
  def self.bundle
9
- success1 = system "rails g amp-html:components#{ ' -s' if AmpHtml.split_view }#{ ' -f ' + AmpHtml.raw_format if AmpHtml.raw_format }#{ ' --analytics' if AmpHtml.components && AmpHtml.components.include?('analytics') || AmpHtml.components && AmpHtml.components.include?('notifications') }#{ ' --iframe' if AmpHtml.components && AmpHtml.components.include?('iframe') || AmpHtml.components && AmpHtml.components.include?('javascript') || AmpHtml.components && AmpHtml.components.include?('service_worker') }#{' --notifications' if AmpHtml.components && AmpHtml.components.include?('notifications') }#{ ' --anim' if AmpHtml.components && AmpHtml.components.include?('anim') }#{ ' --ad' if AmpHtml.components && AmpHtml.components.include?('ad') }#{ ' --social' if AmpHtml.components && AmpHtml.components.include?('social') }#{ ' --javascript' if (AmpHtml.components && AmpHtml.components.include?('javascript')) }#{ ' --service_worker' if (AmpHtml.components && AmpHtml.components.include?('service_worker')) }#{ ' --lists' if (AmpHtml.components && AmpHtml.components.include?('lists')) }"
10
- success2 = system "rails g amp-html:install --only_initializer#{ ' --javascript' if (AmpHtml.components && AmpHtml.components.include?('javascript')) }"
9
+ success1 = system "rails g amp_html:components#{ ' -s' if AmpHtml.split_view }#{ ' -f ' + AmpHtml.raw_format if AmpHtml.raw_format }#{ ' --analytics' if AmpHtml.components && AmpHtml.components.include?('analytics') || AmpHtml.components && AmpHtml.components.include?('notifications') }#{ ' --iframe' if AmpHtml.components && AmpHtml.components.include?('iframe') || AmpHtml.components && AmpHtml.components.include?('javascript') || AmpHtml.components && AmpHtml.components.include?('service_worker') }#{' --notifications' if AmpHtml.components && AmpHtml.components.include?('notifications') }#{ ' --anim' if AmpHtml.components && AmpHtml.components.include?('anim') }#{ ' --ad' if AmpHtml.components && AmpHtml.components.include?('ad') }#{ ' --social' if AmpHtml.components && AmpHtml.components.include?('social') }#{ ' --javascript' if (AmpHtml.components && AmpHtml.components.include?('javascript')) }#{ ' --service_worker' if (AmpHtml.components && AmpHtml.components.include?('service_worker')) }#{ ' --lists' if (AmpHtml.components && AmpHtml.components.include?('lists')) }"
10
+ success2 = system "rails g amp_html:install --only_initializer#{ ' --javascript' if (AmpHtml.components && AmpHtml.components.include?('javascript')) }"
11
11
  if success1 && success2
12
12
  puts IO.read File.join AmpHtml.root, 'amp-html', 'components', 'templates', 'README.md'
13
13
  else
@@ -17,9 +17,9 @@ module AmpHtml
17
17
 
18
18
  def self.install component
19
19
  if COMPONENTS.include? component
20
- success1 = system "rails g amp-html:install#{ ' -s' if AmpHtml.split_view }#{ ' -f ' + AmpHtml.raw_format if AmpHtml.raw_format }#{ ' --analytics' if (AmpHtml.components && AmpHtml.components.include?('analytics')) || AmpHtml.components && AmpHtml.components.include?('notifications') || component == 'analytics' || component == 'notifications' }#{ ' --iframe' if (AmpHtml.components && AmpHtml.components.include?('iframe')) || AmpHtml.components && AmpHtml.components.include?('javascript') || AmpHtml.components && AmpHtml.components.include?('service_worker') || component == 'iframe' || component == 'javascript' || component == 'service_worker' }#{' --notifications' if (AmpHtml.components && AmpHtml.components.include?('notifications')) || component == 'notifications' }#{ ' --anim' if (AmpHtml.components && AmpHtml.components.include?('anim')) || component == 'anim' }#{ ' --ad' if (AmpHtml.components && AmpHtml.components.include?('ad')) || component == 'ad' }#{ ' --social' if (AmpHtml.components && AmpHtml.components.include?('social')) || component == 'social' }#{ ' --javascript' if (AmpHtml.components && AmpHtml.components.include?('javascript')) || component == 'javascript' }#{ ' --service_worker' if (AmpHtml.components && AmpHtml.components.include?('service_worker')) || component == 'service_worker' }#{ ' --lists' if (AmpHtml.components && AmpHtml.components.include?('lists')) || component == 'lists' }"
21
- success2 = system "rails g amp-html:components#{ ' -s' if AmpHtml.split_view }#{ ' -f ' + AmpHtml.raw_format if AmpHtml.raw_format }#{ ' --analytics' if (AmpHtml.components && AmpHtml.components.include?('analytics')) || AmpHtml.components && AmpHtml.components.include?('notifications') || component == 'analytics' || component == 'notifications' }#{ ' --iframe' if (AmpHtml.components && AmpHtml.components.include?('iframe')) || AmpHtml.components && AmpHtml.components.include?('javascript') || AmpHtml.components && AmpHtml.components.include?('service_worker') || component == 'iframe' || component == 'javascript' || component == 'service_worker' }#{' --notifications' if (AmpHtml.components && AmpHtml.components.include?('notifications')) || component == 'notifications' }#{ ' --anim' if (AmpHtml.components && AmpHtml.components.include?('anim')) || component == 'anim' }#{ ' --ad' if (AmpHtml.components && AmpHtml.components.include?('ad')) || component == 'ad' }#{ ' --social' if (AmpHtml.components && AmpHtml.components.include?('social')) || component == 'social' }#{ ' --javascript' if (AmpHtml.components && AmpHtml.components.include?('javascript')) || component == 'javascript' }#{ ' --service_worker' if (AmpHtml.components && AmpHtml.components.include?('service_worker')) || component == 'service_worker' }#{ ' --lists' if (AmpHtml.components && AmpHtml.components.include?('lists')) || component == 'lists' }"
22
- success3 = system "rails g amp-html:views --only_resources#{ ' --javascript' if (AmpHtml.components && AmpHtml.components.include?('javascript')) || component == 'javascript' }"
20
+ success1 = system "rails g amp_html:install#{ ' -s' if AmpHtml.split_view }#{ ' -f ' + AmpHtml.raw_format if AmpHtml.raw_format }#{ ' --analytics' if (AmpHtml.components && AmpHtml.components.include?('analytics')) || AmpHtml.components && AmpHtml.components.include?('notifications') || component == 'analytics' || component == 'notifications' }#{ ' --iframe' if (AmpHtml.components && AmpHtml.components.include?('iframe')) || AmpHtml.components && AmpHtml.components.include?('javascript') || AmpHtml.components && AmpHtml.components.include?('service_worker') || component == 'iframe' || component == 'javascript' || component == 'service_worker' }#{' --notifications' if (AmpHtml.components && AmpHtml.components.include?('notifications')) || component == 'notifications' }#{ ' --anim' if (AmpHtml.components && AmpHtml.components.include?('anim')) || component == 'anim' }#{ ' --ad' if (AmpHtml.components && AmpHtml.components.include?('ad')) || component == 'ad' }#{ ' --social' if (AmpHtml.components && AmpHtml.components.include?('social')) || component == 'social' }#{ ' --javascript' if (AmpHtml.components && AmpHtml.components.include?('javascript')) || component == 'javascript' }#{ ' --service_worker' if (AmpHtml.components && AmpHtml.components.include?('service_worker')) || component == 'service_worker' }#{ ' --lists' if (AmpHtml.components && AmpHtml.components.include?('lists')) || component == 'lists' }"
21
+ success2 = system "rails g amp_html:components#{ ' -s' if AmpHtml.split_view }#{ ' -f ' + AmpHtml.raw_format if AmpHtml.raw_format }#{ ' --analytics' if (AmpHtml.components && AmpHtml.components.include?('analytics')) || AmpHtml.components && AmpHtml.components.include?('notifications') || component == 'analytics' || component == 'notifications' }#{ ' --iframe' if (AmpHtml.components && AmpHtml.components.include?('iframe')) || AmpHtml.components && AmpHtml.components.include?('javascript') || AmpHtml.components && AmpHtml.components.include?('service_worker') || component == 'iframe' || component == 'javascript' || component == 'service_worker' }#{' --notifications' if (AmpHtml.components && AmpHtml.components.include?('notifications')) || component == 'notifications' }#{ ' --anim' if (AmpHtml.components && AmpHtml.components.include?('anim')) || component == 'anim' }#{ ' --ad' if (AmpHtml.components && AmpHtml.components.include?('ad')) || component == 'ad' }#{ ' --social' if (AmpHtml.components && AmpHtml.components.include?('social')) || component == 'social' }#{ ' --javascript' if (AmpHtml.components && AmpHtml.components.include?('javascript')) || component == 'javascript' }#{ ' --service_worker' if (AmpHtml.components && AmpHtml.components.include?('service_worker')) || component == 'service_worker' }#{ ' --lists' if (AmpHtml.components && AmpHtml.components.include?('lists')) || component == 'lists' }"
22
+ success3 = system "rails g amp_html:views --only_resources#{ ' --javascript' if (AmpHtml.components && AmpHtml.components.include?('javascript')) || component == 'javascript' }"
23
23
  if success1 && success2 && success3
24
24
  puts "Successfully installed '#{component}' component!"
25
25
  puts IO.read File.join AmpHtml.root, 'amp-html', 'components', 'templates', 'README.md'
@@ -162,7 +162,7 @@ module AmpHtml
162
162
  begin
163
163
  YAML.load_file 'config/amp-html.yml'
164
164
  rescue Exception
165
- warn 'WARNING (AMP): You need to run `rails g amp-html:bundle` first.'
165
+ warn 'WARNING (AMP): You need to run `rails g amp_html:bundle` first.'
166
166
  exit
167
167
  end
168
168
  end
@@ -1,6 +1,6 @@
1
1
  module AmpHtml
2
2
 
3
- VERSION = '0.7.12'
3
+ VERSION = '0.7.13'
4
4
 
5
5
  class Version
6
6
 
@@ -27,11 +27,11 @@ default: &default
27
27
  # ------------
28
28
 
29
29
  <% if options[:split] %>
30
- ## To remove SplitView run `rails g amp-html:bundle`
30
+ ## To remove SplitView run `rails g amp_html:bundle`
31
31
  ## Defaults to `false`
32
32
  split_view: true
33
33
  <% else %>
34
- # ## To enable SplitView run `rails g amp-html:bundle -s`
34
+ # ## To enable SplitView run `rails g amp_html:bundle -s`
35
35
  # ## Defaults to `false`
36
36
  # split_view: true
37
37
  <% 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: 0.7.12
4
+ version: 0.7.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter