faithteams-api 2.0.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -8,7 +8,7 @@
|
|
8
8
|
"data": [
|
9
9
|
{
|
10
10
|
"name": "auth_token",
|
11
|
-
"value": "
|
11
|
+
"value": "8kLF5Ok2knX9qZMe2JEgEQ22L4YLTZA3w9yXk49NnR9Ld0r5urUcAnna97suOcvkhH"
|
12
12
|
},
|
13
13
|
{
|
14
14
|
"name": "contribution_type_id",
|
@@ -16,11 +16,11 @@
|
|
16
16
|
},
|
17
17
|
{
|
18
18
|
"name": "contribution_id",
|
19
|
-
"value": "
|
19
|
+
"value": "5384950"
|
20
20
|
},
|
21
21
|
{
|
22
22
|
"name": "contribution_parent_id",
|
23
|
-
"value": "
|
23
|
+
"value": "5384949"
|
24
24
|
},
|
25
25
|
{
|
26
26
|
"name": "batch_id",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
},
|
37
37
|
{
|
38
38
|
"name": "person_id",
|
39
|
-
"value": "
|
39
|
+
"value": "814107"
|
40
40
|
},
|
41
41
|
{
|
42
42
|
"name": "person_id_created",
|
@@ -52,7 +52,7 @@
|
|
52
52
|
},
|
53
53
|
{
|
54
54
|
"name": "user_id",
|
55
|
-
"value": "tithely-
|
55
|
+
"value": "tithely-2@mg.faithteams.com"
|
56
56
|
}
|
57
57
|
],
|
58
58
|
"envFile": "faithteams.env"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faithteams-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tithe.ly Integrations
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -203,8 +203,11 @@ files:
|
|
203
203
|
- ".github/CODEOWNERS"
|
204
204
|
- ".github/CONTRIBUTING.md"
|
205
205
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
206
|
-
- ".github/workflows/
|
207
|
-
- ".github/workflows/
|
206
|
+
- ".github/workflows/editorconfig.yml"
|
207
|
+
- ".github/workflows/rubocop.yml"
|
208
|
+
- ".github/workflows/rubygems.yml"
|
209
|
+
- ".github/workflows/tester.yml"
|
210
|
+
- ".github/workflows/yard.yml"
|
208
211
|
- ".gitignore"
|
209
212
|
- ".rspec"
|
210
213
|
- ".rubocop.yml"
|
@@ -246,10 +249,10 @@ files:
|
|
246
249
|
- lib/faithteams/api/v2/resource/contribution_type.rb
|
247
250
|
- lib/faithteams/api/v2/resource/fund.rb
|
248
251
|
- lib/faithteams/api/v2/resource/person.rb
|
249
|
-
- lib/faithteams/api/v2/resource/user.rb
|
250
252
|
- lib/faithteams/version.rb
|
251
253
|
- thunder-tests/.gitignore
|
252
|
-
- thunder-tests/collections/tc_col_faithteams.json
|
254
|
+
- thunder-tests/collections/tc_col_faithteams-api.json
|
255
|
+
- thunder-tests/collections/tc_col_faithteams-app.json
|
253
256
|
- thunder-tests/environments/tc_env_faithteams.json
|
254
257
|
- thunder-tests/faithteams.env.template
|
255
258
|
homepage: https://github.com/tithely/faithteams-api
|
@@ -259,9 +262,11 @@ metadata:
|
|
259
262
|
allowed_push_host: https://rubygems.org
|
260
263
|
homepage_uri: https://github.com/tithely/faithteams-api
|
261
264
|
source_code_uri: https://github.com/tithely/faithteams-api
|
262
|
-
changelog_uri: https://github.com/tithely/faithteams-api/blob/master/doc/CHANGELOG.md
|
263
265
|
github_repo: https://github.com/tithely/faithteams-api
|
264
|
-
|
266
|
+
changelog_uri: https://github.com/tithely/faithteams-api/blob/master/CHANGELOG.md
|
267
|
+
bug_tracker_uri: https://github.com/tithely/faithteams-api/issues
|
268
|
+
documentation_uri: https://github.com/tithely/faithteams-api/blob/master/README.md
|
269
|
+
post_install_message:
|
265
270
|
rdoc_options: []
|
266
271
|
require_paths:
|
267
272
|
- lib
|
@@ -276,8 +281,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
276
281
|
- !ruby/object:Gem::Version
|
277
282
|
version: '0'
|
278
283
|
requirements: []
|
279
|
-
rubygems_version: 3.5.
|
280
|
-
signing_key:
|
284
|
+
rubygems_version: 3.5.9
|
285
|
+
signing_key:
|
281
286
|
specification_version: 4
|
282
287
|
summary: A Faithteams API client gem.
|
283
288
|
test_files: []
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# Pulls in multiple workflows into a single file for use with PRs.
|
2
|
-
name: Puller
|
3
|
-
|
4
|
-
on:
|
5
|
-
pull_request:
|
6
|
-
types: [ opened, reopened, synchronize ]
|
7
|
-
workflow_dispatch:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
tester:
|
11
|
-
uses: tithely/gem-workflows/.github/workflows/tester.yml@master
|
12
|
-
editorconfig:
|
13
|
-
uses: tithely/gem-workflows/.github/workflows/editorconfig.yml@master
|
14
|
-
rubocop:
|
15
|
-
uses: tithely/gem-workflows/.github/workflows/rubocop.yml@master
|
16
|
-
yard:
|
17
|
-
uses: tithely/gem-workflows/.github/workflows/yard.yml@master
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module FaithTeams
|
4
|
-
module API
|
5
|
-
module V2
|
6
|
-
module Resource
|
7
|
-
# User resource
|
8
|
-
class User < Base
|
9
|
-
# @return [String] auth_token
|
10
|
-
# @raise [Error::Request]
|
11
|
-
def authenticate
|
12
|
-
response = http.post("#{FaithTeams::API::V2::Connection::ENDPOINT_BASE_URLS["authenticate"]}/authenticate")
|
13
|
-
|
14
|
-
# raise errors
|
15
|
-
raise Error::Request.new(response: response, message: "Request unsuccessful (#{response.status})") unless response.status.success?
|
16
|
-
|
17
|
-
# parse response
|
18
|
-
begin
|
19
|
-
response_body = response.parse(:json)
|
20
|
-
rescue JSON::ParserError
|
21
|
-
raise Error::Request.new(response: response, message: "Failed to parse JSON")
|
22
|
-
end
|
23
|
-
|
24
|
-
response_body.dig("data", "token")
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
attr_reader :http
|
30
|
-
|
31
|
-
# @return [HTTP::Client]
|
32
|
-
def http
|
33
|
-
user_credentials = Base64.strict_encode64("#{connection.user_id}:#{connection.password}")
|
34
|
-
@http ||= HTTP.auth("Basic #{user_credentials}")
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|