shopify_app 11.0.2 → 11.1.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: 8f0170c03ef99e998f8f72f402e5030ff5a10bdbb2ab32c7a3256116491942cb
4
- data.tar.gz: fdbac9da84bd4154fbbfacbb99b3b2839514c6850a2ec9d118c431e7ac28d160
3
+ metadata.gz: 5efea1849894001dd33e89e8beaab22dc7630f383a263b1638b2e316478c4927
4
+ data.tar.gz: f6b8fb40731e82c83ebb57548814a9ea6aa5691691606c50fa986191b00f092f
5
5
  SHA512:
6
- metadata.gz: 6d5bbbeee0bd987e50845b1798de6114dc7921c186cfe371addc5530311dbb0d8332123302349e7ac85f711f6fc427f4992cf454622a0542b543a70705c140d5
7
- data.tar.gz: d80715be9995c0e9e0f732a269f77f3931794f84fc95689c1103ad785eaa675fd213f6b13af0f6e35bf7dbbfc23ee0c202cd5510ac3851367fe1fd2913cfd184
6
+ metadata.gz: 7d278a7a7dc385940cbfdaa832d7e05f69f31c5bb57ce007f0a776ed1d926682fb36f88de490b63d9208ccca50b39e30057c3c14d3056d80301fed95468484c4
7
+ data.tar.gz: ec1ebf4b962a4cfde1abf6d771caa0e7910ef04cbaade77961f97234799b3db4a21d799434bf20d12b3d00653b59f923871fe03d6132efa880d092d7f2ebb9be
@@ -1,3 +1,10 @@
1
+ 11.1.0
2
+ -----
3
+
4
+ * Add Webmock and Pry as development dependencies
5
+ * Update install generator to leverage updates to ShopifyAPI::ApiVersion add in v8.0.0 of the shopify_api gem [#790](https://github.com/Shopify/shopify_app/pull/790)
6
+
7
+
1
8
  11.0.2
2
9
  -----
3
10
 
data/README.md CHANGED
@@ -471,7 +471,7 @@ config.api_version = '2019-04'
471
471
 
472
472
  ### Session storage change
473
473
 
474
- You will need to add an `api_version` method to you session storage object. The default implmentation for this is.
474
+ You will need to add an `api_version` method to you session storage object. The default implementation for this is.
475
475
  ```ruby
476
476
  def api_version
477
477
  ShopifyApp.configuration.api_version
@@ -480,7 +480,7 @@ end
480
480
 
481
481
  ### Generated file change
482
482
 
483
- `embedded_app.html.erb` the useage of `shop_session.url` needs to be changed to `shop_session.domain`
483
+ `embedded_app.html.erb` the usage of `shop_session.url` needs to be changed to `shop_session.domain`
484
484
  ```erb
485
485
  <script type="text/javascript">
486
486
  ShopifyApp.init({
@@ -3,7 +3,6 @@ Releasing ShopifyApp
3
3
  1. Check the Semantic Versioning page for info on how to version the new release: http://semver.org
4
4
  2. Create a pull request with the following changes:
5
5
  * Update the version of ShopifyApp in lib/shopify_app/version.rb
6
- * Update the version in package.json, then run `npm install` to make sure the lock file gets updated
7
6
  * Add a CHANGELOG entry for the new release with the date
8
7
  * Change the title of the PR to something like: "Packaging for release X.Y.Z"
9
8
  3. Merge your pull request
@@ -9,7 +9,7 @@ module ShopifyApp
9
9
  class_option :application_name, type: :array, default: ['My', 'Shopify', 'App']
10
10
  class_option :scope, type: :array, default: ['read_products']
11
11
  class_option :embedded, type: :string, default: 'true'
12
- class_option :api_version, type: :string, default: ShopifyAPI::ApiVersion.latest_stable_version.to_s
12
+ class_option :api_version, type: :string, default: nil
13
13
 
14
14
  def add_dotenv_gem
15
15
  gem('dotenv-rails', group: [:test, :development])
@@ -18,7 +18,7 @@ module ShopifyApp
18
18
  def create_shopify_app_initializer
19
19
  @application_name = format_array_argument(options['application_name'])
20
20
  @scope = format_array_argument(options['scope'])
21
- @api_version = options['api_version']
21
+ @api_version = options['api_version'] || ShopifyAPI::Meta.admin_versions.find(&:latest_supported).handle
22
22
 
23
23
  template 'shopify_app.rb', 'config/initializers/shopify_app.rb'
24
24
  end
@@ -10,3 +10,6 @@ ShopifyApp.configure do |config|
10
10
  config.api_version = "<%= @api_version %>"
11
11
  config.session_repository = ShopifyApp::InMemorySessionStore
12
12
  end
13
+
14
+ # ShopifyApp::Utils.fetch_known_api_versions # Uncomment to fetch known api versions from shopify servers on boot
15
+ # ShopifyAPI::ApiVersion.version_lookup_mode = :raise_on_unknown # Uncomment to raise an error if attempting to use an api version that was not previously known
@@ -12,5 +12,12 @@ module ShopifyApp
12
12
  nil
13
13
  end
14
14
 
15
+ def self.fetch_known_api_versions
16
+ Rails.logger.info("[ShopifyAPI::ApiVersion] Fetching known Admin API Versions from Shopify...")
17
+ ShopifyAPI::ApiVersion.fetch_known_versions
18
+ Rails.logger.info("[ShopifyAPI::ApiVersion] Known API Versions: #{ShopifyAPI::ApiVersion.versions.keys}")
19
+ rescue ActiveResource::ConnectionError
20
+ logger.error( "[ShopifyAPI::ApiVersion] Unable to fetch api_versions from Shopify")
21
+ end
15
22
  end
16
23
  end
@@ -1,3 +1,3 @@
1
1
  module ShopifyApp
2
- VERSION = '11.0.2'.freeze
2
+ VERSION = '11.1.0'.freeze
3
3
  end
@@ -12,14 +12,16 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.add_runtime_dependency('browser_sniffer', '~> 1.1.2')
14
14
  s.add_runtime_dependency('rails', '> 5.2.1')
15
- s.add_runtime_dependency('shopify_api', '~> 7.0')
15
+ s.add_runtime_dependency('shopify_api', '~> 8.0')
16
16
  s.add_runtime_dependency('omniauth-shopify-oauth2', '~> 2.1.0')
17
17
 
18
18
  s.add_development_dependency('rake')
19
19
  s.add_development_dependency('byebug')
20
+ s.add_development_dependency('pry')
20
21
  s.add_development_dependency('sqlite3', '~> 1.4')
21
22
  s.add_development_dependency('minitest')
22
23
  s.add_development_dependency('mocha')
24
+ s.add_development_dependency('webmock')
23
25
 
24
26
  s.files = `git ls-files`.split("\n").reject { |f| f.match(%r{^(test|example)/}) }
25
27
  s.test_files = `git ls-files -- {test}/*`.split("\n")
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: 11.0.2
4
+ version: 11.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-04 00:00:00.000000000 Z
11
+ date: 2019-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser_sniffer
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '7.0'
47
+ version: '8.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '7.0'
54
+ version: '8.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: omniauth-shopify-oauth2
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: sqlite3
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +150,20 @@ dependencies:
136
150
  - - ">="
137
151
  - !ruby/object:Gem::Version
138
152
  version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: webmock
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
139
167
  description:
140
168
  email:
141
169
  executables: []