shopify-sinatra-app 0.9.0 → 0.10.0
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/CHANGELOG +8 -0
- data/example/test/app_test.rb +3 -2
- data/lib/sinatra/shopify-sinatra-app.rb +2 -1
- data/shopify-sinatra-app.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d68ae760210303ac3bd0ad7bf20c70c1d8110b4f21029d92acc7c9ecc161a134
|
|
4
|
+
data.tar.gz: 0f487172fdc9ad42578bdb62874700030638b30afdc3f5d4bce9e4129a338b24
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff866c8290a9e1eab32318b57c23993407719c5b1ebf55d6ce1b71fab46131fbf1bf3c6dac9dca44c7b47db4a07c670bfdcaeb93e76515f6805f1591d466b8a7
|
|
7
|
+
data.tar.gz: b6aed2da7b46c490596f615790607576e55556adbb7d33ca299a5a1a2cea021b47ee4073ca39de835ac7084e5e55886b22538896bd979b425dfb6ef16b17b43c
|
data/CHANGELOG
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
0.10.0
|
|
2
|
+
------
|
|
3
|
+
* Add the api_version to settings and update to 2019-07
|
|
4
|
+
|
|
5
|
+
0.9.0
|
|
6
|
+
-----
|
|
7
|
+
* set secure and and same_site options on the session cookie. Fixes auth with the upcoming chrome 80 release
|
|
8
|
+
|
|
1
9
|
0.8.0
|
|
2
10
|
-----
|
|
3
11
|
* Shopify updated the way sessions are created: https://github.com/Shopify/shopify_api/blob/master/README.md#-breaking-change-notice-for-version-700-, updating code to reflect these changes.
|
data/example/test/app_test.rb
CHANGED
|
@@ -23,8 +23,9 @@ class AppTest < Minitest::Test
|
|
|
23
23
|
|
|
24
24
|
def test_root_with_session
|
|
25
25
|
set_session
|
|
26
|
-
|
|
27
|
-
fake
|
|
26
|
+
api_url = "https://testshop.myshopify.com/admin/api/#{app.settings.api_version}"
|
|
27
|
+
fake "#{api_url}/shop.json", body: {myshopify_domain: @shop_name}.to_json
|
|
28
|
+
fake "#{api_url}/products.json?limit=10", body: '{}'
|
|
28
29
|
get '/'
|
|
29
30
|
assert last_response.ok?
|
|
30
31
|
end
|
|
@@ -83,7 +83,7 @@ module Sinatra
|
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
def activate_shopify_api(shop_name, token)
|
|
86
|
-
api_session = ShopifyAPI::Session.new(domain: shop_name, token: token, api_version:
|
|
86
|
+
api_session = ShopifyAPI::Session.new(domain: shop_name, token: token, api_version: settings.api_version)
|
|
87
87
|
ShopifyAPI::Base.activate_session(api_session)
|
|
88
88
|
end
|
|
89
89
|
|
|
@@ -167,6 +167,7 @@ module Sinatra
|
|
|
167
167
|
app.enable :sessions
|
|
168
168
|
app.enable :inline_templates
|
|
169
169
|
|
|
170
|
+
app.set :api_version, '2019-07'
|
|
170
171
|
app.set :scope, 'read_products, read_orders'
|
|
171
172
|
|
|
172
173
|
app.set :api_key, ENV['SHOPIFY_API_KEY']
|
data/shopify-sinatra-app.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shopify-sinatra-app
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kevin Hughes
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-02-
|
|
11
|
+
date: 2020-02-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sinatra
|