persona-ruby 0.1.3 → 0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1590bdfbf51bbcfd8f40f2643b40de92c65c39c853352082beb9c0b7f07af092
4
- data.tar.gz: 3daade3dbc6bab7fee1e7effe55eeff3fb6801fd84a3c743e898fa7503d6fc21
3
+ metadata.gz: 16bfc46d0c71df47185c13049ca23a3d9fa9194d5d5719340edea459a70c2cf5
4
+ data.tar.gz: 5420682dd2b17248deb47a6edb9ad1def8a6722d72fea2c846f274f809e67336
5
5
  SHA512:
6
- metadata.gz: 8f2d61f1a579d3dcd2118bd0e0285f11a7d44fd4ac15938a954b3ddd495a61c52d93b16d12865f9911617a475f217b0f629a983e05a097bd19636cdf1c65bc53
7
- data.tar.gz: 8685bb614dd9b4c8e6d282dea2b47d4f707ec00eb97ddc6569d01e843da0c6b376324f47fdfcded770d4229170d86ca1be0440f06fad452dfd0ecad71ba42166
6
+ metadata.gz: df210c24e00bc3dc114f04d3ebb33f059a43224c9d65272c77e5e59ed92491b216e197698e54728e9656a1946a934c2e038373c5805584d1a60c9f95155e2e23
7
+ data.tar.gz: d457b0209bbf69e660a828f9d679eb272f311433594c5d172484c6af8ec727ff2aad69ae94ae8ceb60d6d568e408b1a200e58d53e76b106a8eb2551c7e191d78
data/Gemfile CHANGED
@@ -8,7 +8,7 @@ group :development, :test do
8
8
  gem "rake", "~> 13.0.6"
9
9
  gem "rspec", "~> 3.12.0"
10
10
  gem "rspec_junit_formatter", "~> 0.6.0"
11
- gem "rubocop", "~> 1.65.1"
11
+ gem "rubocop", "~> 1.69.2"
12
12
  gem "rubocop-rspec", "~> 3.0.4"
13
13
  gem "webmock", "~> 3.18.1"
14
14
  end
data/Gemfile.lock CHANGED
@@ -14,19 +14,19 @@ GEM
14
14
  faraday-net_http (3.1.0)
15
15
  net-http
16
16
  hashdiff (1.1.0)
17
- json (2.7.2)
17
+ json (2.9.1)
18
18
  language_server-protocol (3.17.0.3)
19
19
  net-http (0.4.1)
20
20
  uri
21
- parallel (1.26.2)
22
- parser (3.3.4.2)
21
+ parallel (1.26.3)
22
+ parser (3.3.6.0)
23
23
  ast (~> 2.4.1)
24
24
  racc
25
25
  public_suffix (5.0.5)
26
26
  racc (1.8.1)
27
27
  rainbow (3.1.1)
28
28
  rake (13.0.6)
29
- regexp_parser (2.9.2)
29
+ regexp_parser (2.10.0)
30
30
  rexml (3.3.8)
31
31
  rspec (3.12.0)
32
32
  rspec-core (~> 3.12.0)
@@ -43,23 +43,24 @@ GEM
43
43
  rspec-support (3.12.2)
44
44
  rspec_junit_formatter (0.6.0)
45
45
  rspec-core (>= 2, < 4, != 2.12.0)
46
- rubocop (1.65.1)
46
+ rubocop (1.69.2)
47
47
  json (~> 2.3)
48
48
  language_server-protocol (>= 3.17.0)
49
49
  parallel (~> 1.10)
50
50
  parser (>= 3.3.0.2)
51
51
  rainbow (>= 2.2.2, < 4.0)
52
- regexp_parser (>= 2.4, < 3.0)
53
- rexml (>= 3.2.5, < 4.0)
54
- rubocop-ast (>= 1.31.1, < 2.0)
52
+ regexp_parser (>= 2.9.3, < 3.0)
53
+ rubocop-ast (>= 1.36.2, < 2.0)
55
54
  ruby-progressbar (~> 1.7)
