camp3 0.0.1
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 +7 -0
- data/.editorconfig +8 -0
- data/.github/workflows/ci.yml +36 -0
- data/.github/workflows/gem-push.yml +27 -0
- data/.gitignore +60 -0
- data/.rspec +3 -0
- data/.rubocop.yml +38 -0
- data/.rubocop_todo.yml +250 -0
- data/.ruby-version +1 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +102 -0
- data/LICENSE +21 -0
- data/README.md +35 -0
- data/Rakefile +11 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/camp3.gemspec +33 -0
- data/examples/messages.rb +24 -0
- data/examples/oauth.rb +22 -0
- data/examples/obtain_acces_token.rb +13 -0
- data/examples/todos.rb +27 -0
- data/lib/camp3.rb +64 -0
- data/lib/camp3/api/message.rb +9 -0
- data/lib/camp3/api/project.rb +20 -0
- data/lib/camp3/api/resource.rb +11 -0
- data/lib/camp3/api/todo.rb +14 -0
- data/lib/camp3/authorization.rb +66 -0
- data/lib/camp3/client.rb +52 -0
- data/lib/camp3/configuration.rb +72 -0
- data/lib/camp3/error.rb +146 -0
- data/lib/camp3/logging.rb +29 -0
- data/lib/camp3/objectified_hash.rb +54 -0
- data/lib/camp3/page_links.rb +36 -0
- data/lib/camp3/paginated_response.rb +110 -0
- data/lib/camp3/request.rb +77 -0
- data/lib/camp3/resource.rb +22 -0
- data/lib/camp3/resources/project.rb +14 -0
- data/lib/camp3/version.rb +5 -0
- metadata +139 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: acaca1e71ced016869c478adced37506d71282d7274f0635c8fb4fb00d22cba4
|
4
|
+
data.tar.gz: 385b6160ed82eeb7d4da434ab382fb816cfebc2708c93d4c2d6bc4bf54d8f21e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1b6065106d591e7b48958949d9040908e588d43db9ccb12e5d27aff0778efae1560f1f38d62080aa324baaf01fb77762cd0558e24d204b1c46b6744b3c784c34
|
7
|
+
data.tar.gz: eae0fda0bfd0b6ef2bd4825e593e33de074dc1ec288d581cd00ca340655dcb65e4e1fa458d1cd70f9fd919d749f7dab01a4a30568870ac8ef8450d23fda3dad2
|
data/.editorconfig
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: CI
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ master ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ master ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
build:
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
strategy:
|
20
|
+
matrix:
|
21
|
+
ruby:
|
22
|
+
- 2.5
|
23
|
+
- 2.6
|
24
|
+
- 2.7
|
25
|
+
name: Ruby ${{ matrix.ruby }} test
|
26
|
+
steps:
|
27
|
+
- uses: actions/checkout@v2
|
28
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
29
|
+
uses: actions/setup-ruby@v1
|
30
|
+
with:
|
31
|
+
ruby-version: ${{ matrix.ruby }}
|
32
|
+
- name: Build and test with Rake
|
33
|
+
run: |
|
34
|
+
gem install bundler --no-document
|
35
|
+
bundle install --jobs 4 --retry 3
|
36
|
+
bundle exec rake
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- v*
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
name: Build + Publish
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- name: Set up Ruby 2.7
|
15
|
+
uses: actions/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: 2.7.x
|
18
|
+
- name: Publish to RubyGems
|
19
|
+
run: |
|
20
|
+
mkdir -p $HOME/.gem
|
21
|
+
touch $HOME/.gem/credentials
|
22
|
+
chmod 0600 $HOME/.gem/credentials
|
23
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
24
|
+
gem build *.gemspec
|
25
|
+
gem push *.gem
|
26
|
+
env:
|
27
|
+
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
data/.gitignore
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
# Ignore Byebug command history file.
|
17
|
+
.byebug_history
|
18
|
+
|
19
|
+
## Specific to RubyMotion:
|
20
|
+
.dat*
|
21
|
+
.repl_history
|
22
|
+
build/
|
23
|
+
*.bridgesupport
|
24
|
+
build-iPhoneOS/
|
25
|
+
build-iPhoneSimulator/
|
26
|
+
|
27
|
+
## Specific to RubyMotion (use of CocoaPods):
|
28
|
+
#
|
29
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
30
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
31
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
32
|
+
#
|
33
|
+
# vendor/Pods/
|
34
|
+
|
35
|
+
## Documentation cache and generated files:
|
36
|
+
/.yardoc/
|
37
|
+
/_yardoc/
|
38
|
+
/doc/
|
39
|
+
/rdoc/
|
40
|
+
|
41
|
+
## Environment normalization:
|
42
|
+
/.bundle/
|
43
|
+
/vendor/bundle
|
44
|
+
/lib/bundler/man/
|
45
|
+
|
46
|
+
# for a library or gem, you might want to ignore these files since the code is
|
47
|
+
# intended to run in multiple environments; otherwise, check them in:
|
48
|
+
# Gemfile.lock
|
49
|
+
# .ruby-version
|
50
|
+
# .ruby-gemset
|
51
|
+
|
52
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
53
|
+
.rvmrc
|
54
|
+
|
55
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
56
|
+
# .rubocop-https?--*
|
57
|
+
|
58
|
+
.rspec_status
|
59
|
+
|
60
|
+
.env
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
require: rubocop-performance
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
TargetRubyVersion: 2.5
|
7
|
+
NewCops: enable
|
8
|
+
|
9
|
+
Layout/LineLength:
|
10
|
+
Max: 123
|
11
|
+
Exclude:
|
12
|
+
- 'lib/camp3/client/*'
|
13
|
+
- 'spec/**/*'
|
14
|
+
|
15
|
+
Metrics/BlockLength:
|
16
|
+
Exclude:
|
17
|
+
- 'spec/**/*'
|
18
|
+
|
19
|
+
Style/Documentation:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Style/ClassAndModuleChildren:
|
23
|
+
Exclude:
|
24
|
+
- 'lib/camp3/*'
|
25
|
+
- 'lib/camp3/api/*'
|
26
|
+
- 'lib/camp3/resources/*'
|
27
|
+
|
28
|
+
Lint/NonDeterministicRequireOrder:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Style/HashEachMethods:
|
32
|
+
Enabled: true
|
33
|
+
|
34
|
+
Style/HashTransformKeys:
|
35
|
+
Enabled: true
|
36
|
+
|
37
|
+
Style/HashTransformValues:
|
38
|
+
Enabled: true
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,250 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2020-06-29 13:09:29 UTC using RuboCop version 0.86.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
Layout/EmptyLineAfterMagicComment:
|
12
|
+
Exclude:
|
13
|
+
- 'lib/camp3/request.rb'
|
14
|
+
|
15
|
+
# Offense count: 1
|
16
|
+
# Cop supports --auto-correct.
|
17
|
+
Layout/EmptyLines:
|
18
|
+
Exclude:
|
19
|
+
- 'lib/camp3/logging.rb'
|
20
|
+
|
21
|
+
# Offense count: 1
|
22
|
+
# Cop supports --auto-correct.
|
23
|
+
# Configuration parameters: EnforcedStyle.
|
24
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
25
|
+
Layout/EmptyLinesAroundBlockBody:
|
26
|
+
Exclude:
|
27
|
+
- 'spec/configuration_spec.rb'
|
28
|
+
|
29
|
+
# Offense count: 2
|
30
|
+
# Cop supports --auto-correct.
|
31
|
+
# Configuration parameters: EnforcedStyle.
|
32
|
+
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
|
33
|
+
Layout/EmptyLinesAroundClassBody:
|
34
|
+
Exclude:
|
35
|
+
- 'lib/camp3/resource.rb'
|
36
|
+
- 'lib/camp3/resources/project.rb'
|
37
|
+
|
38
|
+
# Offense count: 6
|
39
|
+
# Cop supports --auto-correct.
|
40
|
+
# Configuration parameters: EnforcedStyle.
|
41
|
+
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
42
|
+
Layout/EmptyLinesAroundModuleBody:
|
43
|
+
Exclude:
|
44
|
+
- 'lib/camp3.rb'
|
45
|
+
- 'lib/camp3/api/project.rb'
|
46
|
+
- 'lib/camp3/api/resource.rb'
|
47
|
+
- 'lib/camp3/api/todo.rb'
|
48
|
+
- 'lib/camp3/authorization.rb'
|
49
|
+
- 'lib/camp3/logging.rb'
|
50
|
+
|
51
|
+
# Offense count: 2
|
52
|
+
# Cop supports --auto-correct.
|
53
|
+
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
54
|
+
Layout/ExtraSpacing:
|
55
|
+
Exclude:
|
56
|
+
- 'camp3.gemspec'
|
57
|
+
|
58
|
+
# Offense count: 1
|
59
|
+
# Cop supports --auto-correct.
|
60
|
+
# Configuration parameters: Width, IgnoredPatterns.
|
61
|
+
Layout/IndentationWidth:
|
62
|
+
Exclude:
|
63
|
+
- 'examples/oauth.rb'
|
64
|
+
|
65
|
+
# Offense count: 1
|
66
|
+
# Cop supports --auto-correct.
|
67
|
+
# Configuration parameters: EnforcedStyle.
|
68
|
+
# SupportedStyles: space, no_space
|
69
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
70
|
+
Exclude:
|
71
|
+
- 'lib/camp3/api/todo.rb'
|
72
|
+
|
73
|
+
# Offense count: 2
|
74
|
+
# Cop supports --auto-correct.
|
75
|
+
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
|
76
|
+
# SupportedStylesForExponentOperator: space, no_space
|
77
|
+
Layout/SpaceAroundOperators:
|
78
|
+
Exclude:
|
79
|
+
- 'camp3.gemspec'
|
80
|
+
|
81
|
+
# Offense count: 1
|
82
|
+
# Cop supports --auto-correct.
|
83
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
84
|
+
# SupportedStyles: space, no_space
|
85
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
86
|
+
Layout/SpaceInsideBlockBraces:
|
87
|
+
Exclude:
|
88
|
+
- 'Gemfile'
|
89
|
+
|
90
|
+
# Offense count: 23
|
91
|
+
# Cop supports --auto-correct.
|
92
|
+
# Configuration parameters: EnforcedStyle.
|
93
|
+
# SupportedStyles: final_newline, final_blank_line
|
94
|
+
Layout/TrailingEmptyLines:
|
95
|
+
Enabled: false
|
96
|
+
|
97
|
+
# Offense count: 12
|
98
|
+
# Cop supports --auto-correct.
|
99
|
+
# Configuration parameters: AllowInHeredoc.
|
100
|
+
Layout/TrailingWhitespace:
|
101
|
+
Exclude:
|
102
|
+
- 'lib/camp3.rb'
|
103
|
+
- 'lib/camp3/api/resource.rb'
|
104
|
+
- 'lib/camp3/authorization.rb'
|
105
|
+
- 'lib/camp3/client.rb'
|
106
|
+
- 'lib/camp3/configuration.rb'
|
107
|
+
- 'lib/camp3/objectified_hash.rb'
|
108
|
+
- 'lib/camp3/resource.rb'
|
109
|
+
- 'spec/configuration_spec.rb'
|
110
|
+
|
111
|
+
# Offense count: 2
|
112
|
+
# Cop supports --auto-correct.
|
113
|
+
Lint/NonDeterministicRequireOrder:
|
114
|
+
Exclude:
|
115
|
+
- 'lib/camp3/client.rb'
|
116
|
+
- 'lib/camp3/resource.rb'
|
117
|
+
|
118
|
+
# Offense count: 2
|
119
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
120
|
+
# ExcludedMethods: refine
|
121
|
+
Metrics/BlockLength:
|
122
|
+
Max: 43
|
123
|
+
|
124
|
+
# Offense count: 2
|
125
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
126
|
+
Metrics/MethodLength:
|
127
|
+
Max: 14
|
128
|
+
|
129
|
+
# Offense count: 4
|
130
|
+
# Cop supports --auto-correct.
|
131
|
+
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
132
|
+
# SupportedStyles: nested, compact
|
133
|
+
Style/ClassAndModuleChildren:
|
134
|
+
Exclude:
|
135
|
+
- 'lib/camp3/api/message.rb'
|
136
|
+
- 'lib/camp3/api/project.rb'
|
137
|
+
- 'lib/camp3/api/resource.rb'
|
138
|
+
- 'lib/camp3/api/todo.rb'
|
139
|
+
|
140
|
+
# Offense count: 9
|
141
|
+
Style/Documentation:
|
142
|
+
Exclude:
|
143
|
+
- 'spec/**/*'
|
144
|
+
- 'test/**/*'
|
145
|
+
- 'lib/camp3.rb'
|
146
|
+
- 'lib/camp3/api/message.rb'
|
147
|
+
- 'lib/camp3/api/project.rb'
|
148
|
+
- 'lib/camp3/api/resource.rb'
|
149
|
+
- 'lib/camp3/api/todo.rb'
|
150
|
+
- 'lib/camp3/authorization.rb'
|
151
|
+
- 'lib/camp3/logging.rb'
|
152
|
+
- 'lib/camp3/resource.rb'
|
153
|
+
- 'lib/camp3/resources/project.rb'
|
154
|
+
|
155
|
+
# Offense count: 1
|
156
|
+
# Cop supports --auto-correct.
|
157
|
+
Style/ExpandPathArguments:
|
158
|
+
Exclude:
|
159
|
+
- 'camp3.gemspec'
|
160
|
+
|
161
|
+
# Offense count: 15
|
162
|
+
# Cop supports --auto-correct.
|
163
|
+
# Configuration parameters: EnforcedStyle.
|
164
|
+
# SupportedStyles: always, always_true, never
|
165
|
+
Style/FrozenStringLiteralComment:
|
166
|
+
Exclude:
|
167
|
+
- 'Gemfile'
|
168
|
+
- 'Rakefile'
|
169
|
+
- 'bin/console'
|
170
|
+
- 'camp3.gemspec'
|
171
|
+
- 'examples/messages.rb'
|
172
|
+
- 'examples/oauth.rb'
|
173
|
+
- 'examples/obtain_acces_token.rb'
|
174
|
+
- 'examples/todos.rb'
|
175
|
+
- 'lib/camp3/resource.rb'
|
176
|
+
- 'lib/camp3/resources/project.rb'
|
177
|
+
- 'spec/authorization_spec.rb'
|
178
|
+
- 'spec/camp3_spec.rb'
|
179
|
+
- 'spec/configuration_spec.rb'
|
180
|
+
- 'spec/logging_spec.rb'
|
181
|
+
- 'spec/spec_helper.rb'
|
182
|
+
|
183
|
+
# Offense count: 1
|
184
|
+
# Cop supports --auto-correct.
|
185
|
+
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
186
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
187
|
+
Style/HashSyntax:
|
188
|
+
Exclude:
|
189
|
+
- 'Rakefile'
|
190
|
+
|
191
|
+
# Offense count: 1
|
192
|
+
# Cop supports --auto-correct.
|
193
|
+
Style/OrAssignment:
|
194
|
+
Exclude:
|
195
|
+
- 'lib/camp3/authorization.rb'
|
196
|
+
|
197
|
+
# Offense count: 1
|
198
|
+
# Cop supports --auto-correct.
|
199
|
+
Style/RedundantParentheses:
|
200
|
+
Exclude:
|
201
|
+
- 'lib/camp3/client.rb'
|
202
|
+
|
203
|
+
# Offense count: 3
|
204
|
+
# Cop supports --auto-correct.
|
205
|
+
# Configuration parameters: AllowMultipleReturnValues.
|
206
|
+
Style/RedundantReturn:
|
207
|
+
Exclude:
|
208
|
+
- 'lib/camp3/resource.rb'
|
209
|
+
|
210
|
+
# Offense count: 3
|
211
|
+
# Cop supports --auto-correct.
|
212
|
+
Style/RedundantSelf:
|
213
|
+
Exclude:
|
214
|
+
- 'lib/camp3/configuration.rb'
|
215
|
+
|
216
|
+
# Offense count: 1
|
217
|
+
# Cop supports --auto-correct.
|
218
|
+
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
|
219
|
+
# SupportedStyles: slashes, percent_r, mixed
|
220
|
+
Style/RegexpLiteral:
|
221
|
+
Exclude:
|
222
|
+
- 'lib/camp3/resource.rb'
|
223
|
+
|
224
|
+
# Offense count: 51
|
225
|
+
# Cop supports --auto-correct.
|
226
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
227
|
+
# SupportedStyles: single_quotes, double_quotes
|
228
|
+
Style/StringLiterals:
|
229
|
+
Exclude:
|
230
|
+
- 'Gemfile'
|
231
|
+
- 'Rakefile'
|
232
|
+
- 'bin/console'
|
233
|
+
- 'camp3.gemspec'
|
234
|
+
- 'lib/camp3.rb'
|
235
|
+
- 'lib/camp3/api/project.rb'
|
236
|
+
- 'lib/camp3/authorization.rb'
|
237
|
+
- 'lib/camp3/configuration.rb'
|
238
|
+
- 'lib/camp3/resource.rb'
|
239
|
+
- 'lib/camp3/version.rb'
|
240
|
+
- 'spec/camp3_spec.rb'
|
241
|
+
- 'spec/configuration_spec.rb'
|
242
|
+
- 'spec/spec_helper.rb'
|
243
|
+
|
244
|
+
# Offense count: 1
|
245
|
+
# Cop supports --auto-correct.
|
246
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
247
|
+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
248
|
+
Style/TrailingCommaInArguments:
|
249
|
+
Exclude:
|
250
|
+
- 'lib/camp3/authorization.rb'
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.1
|