psu_identity 0.7.1 → 0.7.3
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/.circleci/config.yml +1 -9
- data/Gemfile +1 -1
- data/Gemfile.lock +4 -4
- data/README.md +0 -2
- data/lib/psu_identity/search_service/client.rb +4 -11
- data/lib/psu_identity/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3653840903617d714a70a95805887fb2062a15510e97ccb3de660eee21643502
|
|
4
|
+
data.tar.gz: 740f098fb5bf194e8dd9388724e0d1160743bb2a99e7f676c2ce9c925dff885e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7eea2ef93f7691c727bedc026f8251f52823184f990e89d2e7aedc191118e2c22ccc7e51d27e06b028161537133ba3ee5b59d519bcede6b3cb3ccda5e754b75
|
|
7
|
+
data.tar.gz: dadf821b0e09fcc966fac54c732bbd641b5c1af426c300dd336ff398177436a3ae1fe671509596e2546a871fa93b386500d16549bf38e72a2dfc0972f61d5f87
|
data/.circleci/config.yml
CHANGED
|
@@ -24,12 +24,6 @@ jobs:
|
|
|
24
24
|
name: "Bundle Install"
|
|
25
25
|
command: bundle install
|
|
26
26
|
|
|
27
|
-
- run:
|
|
28
|
-
name: Setup Code Climate test-reporter
|
|
29
|
-
command: |
|
|
30
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > bin/cc-test-reporter
|
|
31
|
-
chmod +x bin/cc-test-reporter
|
|
32
|
-
|
|
33
27
|
- run:
|
|
34
28
|
name: "Rubocop"
|
|
35
29
|
command: bundle exec rubocop
|
|
@@ -39,7 +33,5 @@ jobs:
|
|
|
39
33
|
command: |
|
|
40
34
|
export PSU_ID_OAUTH_CLIENT_ID=foo
|
|
41
35
|
export PSU_ID_OAUTH_CLIENT_SECRET=bar
|
|
42
|
-
RAILS_ENV=test bundle exec rspec
|
|
43
|
-
bin/cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.json coverage/.resultset.json &&
|
|
44
|
-
bin/cc-test-reporter upload-coverage
|
|
36
|
+
RAILS_ENV=test bundle exec rspec
|
|
45
37
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
psu_identity (0.7.
|
|
4
|
+
psu_identity (0.7.3)
|
|
5
5
|
faraday (~> 2.0)
|
|
6
6
|
json
|
|
7
7
|
oauth2
|
|
@@ -60,11 +60,11 @@ GEM
|
|
|
60
60
|
pry (>= 0.13, < 0.15)
|
|
61
61
|
public_suffix (6.0.1)
|
|
62
62
|
racc (1.8.1)
|
|
63
|
-
rack (3.
|
|
63
|
+
rack (3.2.4)
|
|
64
64
|
rainbow (3.1.1)
|
|
65
65
|
rake (13.2.1)
|
|
66
66
|
regexp_parser (2.10.0)
|
|
67
|
-
rexml (3.4.
|
|
67
|
+
rexml (3.4.4)
|
|
68
68
|
rspec (3.13.0)
|
|
69
69
|
rspec-core (~> 3.13.0)
|
|
70
70
|
rspec-expectations (~> 3.13.0)
|
|
@@ -133,7 +133,7 @@ DEPENDENCIES
|
|
|
133
133
|
rubocop (~> 1.72)
|
|
134
134
|
rubocop-performance (~> 1.24)
|
|
135
135
|
rubocop-rspec (~> 3.5)
|
|
136
|
-
simplecov
|
|
136
|
+
simplecov
|
|
137
137
|
vcr (~> 6.1)
|
|
138
138
|
webmock (~> 3.18)
|
|
139
139
|
|
data/README.md
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
[](https://circleci.com/gh/psu-libraries/psu_identity)
|
|
2
|
-
[](https://codeclimate.com/github/psu-libraries/psu_identity/maintainability)
|
|
3
|
-
[](https://codeclimate.com/github/psu-libraries/psu_identity/test_coverage)
|
|
4
2
|
|
|
5
3
|
# PsuIdentity
|
|
6
4
|
|
|
@@ -1,29 +1,22 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# @abstract Client for querying Penn State's identity API: https://
|
|
3
|
+
# @abstract Client for querying Penn State's identity API: https://search-service.k8s.psu.edu/
|
|
4
4
|
module PsuIdentity::SearchService
|
|
5
5
|
class Error < StandardError; end
|
|
6
6
|
|
|
7
7
|
class NotFound < StandardError; end
|
|
8
8
|
|
|
9
9
|
class Client
|
|
10
|
-
attr_reader :base_url
|
|
11
|
-
|
|
12
|
-
# @param [String] base_url
|
|
13
|
-
def initialize(base_url: '/search-service/resources')
|
|
14
|
-
@base_url = base_url
|
|
15
|
-
end
|
|
16
|
-
|
|
17
10
|
# @param [Hash] args of options to pass to the endpoint
|
|
18
11
|
# @option args [String] :text to search for
|
|
19
12
|
def search(**args)
|
|
20
|
-
process_response connection.get(
|
|
13
|
+
process_response connection.get('/people', args)
|
|
21
14
|
end
|
|
22
15
|
|
|
23
16
|
# @param [Hash] args of options to pass to the endpoint
|
|
24
17
|
# @option args [String] :userid of the person
|
|
25
18
|
def userid(userid)
|
|
26
|
-
process_userid_response connection.get("
|
|
19
|
+
process_userid_response connection.get("/people/userid/#{userid}")
|
|
27
20
|
end
|
|
28
21
|
|
|
29
22
|
private
|
|
@@ -54,7 +47,7 @@ module PsuIdentity::SearchService
|
|
|
54
47
|
end
|
|
55
48
|
|
|
56
49
|
def endpoint
|
|
57
|
-
@endpoint ||= ENV.fetch('IDENTITY_ENDPOINT', 'https://
|
|
50
|
+
@endpoint ||= ENV.fetch('IDENTITY_ENDPOINT', 'https://search-service.k8s.psu.edu')
|
|
58
51
|
end
|
|
59
52
|
end
|
|
60
53
|
end
|
data/lib/psu_identity/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: psu_identity
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Kiessling
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-11-17 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: faraday
|