psu_identity 0.1.1 → 0.4.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: 643de6e39ef7a39a897e8fc676e72cc61cb464fdd24b65cea2bc005845ce284d
4
- data.tar.gz: 9b864ade99b2016694aa58ccc94e79ad662c959944a52deb292f704892d07d7f
3
+ metadata.gz: 71486dc8c78a516d121f540ce6966457d863c725c2ab6ada88f7d6090267c8b8
4
+ data.tar.gz: 1ccd98e5c98644f8d1d44999ae2ff7c88284203d3666f241f6422f4a0c122c53
5
5
  SHA512:
6
- metadata.gz: ffe982ee3c4c68a07152e2500dbdfea69213f26040322b84c95bd8f9292cd358060555f5d39d3d72867170fab722a7fafb2fbef82fd152a4b8609ca1afdeca65
7
- data.tar.gz: f4938672ac8e04c2dc7c637439d044f55517b019065e66ef368f2467883638ad9f83270fff526ebd3a140c1c0dbefe18bfb2a0d58cf2cd5cb607d004cd66e60c
6
+ metadata.gz: 2a4e22f4667d2163fd0f9ad4f32425cf78b116b4e8db4357493c15f533d8cdddbc70ae55ebc7752c47d4891d3f4d1e69cd351b0b38e3c89da19735deb06b6f91
7
+ data.tar.gz: 19911fbf7bd37ff89bb1b508c43bb3e2fa4142d0a88df670a8a5cfae347b13993bcf15dd55000a50661ede2982fbd39c9329c48dcd9f0938480389b3b7737c91
data/.circleci/config.yml CHANGED
@@ -22,6 +22,21 @@ 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
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > bin/cc-test-reporter
29
+ chmod +x bin/cc-test-reporter
30
+
31
+ - run:
32
+ name: "Rubocop"
33
+ command: bundle exec rubocop
34
+
25
35
  - run:
26
36
  name: "Rspec"
27
- command: RAILS_ENV=test bundle exec rspec
37
+ command: |
38
+ export PSU_ID_OAUTH_CLIENT_ID=foo
39
+ export PSU_ID_OAUTH_CLIENT_SECRET=bar
40
+ RAILS_ENV=test bundle exec rspec &&
41
+ bin/cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.json coverage/.resultset.json &&
42
+ bin/cc-test-reporter upload-coverage
data/.gitignore CHANGED
@@ -8,9 +8,10 @@
8
8
  /tmp/
9
9
  .idea/
10
10
  log/
11
+ .envrc
11
12
 
12
13
  # rspec failure tracking
13
14
  .rspec_status
14
15
 
15
16
  # ignore gem builds
16
- /psu_identity-*
17
+ /psu_identity-*
@@ -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
@@ -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