esa 3.1.0 → 3.2.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/CHANGELOG.md +3 -0
- data/README.md +3 -0
- data/lib/esa/client.rb +6 -2
- data/lib/esa/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3089322959101e1af0cf6af4f0157da7a32c330a1e3932ba06e8186ba5bbf9c
|
4
|
+
data.tar.gz: 98999fb35d75f5b2e6d807db662c013b086eda587d215c20c93efe54fe577773
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b9471c0180ae168c740a3e925847e8c322e220d8b9fde86345b6aac4162a7b110ecbdcffd673dea89f28db8a3c3ea44f4fb9ff697ffdfca078608a827530c43
|
7
|
+
data.tar.gz: 4480d074b055194abc5d8ba033164ab734bd33e1afad5b2fbc400d8463f7a8aae96be774011b9495bd7dba9870d12b8231fa36386da4cbc71a5d8267da128879
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -26,6 +26,9 @@ Or install it yourself as:
|
|
26
26
|
# Initialization
|
27
27
|
client = Esa::Client.new(access_token: "<access_token>", current_team: 'foo')
|
28
28
|
|
29
|
+
# Initialization with faraday_middlewares
|
30
|
+
# client = Esa::Client.new(access_token: "<access_token>", current_team: 'foo', faraday_middlewares: [Faraday::Response::Logger])
|
31
|
+
|
29
32
|
# Authenticated User API
|
30
33
|
client.user
|
31
34
|
#=> GET /v1/user
|
data/lib/esa/client.rb
CHANGED
@@ -8,14 +8,15 @@ module Esa
|
|
8
8
|
|
9
9
|
include ApiMethods
|
10
10
|
|
11
|
-
def initialize(access_token: nil, api_endpoint: nil, current_team: nil, default_headers: {}, retry_on_rate_limit_exceeded: true)
|
11
|
+
def initialize(access_token: nil, api_endpoint: nil, current_team: nil, default_headers: {}, retry_on_rate_limit_exceeded: true, faraday_middlewares: [])
|
12
12
|
@access_token = access_token
|
13
13
|
@api_endpoint = api_endpoint
|
14
14
|
@current_team = current_team
|
15
15
|
@default_headers = default_headers
|
16
16
|
@retry_on_rate_limit_exceeded = retry_on_rate_limit_exceeded
|
17
|
+
@faraday_middlewares = faraday_middlewares
|
17
18
|
end
|
18
|
-
attr_accessor :current_team, :default_headers, :retry_on_rate_limit_exceeded
|
19
|
+
attr_accessor :current_team, :default_headers, :retry_on_rate_limit_exceeded, :faraday_middlewares
|
19
20
|
|
20
21
|
def current_team!
|
21
22
|
raise TeamNotSpecifiedError, "current_team is not specified" unless @current_team
|
@@ -63,6 +64,7 @@ module Esa
|
|
63
64
|
|
64
65
|
def esa_connection
|
65
66
|
@esa_connection ||= Faraday.new(faraday_options) do |c|
|
67
|
+
faraday_middlewares.each { |faraday_middleware| c.use faraday_middleware }
|
66
68
|
c.request :json
|
67
69
|
c.response :json
|
68
70
|
c.adapter Faraday.default_adapter
|
@@ -71,6 +73,7 @@ module Esa
|
|
71
73
|
|
72
74
|
def s3_connection
|
73
75
|
@s3_connection ||= Faraday.new do |c|
|
76
|
+
faraday_middlewares.each { |faraday_middleware| c.use faraday_middleware }
|
74
77
|
c.request :multipart
|
75
78
|
c.request :url_encoded
|
76
79
|
c.response :xml
|
@@ -80,6 +83,7 @@ module Esa
|
|
80
83
|
|
81
84
|
def simple_connection
|
82
85
|
@simple_connection ||= Faraday.new do |c|
|
86
|
+
faraday_middlewares.each { |faraday_middleware| c.use faraday_middleware }
|
83
87
|
c.adapter Faraday.default_adapter
|
84
88
|
end
|
85
89
|
end
|
data/lib/esa/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fukayatsu
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: base64
|
@@ -217,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
217
217
|
- !ruby/object:Gem::Version
|
218
218
|
version: '0'
|
219
219
|
requirements: []
|
220
|
-
rubygems_version: 3.6.
|
220
|
+
rubygems_version: 3.6.7
|
221
221
|
specification_version: 4
|
222
222
|
summary: esa API v1 client library, written in Ruby
|
223
223
|
test_files: []
|