shopify_api 7.0.0 → 7.0.1

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: d45434390ab4152c9a33eafcd9757ef46c16372f3ad2dee6b918e0a6260ccc26
4
- data.tar.gz: 552c1cb7a7d72c654e0f5c8fafa909a9a5cb9690e02ff689b1d4f29f9f31d530
3
+ metadata.gz: 7f6c202f9c29838510495d77a8414965c76387dec57557eca68d1221150fea05
4
+ data.tar.gz: 62d74d1bd36f35fe1c53256dca2906564bb583e2d1bea0d80cb342a496c64b2d
5
5
  SHA512:
6
- metadata.gz: 59f9e5a631f1c9f13d6078636f11480ac711338fecab5caa1a47f5368f11a97514884eb9c42b007e13ad5f1ee8313e0f94c2a3eff7d17a5a3732cc9bea5edc54
7
- data.tar.gz: e42b188914ca14ee80f0c3307ca1847ee2cfc0bac22c3cb7c6a4c8a1a0bfd3e41fc46d00deb21348ccef764cb3be97e656b8edc25734cd9a1bee28794842e371
6
+ metadata.gz: 3ada5c8a355c109ac3ceef1dcb3aca833da26946ebfb3a4543356efc7bfbab6a1fe7c3de301b36785e5683f2c968fb210c441840881bc8265bcf507216ded6de
7
+ data.tar.gz: 6f0a5c32d25075e25eaed02bc6cfc78a1001ef2dadd8620978bd6ec5c7be5421bead11d8376216171f319a8315f431f16176f2f2f56997de8e4c8abf8642b5a5
@@ -1,3 +1,7 @@
1
+ == Version 7.0.1
2
+
3
+ * Support passing version string to `ShopifyAPI::Base.api_version` [#563](https://github.com/Shopify/shopify_api/pull/563)
4
+
1
5
  == Version 7.0.0
2
6
 
3
7
  * Removed support for `ActiveResouce` < `4.1`.
data/README.md CHANGED
@@ -22,7 +22,7 @@ ShopifyAPI::Session.new(domain, token, extras)
22
22
  ```
23
23
  is now
24
24
  ```ruby
25
- ShopifyAPI::Session.new(domain: domain, token: token, api_verison: api_verison, extras: extras)
25
+ ShopifyAPI::Session.new(domain: domain, token: token, api_version: api_version, extras: extras)
26
26
  ```
27
27
  Note `extras` is still optional the other arguments are required.
28
28
 
@@ -33,7 +33,7 @@ end
33
33
  ```
34
34
  is now
35
35
  ```ruby
36
- ShopifyAPI::Session.temp(domain: domain, token: token, api_verison: api_verison) do
36
+ ShopifyAPI::Session.temp(domain: domain, token: token, api_version: api_version) do
37
37
  ...
38
38
  end
39
39
  ```
@@ -42,11 +42,11 @@ The `api_version` attribute can take the string or symbol name of any known vers
42
42
 
43
43
  For example if you want to use the `2019-04` version you would create a session like this:
44
44
  ```ruby
45
- session = ShopifyAPI::Session.new(domain: domain, token: token, api_verison: '2019-04')
45
+ session = ShopifyAPI::Session.new(domain: domain, token: token, api_version: '2019-04')
46
46
  ```
47
47
  if you want to use the `unstable` version you would create a session like this:
48
48
  ```ruby
49
- session = ShopifyAPI::Session.new(domain: domain, token: token, api_verison: :unstable)
49
+ session = ShopifyAPI::Session.new(domain: domain, token: token, api_version: :unstable)
50
50
  ```
51
51
 
52
52
  ### Changes to how to define resources
@@ -87,9 +87,9 @@ end
87
87
  ### URLs that have not changed
88
88
 
89
89
  - OAuth URLs for `authorize`, getting the `access_token` from a code, `access_scopes`, and using a `refresh_token` have _not_ changed.
90
- - get: `/admin/oauth/authorize.json`
91
- - post: `/admin/oauth/access_token.json`
92
- - get: `/admin/oauth/access_scopes.json`
90
+ - get: `/admin/oauth/authorize`
91
+ - post: `/admin/oauth/access_token`
92
+ - get: `/admin/oauth/access_scopes`
93
93
  - URLs for the merchant’s web admin have _not_ changed. For example: to send the merchant to the product page the url is still `/admin/product/<id>`
94
94
 
95
95
  ## Usage
@@ -134,7 +134,7 @@ ShopifyAPI uses ActiveResource to communicate with the REST web service. ActiveR
134
134
  ```ruby
135
135
  shop_url = "https://#{API_KEY}:#{PASSWORD}@#{SHOP_NAME}.myshopify.com"
136
136
  ShopifyAPI::Base.site = shop_url
137
- ShopifyAPI::Base.api_verison = '<version_name>' # find the latest stable api_version [here](https://help.shopify.com/api/versioning)
137
+ ShopifyAPI::Base.api_version = '<version_name>' # find the latest stable api_version [here](https://help.shopify.com/api/versioning)
138
138
  ```
139
139
 
140
140
  That's it, you're done, skip to step 6 and start using the API!
@@ -76,8 +76,8 @@ module ShopifyAPI
76
76
  end
77
77
  end
78
78
 
79
- def api_version=(value)
80
- self._api_version = value
79
+ def api_version=(version)
80
+ self._api_version = version.nil? ? nil : ApiVersion.coerce_to_version(version)
81
81
  end
82
82
 
83
83
  def prefix(options = {})
@@ -1,3 +1,3 @@
1
1
  module ShopifyAPI
2
- VERSION = "7.0.0"
2
+ VERSION = "7.0.1"
3
3
  end
@@ -157,6 +157,11 @@ class BaseTest < Test::Unit::TestCase
157
157
  assert_equal 2, ShopifyAPI::Shop.current.id
158
158
  end
159
159
 
160
+ test "#api_version should set ApiVersion" do
161
+ ShopifyAPI::Base.api_version = '2019-04'
162
+ assert_equal '2019-04', ShopifyAPI::Base.api_version.to_s
163
+ end
164
+
160
165
  def clear_header(header)
161
166
  [ActiveResource::Base, ShopifyAPI::Base, ShopifyAPI::Product].each do |klass|
162
167
  klass.headers.delete(header)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-09 00:00:00.000000000 Z
11
+ date: 2019-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -188,7 +188,7 @@ files:
188
188
  - ".gitignore"
189
189
  - ".rubocop.yml"
190
190
  - ".travis.yml"
191
- - CHANGELOG
191
+ - CHANGELOG.md
192
192
  - CONTRIBUTING.md
193
193
  - CONTRIBUTORS
194
194
  - Gemfile