psu_identity 0.1.1 → 0.1.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 +4 -4
- data/.circleci/config.yml +17 -1
- data/Gemfile +4 -0
- data/Gemfile.lock +31 -1
- data/README.md +24 -4
- data/lib/penn_state/search_service/client.rb +1 -0
- data/psu_identity.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d3f87c3035f20409f1987d81d696940fc0a017400da2f83041ff291e35601b3
|
4
|
+
data.tar.gz: 0d23bb5ef092eca44bcf89e1bf94896a627415dcd0e6eb48385d6f794b9cf60a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5dfcae9ca3c8a9682a1230404faef7d4b63e50c1e4e9e951986f158d8362290477493470a3c4bd1cc6836d3bb6e53cc2ce6661269bd8defa53d30982f36415b
|
7
|
+
data.tar.gz: 764530285679ed547889f7012bd63c413fc308c5cbd19d4290dcaffc0735101cc2666386b66a84b3cac25e9e92fffdb52a517492ed1c4ee52e74784f37a16247
|
data/.circleci/config.yml
CHANGED
@@ -22,6 +22,22 @@ jobs:
|
|
22
22
|
# An orb function for bundling
|
23
23
|
- ruby/bundle-install
|
24
24
|
|
25
|
+
- run:
|
26
|
+
name: Setup Code Climate test-reporter
|
27
|
+
command: |
|
28
|
+
# download test reporter as a static binary
|
29
|
+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > bin/cc-test-reporter
|
30
|
+
chmod +x bin/cc-test-reporter
|
31
|
+
|
32
|
+
# TODO Remove quotes when rubocop fixes are made
|
33
|
+
# - run:
|
34
|
+
# name: "Rubocop"
|
35
|
+
# command: |
|
36
|
+
# bundle exec rubocop
|
37
|
+
|
25
38
|
- run:
|
26
39
|
name: "Rspec"
|
27
|
-
command:
|
40
|
+
command: |
|
41
|
+
RAILS_ENV=test bundle exec rspec &&
|
42
|
+
bin/cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.json coverage/.resultset.json &&
|
43
|
+
bin/cc-test-reporter upload-coverage
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,22 +1,31 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
psu_identity (0.1.
|
4
|
+
psu_identity (0.1.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
addressable (2.7.0)
|
10
10
|
public_suffix (>= 2.0.2, < 5.0)
|
11
|
+
ast (2.4.0)
|
11
12
|
crack (0.4.3)
|
12
13
|
safe_yaml (~> 1.0.0)
|
13
14
|
diff-lcs (1.3)
|
15
|
+
docile (1.3.2)
|
14
16
|
faraday (0.17.3)
|
15
17
|
multipart-post (>= 1.2, < 3)
|
16
18
|
hashdiff (1.0.1)
|
19
|
+
json (2.3.0)
|
17
20
|
multipart-post (2.1.1)
|
21
|
+
parallel (1.19.1)
|
22
|
+
parser (2.7.1.3)
|
23
|
+
ast (~> 2.4.0)
|
18
24
|
public_suffix (4.0.4)
|
25
|
+
rainbow (3.0.0)
|
19
26
|
rake (12.3.3)
|
27
|
+
regexp_parser (1.7.0)
|
28
|
+
rexml (3.2.4)
|
20
29
|
rspec (3.9.0)
|
21
30
|
rspec-core (~> 3.9.0)
|
22
31
|
rspec-expectations (~> 3.9.0)
|
@@ -33,7 +42,25 @@ GEM
|
|
33
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
34
43
|
rspec-support (~> 3.9.0)
|
35
44
|
rspec-support (3.9.3)
|
45
|
+
rubocop (0.85.0)
|
46
|
+
parallel (~> 1.10)
|
47
|
+
parser (>= 2.7.0.1)
|
48
|
+
rainbow (>= 2.2.2, < 4.0)
|
49
|
+
regexp_parser (>= 1.7)
|
50
|
+
rexml
|
51
|
+
rubocop-ast (>= 0.0.3)
|
52
|
+
ruby-progressbar (~> 1.7)
|
53
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
54
|
+
rubocop-ast (0.0.3)
|
55
|
+
parser (>= 2.7.0.1)
|
56
|
+
ruby-progressbar (1.10.1)
|
36
57
|
safe_yaml (1.0.5)
|
58
|
+
simplecov (0.17.0)
|
59
|
+
docile (~> 1.1)
|
60
|
+
json (>= 1.8, < 3)
|
61
|
+
simplecov-html (~> 0.10.0)
|
62
|
+
simplecov-html (0.10.2)
|
63
|
+
unicode-display_width (1.7.0)
|
37
64
|
vcr (5.1.0)
|
38
65
|
webmock (3.8.3)
|
39
66
|
addressable (>= 2.3.6)
|
@@ -45,10 +72,13 @@ PLATFORMS
|
|
45
72
|
|
46
73
|
DEPENDENCIES
|
47
74
|
faraday (~> 0.17.0)
|
75
|
+
json
|
48
76
|
psu_identity!
|
49
77
|
rake (~> 12.0)
|
50
78
|
rspec (~> 3.0)
|
51
79
|
rspec-its
|
80
|
+
rubocop (~> 0.0)
|
81
|
+
simplecov (= 0.17)
|
52
82
|
vcr
|
53
83
|
webmock
|
54
84
|
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
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)
|
2
4
|
|
3
|
-
|
5
|
+
# PsuIdentity
|
4
6
|
|
5
|
-
|
7
|
+
A wrapper for Penn State's search service API.
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
@@ -22,7 +24,25 @@ Or install it yourself as:
|
|
22
24
|
|
23
25
|
## Usage
|
24
26
|
|
25
|
-
|
27
|
+
Add this to the top of your code:
|
28
|
+
|
29
|
+
require 'penn_state/search_service'
|
30
|
+
|
31
|
+
To query the search service by name:
|
32
|
+
|
33
|
+
# Takes a hash as parameter with 'text:' as the key
|
34
|
+
|
35
|
+
PennState::SearchService::Client.new.search(text: 'Jimmy Tester')
|
36
|
+
|
37
|
+
***This will return an array of PennState::SearchService::Person objects matching the query***
|
38
|
+
|
39
|
+
To query the search service by userid:
|
40
|
+
|
41
|
+
# Takes a string as a parameter
|
42
|
+
|
43
|
+
PennState::SearchService::Client.new.userid('abc123')
|
44
|
+
|
45
|
+
***This will return a single PennState::SearchService::Person object matching the query***
|
26
46
|
|
27
47
|
## Development
|
28
48
|
|
data/psu_identity.gemspec
CHANGED