faithteams-api 2.0.2 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac6d3897acd44723824115a31b937af2486f493af9b3ffdb7f18d88f685841f3
4
- data.tar.gz: 75db15fcaf0b3d113eff4d7556f79a74baa36325641e7a10523cf935377569bf
3
+ metadata.gz: '01586c73ee318708383bb14df2011145b83ca9ec382ddf0cfe2ebc49cee3fac3'
4
+ data.tar.gz: 4a0c59dbc8428336ae1e286571679492756a8fb72aa6caec286d5d5cbf5c5d77
5
5
  SHA512:
6
- metadata.gz: b56441830101ecb2d19c20bccd154611d879291db39023c4244cf189bc175265fc930387d6b0ec79f9ef980da01075184f8829041049ccf740761a39ae6f4471
7
- data.tar.gz: 33643b5271fe6ee6e9c36920a90ef17d4cce4fbb57f4bc9cc3ed37af7a13a20c06dd83fe63c50aa536ae1e26c5f3f118705a046883e6588e862d0b5538cdd9d9
6
+ metadata.gz: b702bc6fb5800697729f51a0bed56bbf6840f2d24f8da7dd9c3a9df1e32940e1e9d96155ba124f30ec1bc1cbceee3a80b9b0be1a702dd607d8298c3f90c76c79
7
+ data.tar.gz: 3a0380ff6826f18fcd405af6bd9bf3c0d0478bbf479cfc65f17182f620986a115564eb14ee9449276ae2d75d143e85f9728a84b037abe79c4d4f141034a3f072
data/CHANGELOG.md CHANGED
@@ -7,7 +7,17 @@ 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
- ## [2.0.2] - 2024-04-03
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
11
21
 
12
22
  ### Fixed
13
23
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- faithteams-api (2.0.2)
4
+ faithteams-api (3.0.0)
5
5
  activesupport (>= 6.1.7)
6
6
  http (~> 5.1)
7
7
 
@@ -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.headers("Token" => "#{auth_token}")
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)
@@ -5,7 +5,6 @@ require_relative "resource/batch"
5
5
  require_relative "resource/fund"
6
6
  require_relative "resource/person"
7
7
  require_relative "resource/contribution"
8
- require_relative "resource/user"
9
8
  require_relative "resource/contribution_type"
10
9
 
11
10
  module FaithTeams
@@ -2,5 +2,5 @@
2
2
 
3
3
  module FaithTeams
4
4
  # Current version number.
5
- VERSION = "2.0.2"
5
+ VERSION = "3.0.0"
6
6
  end