Skip to content

Commit

Permalink
Merge branch 'main' into backport-webhook-kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
minichate committed Jul 6, 2022
2 parents 15462b2 + 422742d commit 3924651
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Ruby ${{ matrix.version }}
strategy:
matrix:
version: ['2.6', '2.7', '3.0']
version: ['2.7', '3.0']

steps:
- uses: actions/checkout@v2
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
PATH
remote: .
specs:
shopify_app (19.1.0)
shopify_app (20.0.0)
activeresource
browser_sniffer (~> 2.0)
jwt (>= 2.2.3)
rails (> 5.2.1)
redirect_safely (~> 1.0)
shopify_api (~> 10.0)
shopify_api (~> 11.0)
sprockets-rails (>= 2.0.0)

GEM
Expand Down Expand Up @@ -124,7 +124,7 @@ GEM
nokogiri (1.13.4)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
oj (3.13.14)
oj (3.13.15)
openssl (3.0.0)
parallel (1.21.0)
parser (3.1.0.0)
Expand Down Expand Up @@ -194,7 +194,7 @@ GEM
rubocop (~> 1.24)
ruby-progressbar (1.11.0)
securerandom (0.2.0)
shopify_api (10.1.0)
shopify_api (11.0.0)
concurrent-ruby
hash_diff
httparty
Expand All @@ -204,8 +204,8 @@ GEM
securerandom
sorbet-runtime
zeitwerk (~> 2.5)
sorbet-runtime (0.5.10101)
sprockets (4.0.3)
sorbet-runtime (0.5.10139)
sprockets (4.1.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.4.2)
Expand All @@ -224,7 +224,7 @@ GEM
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.5.4)
zeitwerk (2.6.0)

PLATFORMS
ruby
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

[gem]: https://img.shields.io/gem/v/shopify_app.svg
[gem_url]: https://rubygems.org/gems/shopify_app
[supported_rails_version]: https://img.shields.io/badge/rails-%3C6.2.0-orange

This gem builds Rails applications that can be embedded in the Shopify Admin.

Expand Down
10 changes: 0 additions & 10 deletions app/assets/javascripts/shopify_app/app_bridge_2.0.12.js

This file was deleted.

10 changes: 10 additions & 0 deletions app/assets/javascripts/shopify_app/app_bridge_3.1.1.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/javascripts/shopify_app/app_bridge_redirect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//= require ./app_bridge_2.0.12.js
//= require ./app_bridge_3.1.1.js

(function(window) {
function appBridgeRedirect(url) {
Expand Down

Large diffs are not rendered by default.

14 changes: 6 additions & 8 deletions app/assets/javascripts/shopify_app/redirect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//= require ./app_bridge_redirect.js
//= require ./app_bridge_utils_3.1.1.js

(function () {
function redirect() {
Expand All @@ -10,15 +11,12 @@

var targetInfo = JSON.parse(redirectTargetElement.dataset.target);

if (window.top == window.self) {
// If the current window is the 'parent', change the URL by setting location.href
window.top.location.href = targetInfo.url;
} else {
// If the current window is the 'child' or embedded, change the parent's URL with
// App Bridge redirect. This case can happen when an app updates its access scopes,
// or the unlikely scenario where the shop thinks the app is installed, but the
// app does not have an record for the shop.
var appBridgeUtils = window['app-bridge-utils'];

if (appBridgeUtils.isShopifyEmbedded()) {
window.appBridgeRedirect(targetInfo.url);
} else {
window.top.location.href = targetInfo.url;
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/Releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
1. Checkout and pull from master so you have the latest version of the shopify_app
1. Tag the HEAD with the version
```bash
$ git tag -f vX.Y.Z && git push --tags --force
$ git tag -f vX.Y.Z && git push origin vX.Y.Z
```
1. Check that Create Release workflow successfully runs
1. Use Shipit to build and push the gem
Expand Down
2 changes: 1 addition & 1 deletion lib/shopify_app/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ShopifyApp
VERSION = "19.1.0"
VERSION = "20.0.0"
end
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shopify_app",
"version": "19.1.0",
"version": "20.0.0",
"repository": "git@github.com:Shopify/shopify_app.git",
"author": "Shopify",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions shopify_app.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |s|
s.author = "Shopify"
s.summary = "This gem is used to get quickly started with the Shopify API"

s.required_ruby_version = ">= 2.6"
s.required_ruby_version = ">= 2.7"

s.metadata["allowed_push_host"] = "https://rubygems.org"

Expand All @@ -19,7 +19,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency("jwt", ">= 2.2.3")
s.add_runtime_dependency("rails", "> 5.2.1")
s.add_runtime_dependency("redirect_safely", "~> 1.0")
s.add_runtime_dependency("shopify_api", "~> 10.0")
s.add_runtime_dependency("shopify_api", "~> 11.0")
s.add_runtime_dependency("sprockets-rails", ">= 2.0.0")

s.add_development_dependency("byebug")
Expand Down

0 comments on commit 3924651

Please sign in to comment.