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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 757042f3426b3b4028621b925dd43bd09889dca84a3bcb1f8e045d22ed20ac3a
4
- data.tar.gz: db71036af35e5f10ee2c8b6465017620040e4a63bce149ccb6e6bc6d84db637f
3
+ metadata.gz: d68ae760210303ac3bd0ad7bf20c70c1d8110b4f21029d92acc7c9ecc161a134
4
+ data.tar.gz: 0f487172fdc9ad42578bdb62874700030638b30afdc3f5d4bce9e4129a338b24
5
5
  SHA512:
6
- metadata.gz: 226a90e784be8e6505f96323b7e215556427af3c9f3b5f7e6d960ccf490bb9322177c76715bc2976641320f5fdc97d59424cfe633046137752d73e658c06cb1c
7
- data.tar.gz: 5c59c0ccbc7318ada1e77e317f2b8255ca697badf907fcb63ea48c9ae236341945d3011632de95a889d3e2395cc44f83c7ae31d880dc3c3bd1080077ed820d73
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.
@@ -23,8 +23,9 @@ class AppTest < Minitest::Test
23
23
 
24
24
  def test_root_with_session
25
25
  set_session
26
- fake 'https://testshop.myshopify.com/admin/api/2019-04/shop.json', body: {myshopify_domain: @shop_name}.to_json
27
- fake 'https://testshop.myshopify.com/admin/api/2019-04/products.json?limit=10', body: '{}'
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: '2019-04')
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']
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'shopify-sinatra-app'
3
- s.version = '0.9.0'
3
+ s.version = '0.10.0'
4
4
 
5
5
  s.summary = 'A classy shopify app'
6
6
  s.description = 'A Sinatra extension for building Shopify Apps. Akin to the shopify_app gem but for Sinatra'
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.9.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-04 00:00:00.000000000 Z
11
+ date: 2020-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra