shopify_api 4.2.2 → 4.3.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
  SHA1:
3
- metadata.gz: 0fdce8306a9014e8357e21815c44369596dd94f1
4
- data.tar.gz: a5554efc1f1c6b34a7129fc4db40c923c400bee9
3
+ metadata.gz: df0d9072de811f85dcd0a3c8dd778d36d32571c3
4
+ data.tar.gz: 35fcf37d798c2cc92cc960e0bafeeb2514482d15
5
5
  SHA512:
6
- metadata.gz: 47c47ae9baa73dfea72a4dc9fc1bb185dedbd53c346070a6a5b9ec65e4fba0938f5ebd668a2d9bcea0dd92bd976ed6a627d34076267dfac2795ec62ad41e644e
7
- data.tar.gz: 356e392df148854efde592234cd09e9505ea4b954c54cf1a978c4797b01768abd1be4c26bb14b72c62765b8514f393ed1b574b97cf874e14c7881bf650e06912
6
+ metadata.gz: be971202041dd157e278b3d40920d6c4e37a6dad77b0e1f5dce89c4a1ec14238a609c129ce1c19e0780543b0363527361d7b4908b079d38abec29784845791fb
7
+ data.tar.gz: 735562487217f0bd86fe5c430dfc08bf258c1c0cba3f0d1da18ea4c0bcb783c96f8dda78baa4cd7b16caf59c980f3e7b0141d7cbe39baef537fbb944ac6da411
@@ -1,31 +1,32 @@
1
1
  language: ruby
2
+ sudo: false
2
3
 
3
4
  rvm:
4
- - 2.0.0
5
- - 1.9.3
5
+ - 2.3.1
6
+ - 2.4.0-preview1
6
7
 
7
8
  gemfile:
8
9
  - Gemfile
9
10
  - Gemfile_ar30
10
11
  - Gemfile_ar31
11
12
  - Gemfile_ar32
12
- - Gemfile_ar40threadsafe
13
- - Gemfile_ar42threadsafe
14
-
15
- sudo: false
16
-
17
- before_script: echo $OLD_RAKE
13
+ - Gemfile_ar40
14
+ - Gemfile_ar_master
18
15
 
19
16
  matrix:
20
- include:
21
- - rvm: 2.2.1
22
- gemfile: Gemfile_ar50
23
- - rvm: 1.9.2
17
+ fast_finish: true
18
+ allow_failures:
19
+ - rvm: 2.4.0-preview1
20
+ gemfile: Gemfile
21
+ - rvm: 2.4.0-preview1
24
22
  gemfile: Gemfile_ar30
25
- env: OLD_RAKE=1
26
- - rvm: 1.9.2
23
+ - rvm: 2.4.0-preview1
27
24
  gemfile: Gemfile_ar31
28
- env: OLD_RAKE=1
29
- - rvm: 1.9.2
25
+ - rvm: 2.4.0-preview1
30
26
  gemfile: Gemfile_ar32
31
- env: OLD_RAKE=1
27
+ - rvm: 2.4.0-preview1
28
+ gemfile: Gemfile_ar40
29
+ - rvm: 2.4.0-preview1
30
+ gemfile: Gemfile_ar_master
31
+ - rvm: 2.3.1
32
+ gemfile: Gemfile_ar_master
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ == Version 4.3.0
2
+
3
+ * Require Ruby >= `2.3.0`
4
+ * Use inheritance instead of the deprecated Rails `Module#alias_method_chain`
5
+
1
6
  == Version 4.2.2
2
7
 
3
8
  * Support for AccessToken#delegate endpoint
