shopify_api 4.2.1 → 4.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/shopify_api/resources/access_token.rb +8 -0
- data/lib/shopify_api/version.rb +1 -1
- data/test/access_token_test.rb +19 -0
- data/test/fixtures/access_token_delegate.json +4 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fdce8306a9014e8357e21815c44369596dd94f1
|
4
|
+
data.tar.gz: a5554efc1f1c6b34a7129fc4db40c923c400bee9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47c47ae9baa73dfea72a4dc9fc1bb185dedbd53c346070a6a5b9ec65e4fba0938f5ebd668a2d9bcea0dd92bd976ed6a627d34076267dfac2795ec62ad41e644e
|
7
|
+
data.tar.gz: 356e392df148854efde592234cd09e9505ea4b954c54cf1a978c4797b01768abd1be4c26bb14b72c62765b8514f393ed1b574b97cf874e14c7881bf650e06912
|
data/CHANGELOG
CHANGED
data/lib/shopify_api/version.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class AccessTokenTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def test_delegate_access_token
|
6
|
+
fake "access_tokens/delegate.json?delegate_access_scope%5B%5D=write_orders&" \
|
7
|
+
"delegate_access_scope%5B%5D=read_products&expires_in=",
|
8
|
+
method: :post,
|
9
|
+
status: 201,
|
10
|
+
body: load_fixture('access_token_delegate'),
|
11
|
+
extension: false
|
12
|
+
|
13
|
+
delegate_scope = ['write_orders', 'read_products']
|
14
|
+
token = ShopifyAPI::AccessToken.delegate(delegate_scope)
|
15
|
+
|
16
|
+
assert_equal 'abracadabra', token.access_token
|
17
|
+
assert_equal 'write_orders,read_products', token.scope
|
18
|
+
end
|
19
|
+
end
|
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: 4.2.
|
4
|
+
version: 4.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeresource
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- lib/shopify_api/limits.rb
|
138
138
|
- lib/shopify_api/metafields.rb
|
139
139
|
- lib/shopify_api/resources.rb
|
140
|
+
- lib/shopify_api/resources/access_token.rb
|
140
141
|
- lib/shopify_api/resources/address.rb
|
141
142
|
- lib/shopify_api/resources/announcement.rb
|
142
143
|
- lib/shopify_api/resources/application_charge.rb
|
@@ -198,6 +199,7 @@ files:
|
|
198
199
|
- lib/shopify_api/version.rb
|
199
200
|
- shipit.rubygems.yml
|
200
201
|
- shopify_api.gemspec
|
202
|
+
- test/access_token_test.rb
|
201
203
|
- test/active_resource/json_errors_test.rb
|
202
204
|
- test/application_charge_test.rb
|
203
205
|
- test/article_test.rb
|
@@ -213,6 +215,7 @@ files:
|
|
213
215
|
- test/customer_test.rb
|
214
216
|
- test/detailed_log_subscriber_test.rb
|
215
217
|
- test/discount_test.rb
|
218
|
+
- test/fixtures/access_token_delegate.json
|
216
219
|
- test/fixtures/application_charge.json
|
217
220
|
- test/fixtures/application_charges.json
|
218
221
|
- test/fixtures/article.json
|