pwa 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5ad268d8a098b5d4c50110230c9234f40e443287e1855b0b2d5572e52c8a3fd
4
- data.tar.gz: ab8d6373ab6ddd6960c375ade411a5d0685625fc44a1eabc50b523a161a885be
3
+ metadata.gz: 7fe07b15c94d9ce07eeeb9d04c77bf04a73a5d70923d176da438b5a096b27e70
4
+ data.tar.gz: 2945a4cc6a2326e3386acd27e486530a71a33824820e896e6145b7127d5a115d
5
5
  SHA512:
6
- metadata.gz: 43f80bfa22035d90619a47223e3fb3336c20f338f49d4008447fa7fe72405cecd61add2789890c9af11681746b5b6ecdb8bfc0a0a8ed0429530ef087be1c5be6
7
- data.tar.gz: b055f9a6f858d820e5113ca665463622e90ab460fba87edf3638d7096446a5aecd6c4705e2c8cbad99b72b98a3310d03998de76d7c1b7ad8dd2213db84d25cf6
6
+ metadata.gz: 72aeb998d4323c29359152efb66b8481ebb815b34f5a121d41e5fea916f4897a5c4a43e578b94d145011c7c7bc2cf2131107323f3ecb7300b813dbf668671841
7
+ data.tar.gz: 0ca785f4e2cba1ac96b79f1145aba452772b9efa7a146a13ac80c7b76d25baaa0c6ad2dd3d564e2c41b2e23eefc183f691940a1304aa4327f2f8a13ac01c2865
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@
4
4
 
5
5
  * nothing yet
6
6
 
7
+ ### 1.2.0 - 2018/01/19
8
+
9
+ * features
10
+ * added `pwa_manifest` helper method
11
+
7
12
  ### 1.1.0 - 2018/01/17
8
13
 
9
14
  * features
data/README.md CHANGED
@@ -25,6 +25,7 @@ If a PWA is not enough and you want to bring your Web App into the store - check
25
25
  * [Usage](#usage)
26
26
  * [Manifest](#manifest)
27
27
  * [Service worker](#service-worker)
28
+ * [Views](#views)
28
29
  * [To Do](#to-do)
29
30
  * [Contributing](#contributing)
30
31
  * [Contributors](#contributors)
@@ -59,6 +60,12 @@ Now run the generator:
59
60
 
60
61
  $ rails g pwa
61
62
 
63
+ Add the following to the `head` tag of your layout file:
64
+
65
+ ```haml
66
+ = pwa_manifest
67
+ ```
68
+
62
69
  Make sure to add the required javascript in `app/assets/javascripts/application.js`:
63
70
 
64
71
  ```js
@@ -93,6 +100,18 @@ You can customize the page that shows up when a requested page has not been cach
93
100
  importScripts('https://example.com/pwa-sw.js');
94
101
  ```
95
102
 
103
+ ### Views
104
+
105
+ To detect whether or not your app is currently being used as a Progressive Web App, you can use CSS media queries:
106
+
107
+ ```css
108
+ @media all and (display-mode: standalone) {
109
+ /* ... */
110
+ }
111
+ ```
112
+
113
+ **Note:** Make sure to use `fullscreen` instead of `standalone` if that is your PWA display mode.
114
+
96
115
  ---
97
116
 
98
117
  ## To Do
@@ -0,0 +1,7 @@
1
+ module PwaHelper
2
+
3
+ def pwa_manifest
4
+ '<link rel="manifest" href="/manifest.json" />'.html_safe
5
+ end
6
+
7
+ end
data/lib/pwa/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Pwa
2
2
 
3
- VERSION = '1.1.0'
3
+ VERSION = '1.2.0'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-17 00:00:00.000000000 Z
11
+ date: 2018-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -62,6 +62,7 @@ files:
62
62
  - LICENSE
63
63
  - README.md
64
64
  - app/controllers/pwa/offline_controller.rb
65
+ - app/helpers/pwa_helper.rb
65
66
  - config/routes.rb
66
67
  - lib/generators/pwa_generator.rb
67
68
  - lib/generators/templates/manifest.json