myjohndeere 0.1.10 → 0.1.11

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: 85c9cf159416765f5c525e3e4e6119136dbb8ae1
4
- data.tar.gz: 3ddf70f9ed6d0d946ac84cb4068fef45cea0f7ee
3
+ metadata.gz: 57a8f1036dd4fa52f819321aeb68a4cd568e3ce5
4
+ data.tar.gz: 6e93bbc89e82f737f583d4c7c271c4585065cffa
5
5
  SHA512:
6
- metadata.gz: 885a759f1c045cdd44b5f94c124df0dd829cddff1bdc49dd426d64834e4ad0c7286ea742e9fdcaf89b3fa6a36a01eada4e5a94eb6ddf85de30538df3bf394e85
7
- data.tar.gz: 7179b6fc006c3d48457006636f55baee1832c9484a052b24cefde94d0e73fa74822031925cae1e2ed28c7f3fb1ddac675cccb38ffe0fe002fd4cd60575fd8394
6
+ metadata.gz: 6435df5d90336a07773b90541fc72a0622c6570e6bcf172726bb6b68f511bba13ea42bc5f5670f75a564e1f04c7727804a9528c1a16203862afa7afb2fdbb580
7
+ data.tar.gz: c2a3be9fbe3f567d78f239d7fa45e1443bcd2b7dc609c0190c1f9c868224bfd3ca85f8b607a79cd768f446af110ef275c46d35c54ff0951c8aaba989dab4c081
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- myjohndeere (0.1.9)
5
- oauth (>= 0.5.3)
4
+ myjohndeere (0.1.10)
5
+ oauth (~> 0.5, >= 0.5.3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -61,7 +61,7 @@ module MyJohnDeere
61
61
  JSON_CONTENT_HEADER_VALUE = 'application/vnd.deere.axiom.v3+json'
62
62
  ENDPOINTS = {
63
63
  sandbox: "https://sandboxapi.deere.com/platform",
64
- production: "https://partnerapi.deere.com/platform"
64
+ production: "https://api.soa-proxy.deere.com/platform"
65
65
  }.freeze
66
66
  AUTHORIZE_URL = "https://my.deere.com/consentToUseOfData"
67
67
  DEFAULT_REQUEST_HEADER = { 'accept'=> JSON_CONTENT_HEADER_VALUE }.freeze
@@ -26,18 +26,19 @@ module MyJohnDeere
26
26
  def initialize(options = {})
27
27
  request_token_options = [:request_token_token, :request_token_secret, :verifier_code]
28
28
  oauth_token_options = [:oauth_access_token_token, :oauth_access_token_secret]
29
+ oauth_consumer = self.class.oauth_consumer(debug_output: options[:debug_output])
29
30
  if request_token_options.all? { |i| options.key?(i) } then
30
- request_token = OAuth::RequestToken.from_hash(self.class.oauth_consumer, {
31
+ request_token = OAuth::RequestToken.from_hash(oauth_consumer, {
31
32
  oauth_token: options[:request_token_token],
32
33
  oauth_token_secret: options[:request_token_secret]
33
34
  })
34
35
  self.oauth_access_token = request_token.get_access_token(oauth_verifier: options[:verifier_code])
35
36
  elsif oauth_token_options.all? { |i| options.key?(i) } then
36
37
  self.oauth_access_token = OAuth::AccessToken.from_hash(
37
- self.class.oauth_consumer,
38
+ oauth_consumer,
38
39
  {
39
40
  oauth_token: options[:oauth_access_token_token],
40
- oauth_token_secret: options[:oauth_access_token_secret]
41
+ oauth_token_secret: options[:oauth_access_token_secret],
41
42
  }
42
43
  )
43
44
  else
@@ -75,7 +75,7 @@ module MyJohnDeere
75
75
  return
76
76
  else
77
77
  error = error.new(
78
- http_status: code, http_body: body,
78
+ http_status: code, http_body: body,
79
79
  http_headers: headers)
80
80
  error.response = response
81
81
  raise error
@@ -1,3 +1,3 @@
1
1
  module MyJohnDeere
2
- VERSION = '0.1.10'
2
+ VERSION = '0.1.11'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myjohndeere
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Susmarski