shopify_app 7.1.0 → 7.1.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 +4 -4
- data/.travis.yml +2 -2
- data/CHANGELOG.md +4 -0
- data/README.md +30 -0
- data/lib/shopify_app/version.rb +1 -1
- data/shopify_app.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 657035a2108236d9d62af84f1f751d2443798dd8
|
4
|
+
data.tar.gz: bf79895ae70e8b85af7a4887856aad56feaf8c8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3767d662a1b4c5f1ec39d33a1e4f73233b72d3968f775f1427e08c0eeebc1f6fb1459701b3ace70f447be7892c4e12f7a26af259d02237aea3a35b45834ce07d
|
7
|
+
data.tar.gz: d963eda875cee0f064c0a75f060f5dffb1b4979c8b618774dea17b08abf93f28b87e9056ad0e36eb14d9df82769ba3542a17f1c26a7ca1444cc6426f1c49e581
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -23,6 +23,7 @@ Table of Contents
|
|
23
23
|
* [Home Controller Generator](#home-controller-generator)
|
24
24
|
* [App Proxy Controller Generator](#app-proxy-controller-generator)
|
25
25
|
* [Controllers, Routes and Views](#controllers-routes-and-views)
|
26
|
+
* [**Mounting the Engine**](#mounting-the-engine)
|
26
27
|
* [**Managing Api Keys**](#managing-api-keys)
|
27
28
|
* [**WebhooksManager**](#webhooksmanager)
|
28
29
|
* [**ScripttagsManager**](#scripttagsmanager)
|
@@ -170,6 +171,35 @@ This optional generator, not included with the default generator, creates the ap
|
|
170
171
|
|
171
172
|
The last group of generators are for your convenience if you want to start overriding code included as part of the Rails engine. For example by default the engine provides a simple SessionController, if you run the `rails generate shopify_app:controllers` generator then this code gets copied out into your app so you can start adding to it. Routes and views follow the exact same pattern.
|
172
173
|
|
174
|
+
Mounting the Engine
|
175
|
+
-------------------
|
176
|
+
|
177
|
+
Mounting the Engine will provide the basic routes to authenticating a shop with your custom application. It will provide:
|
178
|
+
|
179
|
+
| Verb | Route | Action |
|
180
|
+
|--------|-------------------------------|------------------------------|
|
181
|
+
|GET |'/login' |Login |
|
182
|
+
|POST |'/login' |Login |
|
183
|
+
|GET |'/auth/shopify/callback' |Authenticate Callback |
|
184
|
+
|GET |'/logout' |Logout |
|
185
|
+
|POST |'/webhooks/:type' |Webhook Callback |
|
186
|
+
|
187
|
+
|
188
|
+
The default routes of the Shopify rails engine, which is mounted to the root, can be altered to mount on a different route. The `config/routes.rb` can be modified to put these under a nested route (say `/app-name`) as:
|
189
|
+
|
190
|
+
```ruby
|
191
|
+
mount ShopifyApp::Engine, at: '/app-name'
|
192
|
+
```
|
193
|
+
|
194
|
+
This will create the Shopify engine routes under the specified Subdirectory, as a result it will redirect new consumers to `/app-name/login` and following a similar format for the other engine routes.
|
195
|
+
|
196
|
+
To use named routes with the engine so that it can route between the application and the engine's routes it should be prefixed with `main_app` or `shopify_app`.
|
197
|
+
|
198
|
+
```ruby
|
199
|
+
main_app.login_path # For a named login route on the rails app.
|
200
|
+
|
201
|
+
shopify_app.login_path # For the shopify app store login route.
|
202
|
+
```
|
173
203
|
|
174
204
|
Managing Api Keys
|
175
205
|
-----------------
|
data/lib/shopify_app/version.rb
CHANGED
data/shopify_app.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.author = "Shopify"
|
9
9
|
s.summary = %q{This gem is used to get quickly started with the Shopify API}
|
10
10
|
|
11
|
-
s.required_ruby_version = ">= 2.2.
|
11
|
+
s.required_ruby_version = ">= 2.2.2"
|
12
12
|
|
13
13
|
s.add_runtime_dependency('rails', '>= 4.2.6')
|
14
14
|
s.add_runtime_dependency('shopify_api', '>= 4.2.2')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.1.
|
4
|
+
version: 7.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -206,7 +206,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
206
206
|
requirements:
|
207
207
|
- - ">="
|
208
208
|
- !ruby/object:Gem::Version
|
209
|
-
version: 2.2.
|
209
|
+
version: 2.2.2
|
210
210
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
211
|
requirements:
|
212
212
|
- - ">="
|