bigcommerce-oauth-api 1.3.1 → 1.3.2

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: a1a0e31229838f81aa7e93e785746dde6b43f3ac
4
- data.tar.gz: a66f263203fe56638f3814856412c5bb87f7c4a0
3
+ metadata.gz: 75787d5311705ef1dc2959615900806588650813
4
+ data.tar.gz: 0220bf99f82590445b75d1c7486663c24186bbab
5
5
  SHA512:
6
- metadata.gz: 5cb22a670c1cfcabfe2717f8dd52d4e286c6b22a5297d075b1e647a33ca469687771cd2eb190ebd2321d2b3aa07ba0b0b4aa86e1c443926515591577fca8b975
7
- data.tar.gz: eee2a8791766ca4fc830532c31bad2ffff5d3b3f36765f6b111200426fe25554164c6b8f710559426094ec37700d4c712f12dd9a376aa382e4c196a40fc3145c
6
+ metadata.gz: b93b0f562c53505273ae9d3057385ffee21090d920032c38f6fed8ac46e476c6d12ece7cd0b73153dd597eba72a40e050ab3cc8dd36c0290d68a390401cfd2a9
7
+ data.tar.gz: 0c84e1610a355f2e09e2318e1c8d069016725a2ae99ece2c65ba20864d2407c9de4b23d1e335e8f89e4875a5b26f0d5e248da940bea795bef13fd1cec535d4b1
@@ -1,3 +1,10 @@
1
+ ### 1.3.2 (2016-01-14)
2
+
3
+ Bugfixes:
4
+
5
+ - enable BigcommerceOAuthAPI::Resource to marshal correctly.
6
+ - add missing 'include_all' option on BigcommerceOAuthAPI::Resource#respond_to?.
7
+
1
8
  ### 1.3.1 (2015-11-29)
2
9
 
3
10
  Bugfixes:
@@ -3,7 +3,7 @@ require File.expand_path('../lib/bigcommerce-oauth-api/version', __FILE__)
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'bigcommerce-oauth-api'
5
5
  s.version = BigcommerceOAuthAPI::VERSION.dup
6
- s.date = '2015-11-29'
6
+ s.date = '2016-01-14'
7
7
  s.summary = "Ruby client library for Bigcommerce APIs with OAuth and basic authentication support"
8
8
  s.description = "Connect Ruby applications to Bigcommerce APIs through OAuth or basic authentication"
9
9
  s.authors = ["Christian Orthmann"]
@@ -23,4 +23,4 @@ Gem::Specification.new do |s|
23
23
  s.add_runtime_dependency('faraday', '~> 0')
24
24
  s.add_runtime_dependency('faraday_middleware', '~> 0')
25
25
  s.add_runtime_dependency('activesupport', '>= 3.0.0', '< 5.0.0')
26
- end
26
+ end
@@ -22,8 +22,8 @@ module BigcommerceOAuthAPI
22
22
  self == other
23
23
  end
24
24
 
25
- def respond_to?(method_name)
26
- super(method_name) ? true : @attributes.include?(method_name.to_s.gsub(/(\?$)|(=$)/, '').to_sym)
25
+ def respond_to?(method_name, include_all = false)
26
+ super(method_name, include_all) ? true : @attributes.include?(method_name.to_s.gsub(/(\?$)|(=$)/, '').to_sym)
27
27
  end
28
28
 
29
29
  def to_h
@@ -52,6 +52,14 @@ module BigcommerceOAuthAPI
52
52
  end"
53
53
  end
54
54
 
55
+ def marshal_dump
56
+ {}.merge(@attributes.to_h)
57
+ end
58
+
59
+ def marshal_load(attributes)
60
+ send :initialize, attributes
61
+ end
62
+
55
63
  private
56
64
 
57
65
  def memoize(name, &block)
@@ -1,3 +1,3 @@
1
1
  module BigcommerceOAuthAPI
2
- VERSION = '1.3.1'.freeze
2
+ VERSION = '1.3.2'.freeze
3
3
  end
@@ -38,6 +38,17 @@ module BigcommerceOAuthAPI
38
38
  expect(instance['a']['b']['c']['d']).to eql('e')
39
39
  expect(instance.a.b.c.d).to eql('e')
40
40
  end
41
+
42
+ describe '#marshal_dump' do
43
+ it 'can load a marshal dump correctly' do
44
+ dump = Marshal.dump(instance)
45
+ expect(dump).to be_a String
46
+ loaded_object = Marshal.load(dump)
47
+ expect(loaded_object).to_not be_a String
48
+ expect(loaded_object).to be_a BigcommerceOAuthAPI::Resource
49
+ expect(loaded_object.a.b.c.d).to eql('e')
50
+ end
51
+ end
41
52
  end
42
53
  end
43
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigcommerce-oauth-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Orthmann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-29 00:00:00.000000000 Z
11
+ date: 2016-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake