faithteams-api 2.0.1 → 3.0.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/.github/workflows/editorconfig.yml +23 -0
- data/.github/workflows/rubocop.yml +21 -0
- data/.github/workflows/rubygems.yml +36 -0
- data/.github/workflows/tester.yml +21 -0
- data/.github/workflows/yard.yml +21 -0
- data/CHANGELOG.md +20 -2
- data/Gemfile.lock +23 -25
- data/README.md +1 -3
- data/faithteams-api.gemspec +3 -1
- data/lib/faithteams/api/v2/connection.rb +1 -16
- data/lib/faithteams/api/v2/gateway.rb +0 -5
- data/lib/faithteams/api/v2/resource.rb +0 -1
- data/lib/faithteams/version.rb +1 -1
- data/thunder-tests/collections/tc_col_faithteams-api.json +1301 -0
- data/thunder-tests/collections/tc_col_faithteams-app.json +1189 -0
- data/thunder-tests/environments/tc_env_faithteams.json +5 -5
- data/thunder-tests/faithteams.env.template +0 -1
- metadata +16 -11
- data/.github/workflows/jeweler.yml +0 -11
- data/.github/workflows/puller.yml +0 -17
- data/lib/faithteams/api/v2/resource/user.rb +0 -40
- data/thunder-tests/collections/tc_col_faithteams.json +0 -2390
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '01586c73ee318708383bb14df2011145b83ca9ec382ddf0cfe2ebc49cee3fac3'
|
4
|
+
data.tar.gz: 4a0c59dbc8428336ae1e286571679492756a8fb72aa6caec286d5d5cbf5c5d77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b702bc6fb5800697729f51a0bed56bbf6840f2d24f8da7dd9c3a9df1e32940e1e9d96155ba124f30ec1bc1cbceee3a80b9b0be1a702dd607d8298c3f90c76c79
|
7
|
+
data.tar.gz: 3a0380ff6826f18fcd405af6bd9bf3c0d0478bbf479cfc65f17182f620986a115564eb14ee9449276ae2d75d143e85f9728a84b037abe79c4d4f141034a3f072
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: EditorConfig
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
types: [ opened, reopened, synchronize ]
|
6
|
+
workflow_dispatch:
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
name: Check
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- name: Checkout Code
|
14
|
+
uses: actions/checkout@v4
|
15
|
+
- name: Setup Node
|
16
|
+
uses: actions/setup-node@v4
|
17
|
+
with:
|
18
|
+
node-version: 20
|
19
|
+
- name: Install editorconfig-checker
|
20
|
+
run: npm install --global editorconfig-checker
|
21
|
+
- name: Run editorconfig-checker
|
22
|
+
run: |
|
23
|
+
editorconfig-checker -verbose -exclude "(thunder-tests|Gemfile.lock|.csv)"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
name: Rubocop
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
types: [ opened, reopened, synchronize ]
|
6
|
+
workflow_dispatch:
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
check:
|
10
|
+
name: Check
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v4
|
14
|
+
- name: Set up Ruby
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: 3.0
|
18
|
+
- name: Install dependencies
|
19
|
+
run: bundle install
|
20
|
+
- name: Run Rubocop
|
21
|
+
run: bundle exec rubocop --parallel
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Builds and pushes a gem to RubyGems.
|
2
|
+
name: RubyGems
|
3
|
+
|
4
|
+
on:
|
5
|
+
pull_request:
|
6
|
+
# Only on the production branch
|
7
|
+
branches:
|
8
|
+
- production
|
9
|
+
# Only when closed
|
10
|
+
types:
|
11
|
+
- closed
|
12
|
+
workflow_dispatch:
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
push:
|
16
|
+
if: github.event.pull_request.merged == true
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
|
19
|
+
permissions:
|
20
|
+
contents: write
|
21
|
+
id-token: write
|
22
|
+
|
23
|
+
# If you configured a GitHub environment on RubyGems, you must use it here.
|
24
|
+
environment: release
|
25
|
+
|
26
|
+
steps:
|
27
|
+
# Set up
|
28
|
+
- uses: actions/checkout@v4
|
29
|
+
- name: Set up Ruby
|
30
|
+
uses: ruby/setup-ruby@v1
|
31
|
+
with:
|
32
|
+
bundler-cache: true
|
33
|
+
ruby-version: ruby
|
34
|
+
|
35
|
+
# Release
|
36
|
+
- uses: rubygems/release-gem@v1
|
@@ -0,0 +1,21 @@
|
|
1
|
+
name: Tester
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
types: [ opened, reopened, synchronize ]
|
6
|
+
workflow_dispatch:
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
name: Test
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v4
|
14
|
+
- name: Set up Ruby
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: 3.0
|
18
|
+
- name: Install dependencies
|
19
|
+
run: bundle install
|
20
|
+
- name: Run tests
|
21
|
+
run: bundle exec rake
|
@@ -0,0 +1,21 @@
|
|
1
|
+
name: Yard
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
types: [ opened, reopened, synchronize ]
|
6
|
+
workflow_dispatch:
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
check:
|
10
|
+
name: Check
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v4
|
14
|
+
- name: Set up Ruby
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: 3.0
|
18
|
+
- name: Install dependencies
|
19
|
+
run: bundle install
|
20
|
+
- name: Run Yard
|
21
|
+
run: bundle exec yard stats --list-undoc --fail-on-warning
|
data/CHANGELOG.md
CHANGED
@@ -7,11 +7,29 @@ All notable changes to this project will be documented in this file.
|
|
7
7
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
8
8
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
9
9
|
|
10
|
-
## [
|
10
|
+
## [3.0.0] - 2024-05-20 -
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
1. Use basic auth for all API requests and remove User. (IN-2429)
|
15
|
+
|
16
|
+
### Removed
|
17
|
+
|
18
|
+
1. Remove `Resource::User` and `Resource::User#authenticate`. (IN-2429)
|
19
|
+
|
20
|
+
## [2.0.2] - 2024-04-04 - https://github.com/tithely/faithteams-api/pull/5
|
21
|
+
|
22
|
+
### Fixed
|
23
|
+
|
24
|
+
1. Fixed gemspec metadata urls. (IN-2229)
|
25
|
+
1. Update gem dependencies.
|
26
|
+
1. Replace `jeweler.yml` Github Action with `rubygems.yml`.
|
27
|
+
|
28
|
+
## [2.0.1] - 2024-04-03
|
11
29
|
|
12
30
|
### Changed
|
13
31
|
|
14
|
-
1.
|
32
|
+
1. Published to RubyGems. (IN-2229)
|
15
33
|
|
16
34
|
## [1.1.0] - 2023-11-01
|
17
35
|
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
faithteams-api (
|
4
|
+
faithteams-api (3.0.0)
|
5
5
|
activesupport (>= 6.1.7)
|
6
6
|
http (~> 5.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (7.1.3)
|
11
|
+
activesupport (7.1.3.2)
|
12
12
|
base64
|
13
13
|
bigdecimal
|
14
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -22,22 +22,21 @@ GEM
|
|
22
22
|
public_suffix (>= 2.0.2, < 6.0)
|
23
23
|
ast (2.4.2)
|
24
24
|
base64 (0.2.0)
|
25
|
-
bigdecimal (3.1.
|
25
|
+
bigdecimal (3.1.7)
|
26
26
|
byebug (11.1.3)
|
27
27
|
coderay (1.1.3)
|
28
28
|
concurrent-ruby (1.2.3)
|
29
29
|
connection_pool (2.4.1)
|
30
|
-
crack (0.
|
30
|
+
crack (1.0.0)
|
31
31
|
bigdecimal
|
32
32
|
rexml
|
33
33
|
diff-lcs (1.5.1)
|
34
34
|
docile (1.4.0)
|
35
35
|
domain_name (0.6.20240107)
|
36
|
-
drb (2.2.
|
37
|
-
ruby2_keywords
|
36
|
+
drb (2.2.1)
|
38
37
|
ffi (1.16.3)
|
39
|
-
ffi-compiler (1.
|
40
|
-
ffi (>= 1.
|
38
|
+
ffi-compiler (1.3.2)
|
39
|
+
ffi (>= 1.15.5)
|
41
40
|
rake
|
42
41
|
formatador (1.1.0)
|
43
42
|
guard (2.18.1)
|
@@ -64,11 +63,11 @@ GEM
|
|
64
63
|
http-cookie (1.0.5)
|
65
64
|
domain_name (~> 0.5)
|
66
65
|
http-form_data (2.3.0)
|
67
|
-
i18n (1.14.
|
66
|
+
i18n (1.14.4)
|
68
67
|
concurrent-ruby (~> 1.0)
|
69
68
|
json (2.7.1)
|
70
69
|
language_server-protocol (3.17.0.3)
|
71
|
-
listen (3.
|
70
|
+
listen (3.9.0)
|
72
71
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
73
72
|
rb-inotify (~> 0.9, >= 0.9.10)
|
74
73
|
llhttp-ffi (0.5.0)
|
@@ -76,7 +75,7 @@ GEM
|
|
76
75
|
rake (~> 13.0)
|
77
76
|
lumberjack (1.2.10)
|
78
77
|
method_source (1.0.0)
|
79
|
-
minitest (5.22.
|
78
|
+
minitest (5.22.3)
|
80
79
|
mutex_m (0.2.0)
|
81
80
|
nenv (0.3.0)
|
82
81
|
notiffany (0.1.3)
|
@@ -89,10 +88,10 @@ GEM
|
|
89
88
|
pry (0.14.2)
|
90
89
|
coderay (~> 1.1)
|
91
90
|
method_source (~> 1.0)
|
92
|
-
public_suffix (5.0.
|
91
|
+
public_suffix (5.0.5)
|
93
92
|
racc (1.7.3)
|
94
93
|
rainbow (3.1.1)
|
95
|
-
rake (13.
|
94
|
+
rake (13.2.0)
|
96
95
|
rb-fsevent (0.11.2)
|
97
96
|
rb-inotify (0.10.1)
|
98
97
|
ffi (~> 1.0)
|
@@ -110,8 +109,8 @@ GEM
|
|
110
109
|
rspec-mocks (3.13.0)
|
111
110
|
diff-lcs (>= 1.2.0, < 2.0)
|
112
111
|
rspec-support (~> 3.13.0)
|
113
|
-
rspec-support (3.13.
|
114
|
-
rubocop (1.
|
112
|
+
rspec-support (3.13.1)
|
113
|
+
rubocop (1.62.1)
|
115
114
|
json (~> 2.3)
|
116
115
|
language_server-protocol (>= 3.17.0)
|
117
116
|
parallel (~> 1.10)
|
@@ -119,20 +118,19 @@ GEM
|
|
119
118
|
rainbow (>= 2.2.2, < 4.0)
|
120
119
|
regexp_parser (>= 1.8, < 3.0)
|
121
120
|
rexml (>= 3.2.5, < 4.0)
|
122
|
-
rubocop-ast (>= 1.
|
121
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
123
122
|
ruby-progressbar (~> 1.7)
|
124
123
|
unicode-display_width (>= 2.4.0, < 3.0)
|
125
|
-
rubocop-ast (1.
|
126
|
-
parser (>= 3.
|
127
|
-
rubocop-performance (1.
|
124
|
+
rubocop-ast (1.31.2)
|
125
|
+
parser (>= 3.3.0.4)
|
126
|
+
rubocop-performance (1.21.0)
|
128
127
|
rubocop (>= 1.48.1, < 2.0)
|
129
|
-
rubocop-ast (>= 1.
|
128
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
130
129
|
rubocop-rake (0.6.0)
|
131
130
|
rubocop (~> 1.0)
|
132
131
|
rubocop-rspec (1.42.0)
|
133
132
|
rubocop (>= 0.87.0)
|
134
133
|
ruby-progressbar (1.13.0)
|
135
|
-
ruby2_keywords (0.0.5)
|
136
134
|
shellany (0.0.1)
|
137
135
|
simplecov (0.22.0)
|
138
136
|
docile (~> 1.1)
|
@@ -140,15 +138,15 @@ GEM
|
|
140
138
|
simplecov_json_formatter (~> 0.1)
|
141
139
|
simplecov-html (0.12.3)
|
142
140
|
simplecov_json_formatter (0.1.4)
|
143
|
-
thor (1.3.
|
141
|
+
thor (1.3.1)
|
144
142
|
tzinfo (2.0.6)
|
145
143
|
concurrent-ruby (~> 1.0)
|
146
144
|
unicode-display_width (2.5.0)
|
147
|
-
webmock (3.
|
145
|
+
webmock (3.23.0)
|
148
146
|
addressable (>= 2.8.0)
|
149
147
|
crack (>= 0.3.2)
|
150
148
|
hashdiff (>= 0.4.0, < 2.0.0)
|
151
|
-
yard (0.9.
|
149
|
+
yard (0.9.36)
|
152
150
|
|
153
151
|
PLATFORMS
|
154
152
|
ruby
|
@@ -168,4 +166,4 @@ DEPENDENCIES
|
|
168
166
|
yard (~> 0.9)
|
169
167
|
|
170
168
|
BUNDLED WITH
|
171
|
-
2.
|
169
|
+
2.5.7
|
data/README.md
CHANGED
@@ -60,9 +60,7 @@ Use the Thunder Client extension for VS Code to test/inspect API calls.
|
|
60
60
|
|
61
61
|
General instructions for publishing a gem are available in this [RubyGems guide](https://guides.rubygems.org/publishing/#publishing-to-rubygemsorg).
|
62
62
|
|
63
|
-
|
64
|
-
1. Ensure the gem can be built and is at the correct version number: `bundle exec rake install`
|
65
|
-
1. Publish the gem `gem push pkg/faithteams-api-2.0.0.gem
|
63
|
+
Once a gem is ready to be published, a release can be made and [the GitHub Action](https://guides.rubygems.org/trusted-publishing/releasing-gems/) [rubygems.yml](./.github/workflows/rubygems.yml) will publish the gem to RubyGems.
|
66
64
|
|
67
65
|
## License
|
68
66
|
|
data/faithteams-api.gemspec
CHANGED
@@ -18,8 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
|
19
19
|
spec.metadata["homepage_uri"] = spec.homepage
|
20
20
|
spec.metadata["source_code_uri"] = "https://github.com/tithely/faithteams-api"
|
21
|
-
spec.metadata["changelog_uri"] = "https://github.com/tithely/faithteams-api/blob/master/doc/CHANGELOG.md"
|
22
21
|
spec.metadata["github_repo"] = "https://github.com/tithely/faithteams-api"
|
22
|
+
spec.metadata["changelog_uri"] = "https://github.com/tithely/faithteams-api/blob/master/CHANGELOG.md"
|
23
|
+
spec.metadata["bug_tracker_uri"] = "https://github.com/tithely/faithteams-api/issues"
|
24
|
+
spec.metadata["documentation_uri"] = "https://github.com/tithely/faithteams-api/blob/master/README.md"
|
23
25
|
|
24
26
|
# Specify which files should be added to the gem when it is released.
|
25
27
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -10,7 +10,6 @@ module FaithTeams
|
|
10
10
|
class Connection
|
11
11
|
# Specific base urls for different resources
|
12
12
|
ENDPOINT_BASE_URLS = {
|
13
|
-
"authenticate" => "https://app.faithteams.com/api/v2",
|
14
13
|
"batches" => "https://api-v2.faithteams.com",
|
15
14
|
"contributions" => "https://api-v2.faithteams.com",
|
16
15
|
"contributiontypes" => "https://api-v2.faithteams.com",
|
@@ -77,8 +76,6 @@ module FaithTeams
|
|
77
76
|
response = http.get(url, params: params)
|
78
77
|
end
|
79
78
|
break if response.status != 401 || retries >= 2
|
80
|
-
|
81
|
-
authenticate
|
82
79
|
end
|
83
80
|
|
84
81
|
raise Error::Request.new(response: response, message: "Request unsuccessful (#{response.status})") unless response.status.success?
|
@@ -116,7 +113,7 @@ module FaithTeams
|
|
116
113
|
|
117
114
|
# @return [HTTP::Client]
|
118
115
|
def http
|
119
|
-
@http ||= HTTP.
|
116
|
+
@http ||= HTTP.basic_auth(user: user_id, pass: password)
|
120
117
|
end
|
121
118
|
|
122
119
|
# @param path [String]
|
@@ -124,18 +121,6 @@ module FaithTeams
|
|
124
121
|
def base_url(path:)
|
125
122
|
ENDPOINT_BASE_URLS[path.split("/")[1]]
|
126
123
|
end
|
127
|
-
|
128
|
-
# Set the auth_token for these requests
|
129
|
-
# @return [String]
|
130
|
-
def auth_token
|
131
|
-
@auth_token ||= user_resource.authenticate
|
132
|
-
end
|
133
|
-
|
134
|
-
# Resets existing auth_token and re-authenticates
|
135
|
-
def authenticate
|
136
|
-
@auth_token = nil
|
137
|
-
auth_token
|
138
|
-
end
|
139
124
|
end
|
140
125
|
end
|
141
126
|
end
|
@@ -32,11 +32,6 @@ module FaithTeams
|
|
32
32
|
@contribution ||= Resource::Contribution.new(connection: connection)
|
33
33
|
end
|
34
34
|
|
35
|
-
# @return [Resource::User]
|
36
|
-
def user
|
37
|
-
@user ||= Resource::User.new(connection: connection)
|
38
|
-
end
|
39
|
-
|
40
35
|
# @return [Resource::ContributionType]
|
41
36
|
def contribution_type
|
42
37
|
@contribution_type ||= Resource::ContributionType.new(connection: connection)
|
data/lib/faithteams/version.rb
CHANGED