help_scout-sdk 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fde4d41133056de55106a9908c925633544fe8a0f888794ed88dd3eff5502985
4
- data.tar.gz: 25e7ad5dcdb45e4d24744bcb72a06a46588cc0712d4eed9e2990246ad3bb625a
3
+ metadata.gz: 4f99c317fac88d6b07729a5a730c26ae64af24ec1ea94eb194c83f9a49c6bfa0
4
+ data.tar.gz: 5e7ccef0d2293c93b9c9622de7caca137456f3ccdaa5521add45a08e0a19b916
5
5
  SHA512:
6
- metadata.gz: f25c0927c1bdde7e99f7b9be29734978a99d39dba10cc3143a2ef6968fe4456713670709805888c69cb44a2b961deb8e3f8c5d5218f0afbb27d4357cacee80a8
7
- data.tar.gz: b94698d0faf4d31672d5434b26ed4e2a3025a55b846db3512d458ab1176bcf45b0f5adbfcc68030e6428472bc5ef9cbf864a5923350d160d81b42c1c9d28d0be
6
+ metadata.gz: 592babfac0e434ea33a7f6066d26ee9b83a700ee1bbfd7c699a5ed3386384016a191714e31a7e6bd0853dc5ed6a8a4cc2947655ecd8254834bebf163dd0c387d
7
+ data.tar.gz: 82b191e5922303d0398b5164f1f50d5a7fa1b488e2647338ad4b7475f629cbe760f00fe970a8b2fa75614c5bb1ab91a46b968b86ad677c2d7c34cedca4f50570
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.email = ['support@taxjar.com']
12
12
 
13
13
  spec.summary = 'Ruby Help Scout SDK'
14
- spec.description = 'Ruby Help Scout (aka HelpScout) SDK.'
14
+ spec.description = 'Ruby Help Scout (aka HelpScout) SDK, using Mailbox API v2.0'
15
15
  spec.homepage = 'https://github.com/taxjar/help_scout-sdk'
16
16
  spec.license = 'MIT'
17
17
 
@@ -31,18 +31,19 @@ module HelpScout
31
31
  end
32
32
 
33
33
  attr_accessor :invalid
34
- attr_reader :expires_in, :value
34
+ attr_reader :expires_at, :expires_in, :value
35
35
 
36
36
  def initialize(params)
37
37
  @value = params[:access_token]
38
38
  @expires_in = params[:expires_in]
39
- end
39
+ return unless @expires_in
40
40
 
41
- def expires_at
42
- @_expires_at ||= Time.now.utc + expires_in
41
+ @expires_at = Time.now.utc + expires_in
43
42
  end
44
43
 
45
44
  def expired?
45
+ return false unless expires_at
46
+
46
47
  Time.now.utc > expires_at
47
48
  end
48
49
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HelpScout
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: help_scout-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - TaxJar
@@ -212,7 +212,7 @@ dependencies:
212
212
  - - "~>"
213
213
  - !ruby/object:Gem::Version
214
214
  version: '3.3'
215
- description: Ruby Help Scout (aka HelpScout) SDK.
215
+ description: Ruby Help Scout (aka HelpScout) SDK, using Mailbox API v2.0
216
216
  email:
217
217
  - support@taxjar.com
218
218
  executables: []