data/Gemfile CHANGED
@@ -2,6 +2,4 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem "activeresource", '~> 4.0.0'
6
-
7
- gem 'minitest', "~> 4.2"
5
+ gem "activeresource", "~> 4.1"
@@ -3,7 +3,3 @@ source "https://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  gem "activeresource", "~> 3.0.0"
6
-
7
- if ENV['OLD_RAKE'] == '1'
8
- gem "rake", "~> 0.9.2"
9
- end
@@ -3,8 +3,3 @@ source "https://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  gem "activeresource", "~> 3.1.0"
6
-
7
- if ENV['OLD_RAKE'] == '1'
8
- gem "rake", "~> 0.9.2"
9
- gem "i18n", "~> 0.6.11"
10
- end
@@ -3,8 +3,3 @@ source "https://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  gem "activeresource", "~> 3.2.0"
6
-
7
- if ENV['OLD_RAKE'] == '1'
8
- gem "rake", "~> 0.9.2"
9
- gem "i18n", "~> 0.6.11"
10
- end
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem "activeresource", "4.0.0"
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem 'activeresource', git: 'git://github.com/rails/activeresource'
data/README.md CHANGED
@@ -16,6 +16,10 @@ All API usage happens through Shopify applications, created by either shop owner
16
16
 
17
17
  For more information and detailed documentation about the API visit http://api.shopify.com
18
18
 
19
+ #### Ruby version
20
+
21
+ This gem requires Ruby 2.3.1 as of version 4.3. If you need to use an older Ruby version then update your `Gemfile` to lock onto an older release than 4.3.
22
+
19
23
  ### Installation
20
24
 