56
- unicode-display_width (>= 2.4.0, < 3.0)
57
- rubocop-ast (1.32.0)
55
+ unicode-display_width (>= 2.4.0, < 4.0)
56
+ rubocop-ast (1.37.0)
58
57
  parser (>= 3.3.1.0)
59
58
  rubocop-rspec (3.0.4)
60
59
  rubocop (~> 1.61)
61
60
  ruby-progressbar (1.13.0)
62
- unicode-display_width (2.5.0)
61
+ unicode-display_width (3.1.3)
62
+ unicode-emoji (~> 4.0, >= 4.0.4)
63
+ unicode-emoji (4.0.4)
63
64
  uri (0.13.0)
64
65
  webmock (3.18.1)
65
66
  addressable (>= 2.8.0)
@@ -75,7 +76,7 @@ DEPENDENCIES
75
76
  rake (~> 13.0.6)
76
77
  rspec (~> 3.12.0)
77
78
  rspec_junit_formatter (~> 0.6.0)
78
- rubocop (~> 1.65.1)
79
+ rubocop (~> 1.69.2)
79
80
  rubocop-rspec (~> 3.0.4)
80
81
  webmock (~> 3.18.1)
81
82
 
data/README.md CHANGED
@@ -30,6 +30,7 @@ Then you can create a Persona API client.
30
30
  ```ruby
31
31
  client = Persona::Client.new(
32
32
  access_token: 'access_token', # Access token from authorization flow
33
+ timeout: 30, # Optional setting for timeouts of all requests (default 60)
33
34
  )
34
35
  ```
35
36
 
@@ -7,13 +7,14 @@ module Persona
7
7
 
8
8
  BASE_URL = "https://withpersona.com/api/v1"
9
9
 
10
- def initialize(access_token:)
10
+ def initialize(access_token:, timeout: 60)
11
11
  @access_token = "Bearer #{access_token}"
12
- @url = BASE_URL
12
+ @timeout = timeout
13
+ @url = BASE_URL
13
14
  end
14
15
 
15
16
  def connection
16
- Connection.new(@url, @access_token)
17
+ Connection.new(@url, @access_token, timeout: @timeout)
17
18
  end
18
19
  end
19
20
  end
@@ -4,12 +4,13 @@ require "faraday"
4
4
 
5
5
  module Persona
6
6
  class Connection
7
- def initialize(url, auth_token)
7
+ def initialize(url, auth_token, options = { timeout: 60 })
8
8
  @connection = Faraday.new(url:) do |builder|
9
9
  builder.request :json
10
10
  builder.headers[:accept] = "application/json"
11
11
  builder.response :json
12
12
  builder.request :authorization, auth_token, ""
13
+ builder.options.timeout = options[:timeout]
13
14
  end
14
15
  end
15
16
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Persona
4
- VERSION = "0.1.3"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,20 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: persona-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ravi Trivedi
8
8
  - Stephen Tredger
9
- autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2024-10-01 00:00:00.000000000 Z
11
+ date: 2025-01-27 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: faraday
16
15
  requirement: !ruby/object:Gem::Requirement
17
16
  requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
18
20
  - - ">="
19
21
  - !ruby/object:Gem::Version
20
22
  version: 2.0.1
@@ -22,6 +24,9 @@ dependencies:
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
24
26
  requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '2.0'
25
30
  - - ">="
26
31
  - !ruby/object:Gem::Version
27
32
  version: 2.0.1
@@ -52,10 +57,8 @@ licenses:
52
57
  - MIT
53
58
  metadata:
54
59
  homepage_uri: https://github.com/riipen/persona-ruby
55
- source_code_uri: https://github.com/riipen/persona-ruby
56
60
  changelog_uri: https://github.com/riipen/persona-ruby/blob/master/CHANGELOG.md
57
61
  rubygems_mfa_required: 'true'
58
- post_install_message:
59
62
  rdoc_options: []
60
63
  require_paths:
61
64
  - lib
@@ -70,8 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
73
  - !ruby/object:Gem::Version
71
74
  version: '0'
72
75
  requirements: []
73
- rubygems_version: 3.5.11
74
- signing_key:
76
+ rubygems_version: 3.6.3
75
77
  specification_version: 4
76
78
  summary: An API client for Persona in ruby.
77
79
  test_files: []