shopify_api 4.1.1 → 4.2.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 +4 -4
- data/.travis.yml +3 -0
- data/CHANGELOG +4 -0
- data/Gemfile_ar50 +11 -0
- data/lib/shopify_api/resources/base.rb +1 -1
- data/lib/shopify_api/resources/tax_service.rb +4 -0
- data/lib/shopify_api/version.rb +1 -1
- data/test/base_test.rb +1 -1
- data/test/fixtures/tax_service.json +9 -0
- data/test/recurring_application_charge_test.rb +1 -1
- data/test/tax_service_test.rb +8 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a469a08bffed1215a271c451c89c0c2df287dce8
|
4
|
+
data.tar.gz: d3e501f6992c3eaf5318b9b15a31b30a4972b221
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be1d93b8ddf0cb35df0f89c968b3b3fbacf392fe4a50be88458f1afac5ab03531955da21ffaf3cc9b14edf9323ab05c5a635b35b7e922520a6457084f0eaa194
|
7
|
+
data.tar.gz: c9d4da93918d73615f59df1eb5174b992b2ac4ae5f58e29022ed11c0335b9fb98b83331bed09dd81e87483c6ac650371400d3467bf37b69bc6b3f9312ffd1708
|
data/.travis.yml
CHANGED
@@ -10,6 +10,7 @@ gemfile:
|
|
10
10
|
- Gemfile_ar31
|
11
11
|
- Gemfile_ar32
|
12
12
|
- Gemfile_ar40threadsafe
|
13
|
+
- Gemfile_ar42threadsafe
|
13
14
|
|
14
15
|
sudo: false
|
15
16
|
|
@@ -17,6 +18,8 @@ before_script: echo $OLD_RAKE
|
|
17
18
|
|
18
19
|
matrix:
|
19
20
|
include:
|
21
|
+
- rvm: 2.2.1
|
22
|
+
gemfile: Gemfile_ar50
|
20
23
|
- rvm: 1.9.2
|
21
24
|
gemfile: Gemfile_ar30
|
22
25
|
env: OLD_RAKE=1
|
data/CHANGELOG
CHANGED
data/Gemfile_ar50
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
gem 'activeresource', git: 'git://github.com/rails/activeresource', ref: 'c3cd2b535b7c5cdc12cc6a3c1e11be6c74ffa179'
|
6
|
+
|
7
|
+
gem 'minitest', "~> 5.1"
|
8
|
+
gem 'activesupport', github: 'rails/rails'
|
9
|
+
gem 'activemodel', github: 'rails/rails'
|
10
|
+
gem 'arel', github: 'rails/arel'
|
11
|
+
gem 'rails-observers', github: 'rails/rails-observers'
|
@@ -28,7 +28,7 @@ module ShopifyAPI
|
|
28
28
|
end
|
29
29
|
|
30
30
|
class << self
|
31
|
-
if ActiveResource::
|
31
|
+
if ActiveResource::Base.respond_to?(:_headers) && ActiveResource::Base.respond_to?(:_headers_defined?)
|
32
32
|
def headers
|
33
33
|
if _headers_defined?
|
34
34
|
_headers
|
data/lib/shopify_api/version.rb
CHANGED
data/test/base_test.rb
CHANGED
@@ -88,7 +88,7 @@ class BaseTest < Test::Unit::TestCase
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
-
if ActiveResource::VERSION::MAJOR >= 4 && ActiveResource::VERSION::PRE == "threadsafe"
|
91
|
+
if ActiveResource::VERSION::MAJOR >= 5 || (ActiveResource::VERSION::MAJOR >= 4 && ActiveResource::VERSION::PRE == "threadsafe")
|
92
92
|
test "#headers set in the main thread affect spawned threads" do
|
93
93
|
ShopifyAPI::Base.headers['X-Custom'] = "the value"
|
94
94
|
Thread.new do
|
@@ -137,7 +137,7 @@ class RecurringApplicationChargeTest < Test::Unit::TestCase
|
|
137
137
|
fake "recurring_application_charges", body: '{"errors":"Not Found"}', status: 404
|
138
138
|
|
139
139
|
all_application_charges = ShopifyAPI::RecurringApplicationCharge.all
|
140
|
-
if ActiveResource::VERSION::MAJOR >= 4 && ActiveResource::VERSION::MINOR >= 2
|
140
|
+
if ActiveResource::VERSION::MAJOR >= 5 || (ActiveResource::VERSION::MAJOR == 4 && ActiveResource::VERSION::MINOR >= 2)
|
141
141
|
assert_equal [], all_application_charges
|
142
142
|
else
|
143
143
|
assert_equal nil, all_application_charges
|
@@ -0,0 +1,8 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
class TaxServiceTest < Test::Unit::TestCase
|
3
|
+
test "tax service creation" do
|
4
|
+
fake "tax_services", :method => :post, :status => 202, :body => load_fixture('tax_service')
|
5
|
+
tax_service = ShopifyAPI::TaxService.create(:name => "My Tax Service", :url => "https://mytaxservice.com")
|
6
|
+
assert_equal '{"tax_service":{"name":"My Tax Service","url":"https://mytaxservice.com"}}', FakeWeb.last_request.body
|
7
|
+
end
|
8
|
+
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.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeresource
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- Gemfile_ar32
|
119
119
|
- Gemfile_ar40threadsafe
|
120
120
|
- Gemfile_ar42threadsafe
|
121
|
+
- Gemfile_ar50
|
121
122
|
- LICENSE
|
122
123
|
- README.md
|
123
124
|
- RELEASING
|
@@ -184,6 +185,7 @@ files:
|
|
184
185
|
- lib/shopify_api/resources/shop.rb
|
185
186
|
- lib/shopify_api/resources/smart_collection.rb
|
186
187
|
- lib/shopify_api/resources/tax_line.rb
|
188
|
+
- lib/shopify_api/resources/tax_service.rb
|
187
189
|
- lib/shopify_api/resources/theme.rb
|
188
190
|
- lib/shopify_api/resources/transaction.rb
|
189
191
|
- lib/shopify_api/resources/usage_charge.rb
|
@@ -245,6 +247,7 @@ files:
|
|
245
247
|
- test/fixtures/shipping_zones.json
|
246
248
|
- test/fixtures/shop.json
|
247
249
|
- test/fixtures/tags.json
|
250
|
+
- test/fixtures/tax_service.json
|
248
251
|
- test/fixtures/transaction.json
|
249
252
|
- test/fixtures/usage_charge.json
|
250
253
|
- test/fixtures/usage_charges.json
|
@@ -269,6 +272,7 @@ files:
|
|
269
272
|
- test/session_test.rb
|
270
273
|
- test/shipping_zone_test.rb
|
271
274
|
- test/shop_test.rb
|
275
|
+
- test/tax_service_test.rb
|
272
276
|
- test/test_helper.rb
|
273
277
|
- test/transaction_test.rb
|
274
278
|
- test/usage_charge_test.rb
|