oneroster 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0306c18daaa1cea3ae7e49f18700a4c230181441
4
+ data.tar.gz: 9ac72dfc6ceee7d40da62b119b227a12316ff45c
5
+ SHA512:
6
+ metadata.gz: ca0e3070091f7a024c5b18048b67ede35e211f76b2741f68673e5c7b416b2413ab37587648b2eac555066ca71eebe746fe9a8b8383aff6ef97bddedf8826f494
7
+ data.tar.gz: 1635b08056de344c9b2107cc2ed7379d5d6b7661fafaa3ed000f2b1eb8f94568ffc12e12c9fa3358e01bcda7e8bc294aa006725d813f9bd5b10dd64796957482
@@ -0,0 +1,115 @@
1
+ version: 2
2
+ defaults: &defaults
3
+ docker:
4
+ - image: circleci/ruby:2.4.1-node-browsers
5
+ working_directory: ~/repo
6
+ restore_ruby_cache: &restore_ruby_cache
7
+ restore_cache:
8
+ keys:
9
+ - v1-dependencies-{{ checksum "Gemfile.lock" }}
10
+ - v1-dependencies-
11
+ setup_rubygems: &setup_rubygems
12
+ run:
13
+ name: Add RubyGems API key
14
+ command: |
15
+ mkdir -p ~/.gem
16
+ echo -e "---\r\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
17
+ chmod 0600 ~/.gem/credentials
18
+
19
+ install_dependencies: &install_dependencies
20
+ run:
21
+ name: Install Dependencies
22
+ command: |
23
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
24
+
25
+ save_ruby_cache: &save_ruby_cache
26
+ save_cache:
27
+ paths:
28
+ - ./vendor/bundle
29
+ key: v1-dependencies-{{ checksum "Gemfile.lock" }}
30
+ download_cc_reporter: &download_cc_reporter
31
+ run:
32
+ name: Download Code Climate Test Reporter
33
+ command: |
34
+ mkdir -p tmp/
35
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter
36
+ chmod +x ./tmp/cc-test-reporter
37
+
38
+
39
+
40
+
41
+ persist: &persist
42
+ persist_to_workspace:
43
+ root: tmp
44
+ paths:
45
+ - cc-test-reporter
46
+ run_rspec_tests: &run_rspec_tests
47
+ run:
48
+ name: Run RSpec Tests
49
+ command: |
50
+ mkdir /tmp/test-results
51
+ ./tmp/cc-test-reporter before-build
52
+ TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
53
+ circleci tests split --split-by=timings)"
54
+
55
+ bundle exec rspec --format progress \
56
+ --format RspecJunitFormatter \
57
+ --out /tmp/test-results/rspec.xml \
58
+ --format progress \
59
+ $TEST_FILES
60
+ ./tmp/cc-test-reporter format-coverage -t simplecov -o "tmp/codeclimate.json"
61
+
62
+
63
+
64
+ upload_coverage: &upload_coverage
65
+ run:
66
+ name: Upload Coverage
67
+ command: |
68
+ ./tmp/cc-test-reporter upload-coverage -i tmp/codeclimate.json
69
+
70
+ release_rubygem: &release_rubygem
71
+ run:
72
+ name: Release new version to RubyGems
73
+ command: |
74
+ bundle exec rake release
75
+
76
+ jobs:
77
+ rspec-tests:
78
+ <<: *defaults
79
+ steps:
80
+ - checkout
81
+ - *restore_ruby_cache
82
+ - *install_dependencies
83
+ - *save_ruby_cache
84
+ - *download_cc_reporter
85
+ - *persist
86
+ - *run_rspec_tests
87
+ - *upload_coverage
88
+ - store_test_results:
89
+ path: /tmp/test-results
90
+ - store_artifacts:
91
+ path: /tmp/test-results
92
+ destination: test-results
93
+
94
+ release:
95
+ <<: *defaults
96
+ steps:
97
+ - checkout
98
+ - *restore_ruby_cache
99
+ - *setup_rubygems
100
+ - *install_dependencies
101
+ - *save_ruby_cache
102
+ - *release_rubygem
103
+
104
+ workflows:
105
+ version: 2
106
+ commit:
107
+ jobs:
108
+ - rspec-tests
109
+ - release:
110
+ requires:
111
+ - rspec-tests
112
+ filters:
113
+ branches:
114
+ only:
115
+ - master
@@ -0,0 +1,3 @@
1
+ plugins:
2
+ rubocop:
3
+ enabled: true
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ .idea/*
13
+ .DS_STORE
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,2 @@
1
+ inherit_from:
2
+ - .ruby-style.yml
@@ -0,0 +1,254 @@
1
+ AllCops:
2
+ Exclude:
3
+ - "vendor/**/*"
4
+ - "script/**/*"
5
+ - "db/**/*"
6
+ UseCache: false
7
+ TargetRubyVersion: 2.4.1
8
+ Metrics/BlockLength:
9
+ ExcludedMethods: ['describe', 'context', 'it', 'let', 'class_methods', 'define']
10
+ Style/CollectionMethods:
11
+ Description: Preferred collection methods.
12
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
13
+ Enabled: true
14
+ PreferredMethods:
15
+ collect: map
16
+ collect!: map!
17
+ find_all: select
18
+ reduce:
19
+ inject: reduce
20
+ find:
21
+ detect: find
22
+ Style/GuardClause:
23
+ Description: Check for conditionals that can be replaced with guard clauses
24
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
25
+ Enabled: true
26
+ MinBodyLength: 1
27
+ Style/IfUnlessModifier:
28
+ Description: Favor modifier if/unless usage when you have a single-line body.
29
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
30
+ Enabled: true
31
+ Style/OptionHash:
32
+ Description: Don't use option hashes when you can use keyword arguments.
33
+ Enabled: true
34
+ Style/PercentLiteralDelimiters:
35
+ Description: Use `%`-literal delimiters consistently
36
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
37
+ Enabled: true
38
+ PreferredDelimiters:
39
+ "%": "()"
40
+ "%i": "()"
41
+ "%q": "()"
42
+ "%Q": "()"
43
+ "%r": "{}"
44
+ "%s": "()"
45
+ "%w": "()"
46
+ "%W": "()"
47
+ "%x": "()"
48
+ Style/RaiseArgs:
49
+ Description: Checks the arguments passed to raise/fail.
50
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
51
+ Enabled: true
52
+ EnforcedStyle: exploded
53
+ SupportedStyles:
54
+ - compact
55
+ - exploded
56
+ Style/SignalException:
57
+ Description: Checks for proper usage of fail and raise.
58
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
59
+ Enabled: true
60
+ EnforcedStyle: semantic
61
+ SupportedStyles:
62
+ - only_raise
63
+ - only_fail
64
+ - semantic
65
+ Style/SingleLineBlockParams:
66
+ Description: Enforces the names of some block params.
67
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
68
+ Enabled: true
69
+ Methods:
70
+ - reduce:
71
+ - a
72
+ - e
73
+ - inject:
74
+ - a
75
+ - e
76
+ Style/SingleLineMethods:
77
+ Description: Avoid single-line methods.
78
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
79
+ Enabled: true
80
+ AllowIfMethodIsEmpty: true
81
+ Style/StringLiterals:
82
+ Description: Checks if uses of quotes match the configured preference.
83
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
84
+ Enabled: false
85
+ Style/StringLiteralsInInterpolation:
86
+ Description: Checks if uses of quotes inside expressions in interpolated strings
87
+ match the configured preference.
88
+ Enabled: true
89
+ EnforcedStyle: single_quotes
90
+ SupportedStyles:
91
+ - single_quotes
92
+ - double_quotes
93
+ Style/TrailingCommaInArguments:
94
+ EnforcedStyleForMultiline: no_comma
95
+ Style/TrailingCommaInArrayLiteral:
96
+ EnforcedStyleForMultiline: no_comma
97
+ Metrics/AbcSize:
98
+ Description: A calculated magnitude based on number of assignments, branches, and
99
+ conditions.
100
+ Enabled: false
101
+ Max: 15
102
+ Metrics/ClassLength:
103
+ Description: Avoid classes longer than 100 lines of code.
104
+ Enabled: false
105
+ CountComments: false
106
+ Max: 100
107
+ Metrics/ModuleLength:
108
+ CountComments: false
109
+ Max: 100
110
+ Description: Avoid modules longer than 100 lines of code.
111
+ Enabled: false
112
+ Metrics/CyclomaticComplexity:
113
+ Description: A complexity metric that is strongly correlated to the number of test
114
+ cases needed to validate a method.
115
+ Enabled: true
116
+ Max: 6
117
+ Metrics/MethodLength:
118
+ Description: Avoid methods longer than 10 lines of code.
119
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
120
+ Enabled: false
121
+ CountComments: false
122
+ Max: 10
123
+ Metrics/ParameterLists:
124
+ Description: Avoid parameter lists longer than three or four parameters.
125
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
126
+ Enabled: false
127
+ Max: 5
128
+ CountKeywordArgs: true
129
+ Metrics/PerceivedComplexity:
130
+ Description: A complexity metric geared towards measuring complexity for a human
131
+ reader.
132
+ Enabled: false
133
+ Max: 7
134
+ Metrics/LineLength:
135
+ Max: 100
136
+ # To make it possible to copy or click on URIs in the code, we allow lines
137
+ # contaning a URI to be longer than Max.
138
+ AllowURI: true
139
+ URISchemes:
140
+ - http
141
+ - https
142
+ Lint/AssignmentInCondition:
143
+ Description: Don't use assignment in conditions.
144
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
145
+ Enabled: true
146
+ AllowSafeAssignment: true
147
+ Style/InlineComment:
148
+ Description: Avoid inline comments.
149
+ Enabled: false
150
+ Style/Alias:
151
+ Description: Use alias_method instead of alias.
152
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
153
+ Enabled: true
154
+ Style/Documentation:
155
+ Description: Document classes and non-namespace modules.
156
+ Enabled: false
157
+ Style/DoubleNegation:
158
+ Description: Checks for uses of double negation (!!).
159
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
160
+ Enabled: true
161
+ Style/EachWithObject:
162
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
163
+ Enabled: false
164
+ Style/EmptyLiteral:
165
+ Description: Prefer literals to Array.new/Hash.new/String.new.
166
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
167
+ Enabled: true
168
+ Style/ModuleFunction:
169
+ Description: Checks for usage of `extend self` in modules.
170
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
171
+ Enabled: true
172
+ Style/OneLineConditional:
173
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
174
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
175
+ Enabled: true
176
+ Style/PerlBackrefs:
177
+ Description: Avoid Perl-style regex back references.
178
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
179
+ Enabled: true
180
+ Style/Send:
181
+ Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
182
+ may overlap with existing methods.
183
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
184
+ Enabled: true
185
+ Style/SpecialGlobalVars:
186
+ Description: Avoid Perl-style global variables.
187
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
188
+ Enabled: true
189
+ Style/VariableInterpolation:
190
+ Description: Don't interpolate global, instance and class variables directly in
191
+ strings.
192
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
193
+ Enabled: false
194
+ Style/WhenThen:
195
+ Description: Use when x then ... for one-line cases.
196
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
197
+ Enabled: true
198
+ Lint/EachWithObjectArgument:
199
+ Description: Check for immutable argument given to each_with_object.
200
+ Enabled: true
201
+ Lint/HandleExceptions:
202
+ Description: Don't suppress exception.
203
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
204
+ Enabled: false
205
+ Lint/LiteralAsCondition:
206
+ Description: Checks of literals used in conditions.
207
+ Enabled: true
208
+ Lint/LiteralInInterpolation:
209
+ Description: Checks for literals used in interpolation.
210
+ Enabled: true
211
+ Layout/DotPosition:
212
+ Description: Checks the position of the dot in multi-line method calls.
213
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
214
+ Enabled: true
215
+ EnforcedStyle: leading
216
+ SupportedStyles:
217
+ - leading
218
+ - trailing
219
+ Layout/MultilineOperationIndentation:
220
+ EnforcedStyle: indented
221
+ SupportedStyles:
222
+ - aligned
223
+ - indented
224
+ Layout/MultilineMethodCallIndentation:
225
+ EnforcedStyle: indented
226
+ SupportedStyles:
227
+ - aligned
228
+ - indented
229
+ Layout/SpaceInsidePercentLiteralDelimiters:
230
+ Description: 'No unnecessary spaces inside delimiters of %i/%w/%x literals.'
231
+ Enabled: false
232
+ Layout/SpaceInLambdaLiteral:
233
+ Description: 'Checks for spaces in lambda literals.'
234
+ Enabled: false
235
+ Naming/FileName:
236
+ Description: Use snake_case for source file names.
237
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
238
+ Enabled: true
239
+ Exclude: []
240
+ Naming/PredicateName:
241
+ Description: Check the names of predicate methods.
242
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
243
+ Enabled: true
244
+ NamePrefix:
245
+ - is_
246
+ - has_
247
+ - have_
248
+ NamePrefixBlacklist:
249
+ - is_
250
+ Exclude:
251
+ - spec/**/*
252
+ Naming/AccessorMethodName:
253
+ Description: Check the naming of accessor methods for get_/set_.
254
+ Enabled: false
@@ -0,0 +1 @@
1
+ 2.4.1
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.1
5
+ before_install: gem install bundler -v 1.16.1
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ # Specify your gem's dependencies in one_roster.gemspec
8
+ gemspec
@@ -0,0 +1,94 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ oneroster (1.3.6)
5
+ dry-inflector
6
+ faraday
7
+ faraday_middleware
8
+ oauth
9
+ simple_oauth
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ ast (2.4.0)
15
+ builder (3.2.3)
16
+ coderay (1.1.2)
17
+ diff-lcs (1.3)
18
+ docile (1.3.1)
19
+ dry-inflector (0.2.0)
20
+ faraday (1.0.1)
21
+ multipart-post (>= 1.2, < 3)
22
+ faraday_middleware (1.0.0)
23
+ faraday (~> 1.0)
24
+ jaro_winkler (1.5.2)
25
+ json (2.2.0)
26
+ metaclass (0.0.4)
27
+ method_source (0.8.2)
28
+ mocha (1.8.0)
29
+ metaclass (~> 0.0.1)
30
+ multipart-post (2.1.1)
31
+ oauth (0.5.4)
32
+ parallel (1.15.0)
33
+ parser (2.6.2.0)
34
+ ast (~> 2.4.0)
35
+ pry (0.10.4)
36
+ coderay (~> 1.1.0)
37
+ method_source (~> 0.8.1)
38
+ slop (~> 3.4)
39
+ pry-nav (0.2.4)
40
+ pry (>= 0.9.10, < 0.11.0)
41
+ psych (3.1.0)
42
+ rainbow (3.0.0)
43
+ rake (10.5.0)
44
+ rspec (3.8.0)
45
+ rspec-core (~> 3.8.0)
46
+ rspec-expectations (~> 3.8.0)
47
+ rspec-mocks (~> 3.8.0)
48
+ rspec-core (3.8.0)
49
+ rspec-support (~> 3.8.0)
50
+ rspec-expectations (3.8.2)
51
+ diff-lcs (>= 1.2.0, < 2.0)
52
+ rspec-support (~> 3.8.0)
53
+ rspec-mocks (3.8.0)
54
+ diff-lcs (>= 1.2.0, < 2.0)
55
+ rspec-support (~> 3.8.0)
56
+ rspec-support (3.8.0)
57
+ rspec_junit_formatter (0.2.2)
58
+ builder (< 4)
59
+ rspec-core (>= 2, < 4, != 2.12.0)
60
+ rubocop (0.66.0)
61
+ jaro_winkler (~> 1.5.1)
62
+ parallel (~> 1.10)
63
+ parser (>= 2.5, != 2.5.1.1)
64
+ psych (>= 3.1.0)
65
+ rainbow (>= 2.2.2, < 4.0)
66
+ ruby-progressbar (~> 1.7)
67
+ unicode-display_width (>= 1.4.0, < 1.6)
68
+ ruby-progressbar (1.10.0)
69
+ simple_oauth (0.3.1)
70
+ simplecov (0.16.1)
71
+ docile (~> 1.1)
72
+ json (>= 1.8, < 3)
73
+ simplecov-html (~> 0.10.0)
74
+ simplecov-html (0.10.2)
75
+ slop (3.6.0)
76
+ unicode-display_width (1.5.0)
77
+
78
+ PLATFORMS
79
+ ruby
80
+
81
+ DEPENDENCIES
82
+ bundler (~> 2.1.4)
83
+ mocha
84
+ oneroster!
85
+ pry
86
+ pry-nav
87
+ rake (~> 10.0)
88
+ rspec (~> 3.0)
89
+ rspec_junit_formatter
90
+ rubocop
91
+ simplecov
92
+
93
+ BUNDLED WITH
94
+ 2.1.4