21
25
  To easily install or upgrade to the latest release, use [gem](http://rubygems.org/)
@@ -188,16 +192,9 @@ gem install shopify_cli
188
192
 
189
193
  ## Threadsafety
190
194
 
191
- ActiveResource is inherently non-threadsafe, because class variables like ActiveResource::Base.site and ActiveResource::Base.headers are shared between threads. This can cause conflicts when using threaded libraries, like Sidekiq.
192
-
193
- We have a forked version of ActiveResource that stores these class variables in threadlocal variables. Using this forked version will allow ShopifyAPI to be used in a threaded environment.
195
+ ActiveResource is threadsafe as of version 4.1 (which works with Rails 4.x and above).
194
196
 
195
- To enable threadsafety with ShopifyAPI, add the following to your Gemfile. There are various threadsafe tags that you can use, [depending on which version of rails you are using](https://github.com/shopify/activeresource/tags).
196
-
197
- ```
198
- gem 'activeresource', git: 'git://github.com/Shopify/activeresource', tag: '4.2-threadsafe'
199
- gem 'shopify_api', '>= 3.2.1'
200
- ```
197
+ If you were previously using Shopify's [activeresource fork](https://github.com/shopify/activeresource) then you should remove it and use ActiveResource 4.1.
201
198
 
202
199
  ## Using Development Version
203
200
 
data/Rakefile CHANGED
@@ -1,5 +1,3 @@
1
- # encoding: UTF-8
2
- require 'rubygems'
3
1
  require 'rake'
4
2
  require "bundler/gem_tasks"
5
3
 
@@ -23,7 +21,6 @@ rescue LoadError
23
21
  end
24
22
  end
25
23
 
26
-
27
24
  task :default => :test
28
25
 
29
26
  require 'rdoc/task'
@@ -1,31 +1,32 @@
1
- require 'active_support/core_ext/module/aliasing'
2
-
3
1
  module ActiveResource
4
2
  class Connection
5
-
6
3
  attr_reader :response
7
4
 
8
- def handle_response_with_response_capture(response)
9
- @response = handle_response_without_response_capture(response)
5
+ module ResponseCapture
6
+ def handle_response(response)
7
+ @response = super
8
+ end
10
9
  end
11
10
 
12
- def request_with_detailed_log_subscriber(method, path, *arguments)
13
- result = request_without_detailed_log_subscriber(method, path, *arguments)
14
- detailed_log_subscriber(result, arguments)
15
- result
16
- rescue => e
17
- detailed_log_subscriber(e.response, arguments) if e.respond_to?(:response)
18
- raise
19
- end
11
+ module RequestNotification
12
+ def request(method, path, *arguments)
13
+ super.tap do |response|
14
+ notify_about_request(response, arguments)
15
+ end
16
+ rescue => e
17
+ notify_about_request(e.response, arguments) if e.respond_to?(:response)
18
+ raise
19
+ end
20
20
 
21
- def detailed_log_subscriber(response, arguments)
22
- ActiveSupport::Notifications.instrument("request.active_resource_detailed") do |payload|
23
- payload[:response] = response
24
- payload[:data] = arguments
21
+ def notify_about_request(response, arguments)
22
+ ActiveSupport::Notifications.instrument("request.active_resource_detailed") do |payload|
23
+ payload[:response] = response
24
+ payload[:data] = arguments
25
+ end
25
26
  end
26
27
  end
27
28
 
28
- alias_method_chain :handle_response, :response_capture
29
- alias_method_chain :request, :detailed_log_subscriber
29
+ prepend ResponseCapture
30
+ prepend RequestNotification
30
31
  end
31
32
  end
@@ -1,3 +1,3 @@
1
1
  module ShopifyAPI
2
- VERSION = "4.2.2"
2
+ VERSION = "4.3.0"
3
3
  end
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  $:.push File.expand_path("../lib", __FILE__)
3
2
  require "shopify_api/version"
4
3
 
@@ -22,20 +21,15 @@ Gem::Specification.new do |s|
22
21
 
23
22
  s.rdoc_options = ["--charset=UTF-8"]
24
23
  s.summary = %q{ShopifyAPI is a lightweight gem for accessing the Shopify admin REST web services}
25
- s.license = 'MIT'
24
+ s.license = "MIT"
26
25
 
27
- s.add_dependency("activeresource")
28
- s.add_dependency("rack")
26
+ s.required_ruby_version = ">= 2.3"
29
27
 
30
- dev_dependencies = [['mocha', '>= 0.9.8'],
31
- ['fakeweb'],
32
- ['minitest', '~> 4.0'],
33
- ['rake']
34
- ]
28
+ s.add_runtime_dependency("activeresource", ">= 3.0.0")
29
+ s.add_runtime_dependency("rack")
35
30
 
36
- if s.respond_to?(:add_development_dependency)
37
- dev_dependencies.each { |dep| s.add_development_dependency(*dep) }
38
- else
39
- dev_dependencies.each { |dep| s.add_dependency(*dep) }
40
- end
31
+ s.add_development_dependency("mocha", ">= 0.9.8")
32
+ s.add_development_dependency("fakeweb")
33
+ s.add_development_dependency("minitest", ">= 4.0")
34
+ s.add_development_dependency("rake")
41
35
  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.2
4
+ version: 4.3.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-05-30 00:00:00.000000000 Z
11
+ date: 2016-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 3.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 3.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -70,14 +70,14 @@ dependencies:
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '4.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '4.0'
83
83
  - !ruby/object:Gem::Dependency
@@ -116,9 +116,8 @@ files:
116
116
  - Gemfile_ar30
117
117
  - Gemfile_ar31
118
118
  - Gemfile_ar32
119
- - Gemfile_ar40threadsafe
120
- - Gemfile_ar42threadsafe
121
- - Gemfile_ar50
119
+ - Gemfile_ar40
120
+ - Gemfile_ar_master
122
121
  - LICENSE
123
122
  - README.md
124
123
  - RELEASING
@@ -316,7 +315,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
316
315
  requirements:
317
316
  - - ">="
318
317
  - !ruby/object:Gem::Version
319
- version: '0'
318
+ version: '2.3'
320
319
  required_rubygems_version: !ruby/object:Gem::Requirement
321
320
  requirements:
322
321
  - - ">="
@@ -1,7 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'activeresource', :git => 'git://github.com/Shopify/activeresource', tag: '4.0-threadsafe'
6
-
7
- gem 'minitest', "~> 4.2"
@@ -1,7 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'activeresource', :git => 'git://github.com/Shopify/activeresource', tag: '4.2-threadsafe'
6
-
7
- gem 'minitest', "~> 4.2"
@@ -1,11 +0,0 @@
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'