persona-ruby 0.1.4 → 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 +4 -4
- data/README.md +1 -0
- data/lib/persona-ruby/client.rb +4 -3
- data/lib/persona-ruby/connection.rb +2 -1
- data/lib/persona-ruby/version.rb +1 -1
- metadata +3 -7
- data/persona-ruby-0.1.3.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16bfc46d0c71df47185c13049ca23a3d9fa9194d5d5719340edea459a70c2cf5
|
4
|
+
data.tar.gz: 5420682dd2b17248deb47a6edb9ad1def8a6722d72fea2c846f274f809e67336
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df210c24e00bc3dc114f04d3ebb33f059a43224c9d65272c77e5e59ed92491b216e197698e54728e9656a1946a934c2e038373c5805584d1a60c9f95155e2e23
|
7
|
+
data.tar.gz: d457b0209bbf69e660a828f9d679eb272f311433594c5d172484c6af8ec727ff2aad69ae94ae8ceb60d6d568e408b1a200e58d53e76b106a8eb2551c7e191d78
|
data/README.md
CHANGED
data/lib/persona-ruby/client.rb
CHANGED
@@ -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
|
-
@
|
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
|
|
data/lib/persona-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: persona-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
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: 2025-01-
|
11
|
+
date: 2025-01-27 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: faraday
|
@@ -53,7 +52,6 @@ files:
|
|
53
52
|
- lib/persona-ruby/connection.rb
|
54
53
|
- lib/persona-ruby/error.rb
|
55
54
|
- lib/persona-ruby/version.rb
|
56
|
-
- persona-ruby-0.1.3.gem
|
57
55
|
homepage: https://github.com/riipen/persona-ruby
|
58
56
|
licenses:
|
59
57
|
- MIT
|
@@ -61,7 +59,6 @@ metadata:
|
|
61
59
|
homepage_uri: https://github.com/riipen/persona-ruby
|
62
60
|
changelog_uri: https://github.com/riipen/persona-ruby/blob/master/CHANGELOG.md
|
63
61
|
rubygems_mfa_required: 'true'
|
64
|
-
post_install_message:
|
65
62
|
rdoc_options: []
|
66
63
|
require_paths:
|
67
64
|
- lib
|
@@ -76,8 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
73
|
- !ruby/object:Gem::Version
|
77
74
|
version: '0'
|
78
75
|
requirements: []
|
79
|
-
rubygems_version: 3.
|
80
|
-
signing_key:
|
76
|
+
rubygems_version: 3.6.3
|
81
77
|
specification_version: 4
|
82
78
|
summary: An API client for Persona in ruby.
|
83
79
|
test_files: []
|
data/persona-ruby-0.1.3.gem
DELETED
Binary file
|