psu_identity 0.1.2 → 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/.circleci/config.yml +3 -6
- data/.niftany/layout.yml +60 -0
- data/.niftany/lint.yml +110 -0
- data/.niftany/metrics.yml +45 -0
- data/.niftany/naming.yml +29 -0
- data/.niftany/niftany_rubocop_rspec.yml +47 -0
- data/.niftany/performance.yml +50 -0
- data/.niftany/style.yml +326 -0
- data/.rubocop.yml +19 -0
- data/.rubocop_todo.yml +8 -0
- data/.ruby-version +1 -0
- data/Gemfile +3 -17
- data/Gemfile.lock +79 -45
- data/README.md +5 -5
- data/Rakefile +5 -3
- data/bin/console +4 -3
- data/lib/{penn_state → psu_identity}/search_service/atomic_link.rb +1 -2
- data/lib/psu_identity/search_service/client.rb +58 -0
- data/lib/{penn_state → psu_identity}/search_service/person.rb +2 -2
- data/lib/psu_identity/version.rb +3 -1
- data/lib/psu_identity.rb +9 -2
- data/psu_identity.gemspec +27 -11
- metadata +189 -13
- data/lib/penn_state/search_service/client.rb +0 -60
- data/lib/penn_state/search_service.rb +0 -9
- data/lib/penn_state.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 966588c90dc49ec36a80dbe6a87be12ec1e0e1704bcb0003a589df8ca611d163
|
4
|
+
data.tar.gz: b4acb81f410cdd7e7d447e25445cfcfcf723d7869699fe1dcc749fda941ee5ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2baa7fd39e55976737bd94f6f4bfc17b23667dfa80defe36e1bd2d071b2a10c672d46ef14d1756adce98c9e145bfebe79c2670bcb38e8e1d3275943d6d07836f
|
7
|
+
data.tar.gz: 51e7b779c3cfb6d1d5466090f0eb9c312f890e1a15474a94d539e8211439d6189528b4a27a8da6a694e289370d2117d711ce85ff7764f6915edf74f8eb84f893
|
data/.circleci/config.yml
CHANGED
@@ -25,15 +25,12 @@ jobs:
|
|
25
25
|
- run:
|
26
26
|
name: Setup Code Climate test-reporter
|
27
27
|
command: |
|
28
|
-
# download test reporter as a static binary
|
29
28
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > bin/cc-test-reporter
|
30
29
|
chmod +x bin/cc-test-reporter
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
# command: |
|
36
|
-
# bundle exec rubocop
|
31
|
+
- run:
|
32
|
+
name: "Rubocop"
|
33
|
+
command: bundle exec rubocop
|
37
34
|
|
38
35
|
- run:
|
39
36
|
name: "Rspec"
|
data/.niftany/layout.yml
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
---
|
2
|
+
Layout/ParameterAlignment:
|
3
|
+
Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
|
4
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
Layout/DotPosition:
|
8
|
+
Description: 'Checks the position of the dot in multi-line method calls.'
|
9
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
|
10
|
+
EnforcedStyle: leading
|
11
|
+
|
12
|
+
Layout/ExtraSpacing:
|
13
|
+
Description: 'Do not use unnecessary spacing.'
|
14
|
+
Enabled: true
|
15
|
+
|
16
|
+
Layout/MultilineOperationIndentation:
|
17
|
+
Description: >-
|
18
|
+
Checks indentation of binary operations that span more than
|
19
|
+
one line.
|
20
|
+
Enabled: true
|
21
|
+
EnforcedStyle: indented
|
22
|
+
|
23
|
+
Layout/MultilineMethodCallIndentation:
|
24
|
+
Description: >-
|
25
|
+
Checks indentation of method calls with the dot operator
|
26
|
+
that span more than one line.
|
27
|
+
Enabled: true
|
28
|
+
EnforcedStyle: indented
|
29
|
+
|
30
|
+
Layout/InitialIndentation:
|
31
|
+
Description: >-
|
32
|
+
Checks the indentation of the first non-blank non-comment line in a file.
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
Layout/ConditionPosition:
|
36
|
+
Description: >-
|
37
|
+
Checks for condition placed in a confusing position relative to
|
38
|
+
the keyword.
|
39
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
Layout/IndentationConsistency:
|
43
|
+
Description: 'Checks for inconsistent indentation.'
|
44
|
+
EnforcedStyle: indented_internal_methods
|
45
|
+
|
46
|
+
Layout/MultilineBlockLayout:
|
47
|
+
Description: 'Checks whether the multiline do end blocks have a newline after the start of the block.'
|
48
|
+
Enabled: true
|
49
|
+
|
50
|
+
Layout/LineLength:
|
51
|
+
Description: 'Limit lines to 120 characters.'
|
52
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
|
53
|
+
Enabled: true
|
54
|
+
Max: 120
|
55
|
+
|
56
|
+
Layout/SpaceAroundMethodCallOperator:
|
57
|
+
Enabled: true
|
58
|
+
|
59
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
60
|
+
Enabled: true
|
data/.niftany/lint.yml
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
---
|
2
|
+
Lint/AmbiguousOperator:
|
3
|
+
Description: >-
|
4
|
+
Checks for ambiguous operators in the first argument of a
|
5
|
+
method invocation without parentheses.
|
6
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
|
7
|
+
Enabled: false
|
8
|
+
|
9
|
+
Lint/AmbiguousRegexpLiteral:
|
10
|
+
Description: >-
|
11
|
+
Checks for ambiguous regexp literals in the first argument of
|
12
|
+
a method invocation without parenthesis.
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Lint/AssignmentInCondition:
|
16
|
+
Description: "Don't use assignment in conditions."
|
17
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Lint/CircularArgumentReference:
|
21
|
+
Description: "Don't refer to the keyword argument in the default value."
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Lint/DeprecatedClassMethods:
|
25
|
+
Description: 'Check for deprecated class method calls.'
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Lint/DuplicateHashKey:
|
29
|
+
Description: 'Check for duplicate keys in hash literals.'
|
30
|
+
Enabled: true
|
31
|
+
|
32
|
+
Lint/EachWithObjectArgument:
|
33
|
+
Description: 'Check for immutable argument given to each_with_object.'
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
Lint/ElseLayout:
|
37
|
+
Description: 'Check for odd code arrangement in an else block.'
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
Lint/FormatParameterMismatch:
|
41
|
+
Description: 'The number of parameters to format/sprint must match the fields.'
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Lint/SuppressedException:
|
45
|
+
Description: "Don't suppress exception."
|
46
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
Lint/LiteralAsCondition:
|
50
|
+
Description: 'Checks of literals used in conditions.'
|
51
|
+
Enabled: true
|
52
|
+
|
53
|
+
Lint/LiteralInInterpolation:
|
54
|
+
Description: 'Checks for literals used in interpolation.'
|
55
|
+
Enabled: false
|
56
|
+
|
57
|
+
Lint/Loop:
|
58
|
+
Description: >-
|
59
|
+
Use Kernel#loop with break rather than begin/end/until or
|
60
|
+
begin/end/while for post-loop tests.
|
61
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
Lint/NestedMethodDefinition:
|
65
|
+
Description: 'Do not use nested method definitions.'
|
66
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
Lint/NonLocalExitFromIterator:
|
70
|
+
Description: 'Do not use return in iterator to cause non-local exit.'
|
71
|
+
Enabled: false
|
72
|
+
|
73
|
+
Lint/ParenthesesAsGroupedExpression:
|
74
|
+
Description: >-
|
75
|
+
Checks for method calls with a space before the opening
|
76
|
+
parenthesis.
|
77
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
78
|
+
Enabled: false
|
79
|
+
|
80
|
+
Lint/RequireParentheses:
|
81
|
+
Description: >-
|
82
|
+
Use parentheses in the method call to avoid confusion
|
83
|
+
about precedence.
|
84
|
+
Enabled: false
|
85
|
+
|
86
|
+
Lint/UnderscorePrefixedVariableName:
|
87
|
+
Description: 'Do not use prefix `_` for a variable that is used.'
|
88
|
+
Enabled: false
|
89
|
+
|
90
|
+
Lint/Void:
|
91
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
92
|
+
Enabled: false
|
93
|
+
|
94
|
+
Lint/FlipFlop:
|
95
|
+
Description: 'Checks for flip flops'
|
96
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
|
97
|
+
Enabled: false
|
98
|
+
|
99
|
+
Lint/UselessAssignment:
|
100
|
+
Description: >-
|
101
|
+
Checks for every useless assignment to local variable in every scope.
|
102
|
+
The basic idea for this cop was from the warning of `ruby -cw`:'
|
103
|
+
Enabled: true
|
104
|
+
|
105
|
+
Lint/RaiseException:
|
106
|
+
Description: 'This cop checks for raise or fail statements which are raising Exception class.'
|
107
|
+
Enabled: true
|
108
|
+
|
109
|
+
Lint/StructNewOverride:
|
110
|
+
Enabled: true
|
@@ -0,0 +1,45 @@
|
|
1
|
+
---
|
2
|
+
Metrics/BlockLength:
|
3
|
+
Exclude:
|
4
|
+
- 'spec/**/*'
|
5
|
+
|
6
|
+
Metrics/BlockNesting:
|
7
|
+
Description: 'Avoid excessive block nesting'
|
8
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
Metrics/ClassLength:
|
12
|
+
Description: 'Avoid classes longer than 100 lines of code.'
|
13
|
+
Enabled: true
|
14
|
+
|
15
|
+
Metrics/ModuleLength:
|
16
|
+
Description: 'Avoid modules longer than 100 lines of code.'
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
Metrics/AbcSize:
|
20
|
+
Description: >-
|
21
|
+
A calculated magnitude based on number of assignments,
|
22
|
+
branches, and conditions.
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Metrics/CyclomaticComplexity:
|
26
|
+
Description: >-
|
27
|
+
A complexity metric that is strongly correlated to the number
|
28
|
+
of test cases needed to validate a method.
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
Metrics/PerceivedComplexity:
|
32
|
+
Description: >-
|
33
|
+
This cop tries to produce a complexity score that's a measure of the complexity
|
34
|
+
the reader experiences when looking at a method
|
35
|
+
Enabled: true
|
36
|
+
|
37
|
+
Metrics/MethodLength:
|
38
|
+
Description: 'Avoid methods longer than 10 lines of code.'
|
39
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
Metrics/ParameterLists:
|
43
|
+
Description: 'Avoid parameter lists longer than three or four parameters.'
|
44
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
|
45
|
+
Enabled: false
|
data/.niftany/naming.yml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
---
|
2
|
+
Naming/AccessorMethodName:
|
3
|
+
Description: Check the naming of accessor methods for get_/set_.
|
4
|
+
Enabled: true
|
5
|
+
|
6
|
+
Naming/AsciiIdentifiers:
|
7
|
+
Description: 'Use only ascii symbols in identifiers.'
|
8
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
Naming/FileName:
|
12
|
+
Description: 'Use snake_case for source file names.'
|
13
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Naming/BinaryOperatorParameterName:
|
17
|
+
Description: 'When defining binary operators, name the argument other.'
|
18
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
Naming/PredicateName:
|
22
|
+
Description: 'Check the names of predicate methods.'
|
23
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
|
24
|
+
ForbiddenPrefixes:
|
25
|
+
- is_
|
26
|
+
|
27
|
+
Naming/VariableName:
|
28
|
+
Description: 'Makes sure that all variables use the configured style, snake_case or camelCase, for their names.'
|
29
|
+
Enabled: true
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
require: rubocop-rspec
|
3
|
+
|
4
|
+
Layout/MultilineBlockLayout:
|
5
|
+
Exclude:
|
6
|
+
- 'spec/**/*'
|
7
|
+
|
8
|
+
Naming/PredicateName:
|
9
|
+
Exclude:
|
10
|
+
- spec/**/*
|
11
|
+
|
12
|
+
Style/BlockDelimiters:
|
13
|
+
Exclude:
|
14
|
+
- 'spec/**/*'
|
15
|
+
|
16
|
+
Layout/BlockEndNewline:
|
17
|
+
Exclude:
|
18
|
+
- 'spec/**/*'
|
19
|
+
|
20
|
+
RSpec/ExampleWording:
|
21
|
+
CustomTransform:
|
22
|
+
be: is
|
23
|
+
have: has
|
24
|
+
not: does not
|
25
|
+
NOT: does NOT
|
26
|
+
IgnoredWords:
|
27
|
+
- only
|
28
|
+
|
29
|
+
RSpec/FilePath:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
RSpec/InstanceVariable:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
RSpec/DescribeClass:
|
36
|
+
Enabled: true
|
37
|
+
|
38
|
+
RSpec/BeforeAfterAll:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
RSpec/ExampleLength:
|
42
|
+
Enabled:
|
43
|
+
false
|
44
|
+
|
45
|
+
RSpec/MultipleExpectations:
|
46
|
+
Enabled:
|
47
|
+
false
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
require: rubocop-performance
|
3
|
+
|
4
|
+
Performance/CaseWhenSplat:
|
5
|
+
Description: >-
|
6
|
+
Place `when` conditions that use splat at the end
|
7
|
+
of the list of `when` branches.
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Performance/Count:
|
11
|
+
Description: >-
|
12
|
+
Use `count` instead of `select...size`, `reject...size`,
|
13
|
+
`select...count`, `reject...count`, `select...length`,
|
14
|
+
and `reject...length`.
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Performance/Detect:
|
18
|
+
Description: >-
|
19
|
+
Use `detect` instead of `select.first`, `find_all.first`,
|
20
|
+
`select.last`, and `find_all.last`.
|
21
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Performance/FlatMap:
|
25
|
+
Description: >-
|
26
|
+
Use `Enumerable#flat_map`
|
27
|
+
instead of `Enumerable#map...Array#flatten(1)`
|
28
|
+
or `Enumberable#collect..Array#flatten(1)`
|
29
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Performance/ReverseEach:
|
33
|
+
Description: 'Use `reverse_each` instead of `reverse.each`.'
|
34
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
|
35
|
+
Enabled: false
|
36
|
+
|
37
|
+
Performance/Size:
|
38
|
+
Description: >-
|
39
|
+
Use `size` instead of `count` for counting
|
40
|
+
the number of elements in `Array` and `Hash`.
|
41
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Performance/StringReplacement:
|
45
|
+
Description: >-
|
46
|
+
Use `tr` instead of `gsub` when you are replacing the same
|
47
|
+
number of characters. Use `delete` instead of `gsub` when
|
48
|
+
you are deleting characters.
|
49
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
|
50
|
+
Enabled: false
|