checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
---
2
2
SHA256:
3
- metadata.gz: 1413d4e46506230bb025b09141ed382ff241a020711771023fdde4c3a5ecf426
4
- data.tar.gz: 230997aef7c02db7fde6940fe047d59ba63063a4b71a07369a95ac28d935d925
3
+ metadata.gz: caed325a3eff3edb0ddfc9cc8ac8239c1fc258fc64c22b7815e39d3a27bc050c
4
+ data.tar.gz: c5c25fbae8d87cf6b72c56cd6dd1087ef627ae3a55f60c87b5a7fd4c8b93f10f
5
5
SHA512:
6
- metadata.gz: ebf9ed99dc0a9d83de31b3a093f02afef815f4fc699662b320338a9e3d3ffff3dfd41aa5a6cc69460d5deeaad6d4cde88a45a323f91994ea7c7a5f0390d4b0be
7
- data.tar.gz: 9e3a7a7773a0fca1986bdac76b1a55a38fe63ff12e60825c755cb416ecb98117b6d1025341f14f48b7b22c46f408442d29f7c628ceb2801e64f0fc3e0732e6b7
6
+ metadata.gz: b14c7ac8b74a330928d069065cb396a6ee25b556611739e84b2b0cc857cc42a73b58b2bbce7cdc380390cee2a09f6a47638bb0820197990cf7632217fab5ff38
7
+ data.tar.gz: 139b5610355363eb11e0b2f7ffe87e29d66e02d99452262308a8bae9fe93da41824200d3bff11c0d301b560bbc8aed9fa74cfacdb340221a48e8b48c9fd8645d
data/.drone.yml ADDED
@@ -0,0 +1,41 @@
1
+ kind: pipeline
2
+ name: Bearer Ruby - Publish Gem
3
+
4
+ steps:
5
+ - name: Install
6
+ image: ruby:2.6.5
7
+ commands:
8
+ - gem build bearer.gemspec
9
+ - name: Push
10
+ image: ruby:2.6.5
11
+ commands:
12
+ - /bin/bash bin/setup-credentials
13
+ - gem push *.gem
14
+ environment:
15
+ RUBYGEMS_AUTH_TOKEN:
16
+ from_secret: RUBYGEMS_AUTH_TOKEN
17
+ trigger:
18
+ event:
19
+ - tag
20
+ ref:
21
+ - refs/tags/release-v*
22
+
23
+ ---
24
+ kind: pipeline
25
+ name: Bearer Ruby - Build and Test
26
+
27
+ clone:
28
+ depth: 50
29
+
30
+ steps:
31
+ - name: install dependencies & test & rubocop
32
+ image: ruby:2.6.5
33
+ commands:
34
+ - gem install bundler
35
+ - bundle install --deployment --without development
36
+ - bundle exec rspec spec
37
+ - bundle exec rubocop
38
+ when:
39
+ event:
40
+ - pull_request
41
+ - push
data/.github/main.workflow DELETED
@@ -1,23 +0,0 @@
1
- workflow "Build, Test, and Publish" {
2
- on = "push"
3
- resolves = ["Publish"]
4
- }
5
-
6
- action "Build" {
7
- uses = "scarhand/actions-ruby@master"
8
- args = "build *.gemspec"
9
- }
10
-
11
- # Filter for a new tag
12
- action "Tag" {
13
- needs = "Build"
14
- uses = "actions/bin/filter@master"
15
- args = "tag v*"
16
- }
17
-
18
- action "Publish" {
19
- needs = "Tag"
20
- uses = "scarhand/actions-ruby@master"
21
- args = "push *.gem"
22
- secrets = ["RUBYGEMS_AUTH_TOKEN"]
23
- }
data/.rubocop.yml CHANGED
@@ -27,9 +27,13 @@ Metrics/BlockLength:
27
27
Exclude:
28
28
- 'app/admin/**/*'
29
29
30
+
30
31
Metrics/MethodLength:
31
32
Max: 20
32
33
34
+ Metrics/AbcSize:
35
+ Max: 20
36
+
33
37
Style/Documentation:
34
38
Enabled: false
35
39
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.1
1
+ 2.6.5
data/Gemfile CHANGED
@@ -6,3 +6,18 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
7
7
# Specify your gem's dependencies in bearer.gemspec
8
8
gemspec
9
+
10
+ group :development do
11
+ gem "rake", "~> 10.0"
12
+ gem "pry", "~> 0.12.2"
13
+ gem "pry-byebug", "~> 3.7.0"
14
+ gem "overcommit", "~> 0.50.0"
15
+ gem "solargraph", "~> 0.37.2"
16
+ end
17
+
18
+ group :ci do
19
+ gem "bundler", "~> 2.0"
20
+ gem "rspec", "~> 3.0"
21
+ gem "rubocop", "~> 0.65.0"
22
+ gem "webmock", "~> 3.7.6"
23
+ end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
PATH
2
2
remote: .
3
3
specs:
4
- bearer (2.0.0)
4
+ bearer (3.0.0)
5
5
6
6
GEM
7
7
remote: https://rubygems.org/
@@ -94,14 +94,14 @@ PLATFORMS
94
94
DEPENDENCIES
95
95
bearer!
96
96
bundler (~> 2.0)
97
- overcommit
98
- pry
99
- pry-byebug
97
+ overcommit (~> 0.50.0)
98
+ pry (~> 0.12.2)
99
+ pry-byebug (~> 3.7.0)
100
100
rake (~> 10.0)
101
101
rspec (~> 3.0)
102
102
rubocop (~> 0.65.0)
103
- solargraph
104
- webmock
103
+ solargraph (~> 0.37.2)
104
+ webmock (~> 3.7.6)
105
105
106
106
BUNDLED WITH
107
107
2.0.2
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Bearer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -40,7 +40,7 @@ github = (
40
40
.auth("your auth id") # Create an auth id for your integration via the dashboard
41
41
)
42
42
43
- puts JSON.parse(github.get("/repositories").body)
43
+ puts github.get("/repositories").data
44
44
```
45
45
46
46
We use `Net::HTTP` internally and we
@@ -51,10 +51,10 @@ More advanced examples:
51
51
52
52
```ruby
53
53
# With query parameters
54
- puts JSON.parse(github.get("/repositories", query: { since: 364 }).body)
54
+ puts github.get("/repositories", query: { since: 364 }).data
55
55
56
56
# With body data
57
- puts JSON.parse(github.post("/user/repos", body: { name: "Just setting up my Bearer.sh" }).body)
57
+ puts github.post("/user/repos", body: { name: "Just setting up my Bearer.sh" }).data
58
58
```
59
59
60
60
### Global configuration
@@ -72,7 +72,7 @@ You can now use the client without having to pass the Secret Key each time:
72
72
```ruby
73
73
github = Bearer.integration("your integration id").auth("your auth id")
74
74
75
- puts JSON.parse(github.get("/repositories").body)
75
+ puts github.get("/repositories").data
76
76
```
77
77
### Setting the request timeout
78
78
@@ -88,12 +88,12 @@ end
88
88
89
89
github = Bearer.integration("your integration id", { read_timeout: 10 })
90
90
91
- puts JSON.parse(github.get("/repositories").body) # This request will timeout after 10 seconds
91
+ puts github.get("/repositories").data # This request will timeout after 10 seconds
92
92
```
93
93
94
94
## Development
95
95
96
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
96
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. Also make sure you have `overcommit` installed and initialized in the repo [check overcommit repo](https://github.com/sds/overcommit) for further reference.
97
97
98
98
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
99
99
data/bearer.gemspec CHANGED
@@ -25,14 +25,4 @@ Gem::Specification.new do |spec|
25
25
spec.bindir = "exe"
26
26
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
27
spec.require_paths = ["lib"]
28
-
29
- spec.add_development_dependency "bundler", "~> 2.0"
30
- spec.add_development_dependency "rake", "~> 10.0"
31
- spec.add_development_dependency "rspec", "~> 3.0"
32
- spec.add_development_dependency "rubocop", "~> 0.65.0"
33
- spec.add_development_dependency "pry"
34
- spec.add_development_dependency "pry-byebug"
35
- spec.add_development_dependency "overcommit"
36
- spec.add_development_dependency "webmock"
37
- spec.add_development_dependency "solargraph"
38
28
end
data/bin/setup-credentials ADDED
@@ -0,0 +1,8 @@
1
+ set -e
2
+
3
+ mkdir -p ~/.gem
4
+ echo "---
5
+ https://rubygems.org/: $RUBYGEMS_AUTH_TOKEN
6
+ :rubygems_api_key: $RUBYGEMS_AUTH_TOKEN" > ~/.gem/credentials
7
+
8
+ chmod 0600 ~/.gem/credentials
data/lib/bearer.rb CHANGED
@@ -2,6 +2,8 @@
2
2
3
3
require_relative "./bearer/configuration"
4
4
require_relative "./bearer/integration"
5
+ require_relative "./bearer/response"
6
+ require "logger"
5
7
6
8
# Ruby bindings for Bearer
7
9
class Bearer
@@ -33,4 +35,10 @@ class Bearer
33
35
def self.integration(integration_id, http_client_settings: {})
34
36
new.integration(integration_id, http_client_settings: http_client_settings)
35
37
end
38
+
39
+ # @see {Logger}
40
+ # @return [Logger]
41
+ def self.logger
42
+ @logger ||= Logger.new(STDOUT, level: Bearer::Configuration.log_level)
43
+ end
36
44
end
data/lib/bearer/configuration.rb CHANGED
@@ -23,6 +23,10 @@ class Bearer
23
23
encryption_key
24
24
host
25
25
http_client_settings
26
+ log_level
27
+ max_network_retries
28
+ max_network_retry_delay
29
+ initial_network_retry_delay
26
30
].freeze
27
31
28
32
DEPRECATED_FIELDS = %i[
@@ -36,17 +40,41 @@ class Bearer
36
40
DEFAULT_READ_TIMEOUT = 5
37
41
DEFAULT_OPEN_TIMEOUT = 5
38
42
43
+ DEFAULT_MAX_NETWORK_RETRIES = 0
44
+ DEFAULT_MAX_NETWORK_RETRY_DELAY = 2
45
+ DEFAULT_INITIAL_NETWORK_RETRY_DELAY = 0.5
46
+
39
47
# @return [String]
40
48
def integration_host
41
49
deprecate("integration_host", "host")
42
50
host
43
51
end
44
52
53
+ # @return [Integer]
54
+ def log_level
55
+ @log_level ||= :info
56
+ end
57
+
45
58
# @return [String]
46
59
def host
47
60
@host ||= PRODUCTION_INTEGRATION_HOST
48
61
end
49
62
63
+ # @return [Integer]
64
+ def max_network_retries
65
+ @max_network_retries ||= DEFAULT_MAX_NETWORK_RETRIES
66
+ end
67
+
68
+ # @return [Float]
69
+ def max_network_retry_delay
70
+ @max_network_retry_delay ||= DEFAULT_MAX_NETWORK_RETRY_DELAY
71
+ end
72
+
73
+ # @return [Float]
74
+ def initial_network_retry_delay
75
+ @initial_network_retry_delay ||= DEFAULT_INITIAL_NETWORK_RETRY_DELAY
76
+ end
77
+
50
78
# @return [Hash]
51
79
def http_client_settings
52
80
default_http_client_settings.merge(@http_client_settings || {})
@@ -132,6 +160,11 @@ class Bearer
132
160
@http_client_settings = value
133
161
end
134
162
163
+ def log_level=(severity)
164
+ Bearer.logger.level = severity
165
+ @log_level = severity
166
+ end
167
+
135
168
class << self
136
169
ALL_METHODS = [*FIELDS, *DEPRECATED_FIELDS].freeze
137
170
EXISTING_METHODS = ALL_METHODS.flat_map { |field| [field, "#{field}=".to_sym] }
@@ -147,7 +180,8 @@ class Bearer
147
180
148
181
def reset
149
182
FIELDS.each do |field|
150
- instance.public_send("#{field}=", nil)
183
+ value = field == :log_level ? :info : nil
184
+ instance.public_send("#{field}=", value)
151
185
end
152
186
end
153
187
data/lib/bearer/integration.rb CHANGED
@@ -122,6 +122,47 @@ class Bearer
122
122
make_request(method: method, url: url, query: query, body: body, headers: request_headers)
123
123
end
124
124
125
+ # Checks if an error is a problem that we should retry on. This includes
126
+ # both socket errors that may represent an intermittent problem and some
127
+ # special HTTP statuses.
128
+ # TODO: handle bearer errors like 500 statuses
129
+ def self.should_retry?(error, num_retries:)
130
+ return false if num_retries >= Bearer::Configuration.max_network_retries
131
+
132
+ case error
133
+ when Net::OpenTimeout, Net::ReadTimeout
134
+ # Retry on timeout-related problems (either on open or read).
135
+ true
136
+ when EOFError, Errno::ECONNREFUSED, Errno::ECONNRESET,
137
+ Errno::EHOSTUNREACH, Errno::ETIMEDOUT, SocketError
138
+ # Destination refused the connection, the connection was reset, or a
139
+ # variety of other connection failures. This could occur from a single
140
+ # saturated server, so retry in case it's intermittent.
141
+ true
142
+ else
143
+ false
144
+ end
145
+ end
146
+
147
+ def self.sleep_time(num_retries)
148
+ # Apply exponential backoff with initial_network_retry_delay on the
149
+ # number of num_retries so far as inputs. Do not allow the number to
150
+ # exceed max_network_retry_delay.
151
+ sleep_seconds = [
152
+ Bearer::Configuration.initial_network_retry_delay * (2**(num_retries - 1)),
153
+ Bearer::Configuration.max_network_retry_delay
154
+ ].min
155
+
156
+ # Apply some jitter by randomizing the value in the range of
157
+ # (sleep_seconds / 2) to (sleep_seconds).
158
+ sleep_seconds *= (0.5 * (1 + rand))
159
+
160
+ # But never sleep less than the base sleep seconds.
161
+ sleep_seconds = [Bearer::Configuration.initial_network_retry_delay, sleep_seconds].max
162
+
163
+ sleep_seconds
164
+ end
165
+
125
166
private
126
167
127
168
# @return [Hash]
@@ -129,17 +170,75 @@ class Bearer
129
170
Bearer::Configuration.http_client_settings.merge(@http_client_settings)
130
171
end
131
172
173
+ # rubocop:disable Metrics/MethodLength,Metrics/AbcSize
132
174
def make_request(method:, url:, query:, body:, headers:)
175
+ num_retries = 0
133
176
parsed_url = URI(url)
134
177
parsed_url.query = URI.encode_www_form(query) if query
135
178
136
- Net::HTTP.start(
137
- parsed_url.hostname,
138
- parsed_url.port,
139
- use_ssl: parsed_url.scheme == "https",
140
- **http_client_settings
141
- ) do |http|
142
- http.send_request(method, parsed_url, body ? body.to_json : nil, headers)
179
+ debug_request(parsed_url: parsed_url,
180
+ http_client_settings: http_client_settings,
181
+ method: method,
182
+ body: body,
183
+ headers: headers)
184
+ begin
185
+ response = Net::HTTP.start(
186
+ parsed_url.hostname,
187
+ parsed_url.port,
188
+ use_ssl: parsed_url.scheme == "https",
189
+ **http_client_settings
190
+ ) do |http|
191
+ http.send_request(method, parsed_url, body ? body.to_json : nil, headers)
192
+ end.tap(&info_response)
193
+
194
+ Bearer::Response.from_net_http(response)
195
+ rescue StandardError => e
196
+ Bearer.logger.warn("Bearer") do
197
+ <<-WARN.gsub(/^\s+/, "")
198
+ There was an error while trying to make a request to bearer.
199
+ #{e.class.name}: #{e.message}
200
+ WARN
201
+ end
202
+ if self.class.should_retry?(e, num_retries: num_retries)
203
+ num_retries += 1
204
+ Bearer.logger.info("Bearer") { "retrying request" }
205
+ retry
206
+ else
207
+ Bearer.logger.warn("Bearer") do
208
+ "Failed to perform to bearer request number of retries exceeded"
209
+ end
210
+ raise e
211
+ end
212
+ end
213
+ end
214
+ # rubocop:enable Metrics/MethodLength,Metrics/AbcSize
215
+
216
+ # @return [void]
217
+ def debug_request(parsed_url:, http_client_settings:, method:, body:, headers:)
218
+ Bearer.logger.debug("Bearer") do
219
+ <<-DEBUG.gsub(/^\s+/, "")
220
+ sending request
221
+ hostname: #{parsed_url.hostname}
222
+ port: #{parsed_url.port}
223
+ scheme: #{parsed_url.scheme}
224
+ method: #{method}
225
+ http_client_settings: #{http_client_settings.to_json}
226
+ body: #{body ? body.to_json : ''}
227
+ headers: #{headers ? headers.to_json : ''}
228
+ DEBUG
229
+ end
230
+ end
231
+
232
+ # @return [void]
233
+ def info_response
234
+ lambda do |response|
235
+ return unless response
236
+
237
+ Bearer.logger.info("Bearer") do
238
+ <<-INFO.gsub(/^\s+/, "")
239
+ response requestId: #{response.header['bearer-request-id']}
240
+ INFO
241
+ end
143
242
end
144
243
end
145
244
end
data/lib/bearer/response.rb ADDED
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Bearer
4
+ # Bearer::Response encapsulates some vitals of a response that came back from
5
+ # the bearer proxy.
6
+ class Response
7
+ # Headers provides an access wrapper to an API response's header data. It
8
+ # mainly exists so that we don't need to expose the entire
9
+ # `Net::HTTPResponse` object while still getting some of its benefits like
10
+ # case-insensitive access to header names and flattening of header values.
11
+ class Headers
12
+ # Initializes a Headers object from a Net::HTTP::HTTPResponse object.
13
+ def self.from_net_http(resp)
14
+ new(resp.to_hash)
15
+ end
16
+
17
+ # `hash` is expected to be a hash mapping header names to arrays of
18
+ # header values. This is the default format generated by calling
19
+ # `#to_hash` on a `Net::HTTPResponse` object because headers can be
20
+ # repeated multiple times. Using `#[]` will collapse values down to just
21
+ # the first.
22
+ def initialize(hash)
23
+ if !hash.is_a?(Hash) ||
24
+ !hash.keys.all? { |n| n.is_a?(String) } ||
25
+ !hash.values.all? { |a| a.is_a?(Array) } ||
26
+ !hash.values.all? { |a| a.all? { |v| v.is_a?(String) } }
27
+ raise ArgumentError,
28
+ "expect hash to be a map of string header names to arrays of " \
29
+ "header values"
30
+ end
31
+
32
+ @hash = {}
33
+
34
+ # This shouldn't be strictly necessary because `Net::HTTPResponse` will
35
+ # produce a hash with all headers downcased, but do it anyway just in
36
+ # case an object of this class was constructed manually.
37
+ #
38
+ # Also has the effect of duplicating the hash, which is desirable for a
39
+ # little extra object safety.
40
+ hash.each do |k, v|
41
+ @hash[k.downcase] = v
42
+ end
43
+ end
44
+
45
+ def [](name)
46
+ values = @hash[name.downcase]
47
+ warn("Duplicate header values for `#{name}`; returning only first") if values && values.count > 1
48
+ values ? values.first : nil
49
+ end
50
+ end
51
+
52
+ # The data contained by the HTTP body of the response deserialized from
53
+ # JSON.
54
+ attr_accessor :data
55
+
56
+ # The raw HTTP body of the response.
57
+ attr_accessor :http_body
58
+
59
+ # A Hash of the HTTP headers of the response.
60
+ attr_accessor :http_headers
61
+
62
+ # The integer HTTP status code of the response.
63
+ attr_accessor :http_status
64
+
65
+ # The Bearer request ID of the response.
66
+ attr_accessor :request_id
67
+
68
+ # Initializes a Bearer::Response object from a Net::HTTP::HTTPResponse
69
+ # object.
70
+ def self.from_net_http(http_resp)
71
+ resp = Bearer::Response.new
72
+ resp.data = JSON.parse(http_resp.body, symbolize_names: true)
73
+ resp.http_body = http_resp.body
74
+ resp.http_headers = Headers.from_net_http(http_resp)
75
+ resp.http_status = http_resp.code.to_i
76
+ resp.request_id = http_resp["bearer-request-id"]
77
+ resp
78
+ end
79
+ end
80
+ end
data/lib/bearer/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
# frozen_string_literal: true
2
2
3
3
class Bearer
4
- VERSION = "2.0.0"
4
+ VERSION = "3.0.0"
5
5
end
metadata CHANGED
@@ -1,141 +1,15 @@
1
1
--- !ruby/object:Gem::Specification
2
2
name: bearer
3
3
version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.0
5
5
platform: ruby
6
6
authors:
7
7
- Bearer Team<engineering@bearer.sh>
8
8
autorequire:
9
9
bindir: exe
10
10
cert_chain: []
11
- date: 2019-10-09 00:00:00.000000000 Z
12
- dependencies:
11
+ date: 2019-11-08 00:00:00.000000000 Z
12
+ dependencies: []
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.0'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '10.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '10.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 0.65.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 0.65.0
69
- - !ruby/object:Gem::Dependency
70
- name: pry
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: pry-byebug
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: overcommit
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: webmock
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: solargraph
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
13
description: Ruby client to universally call any API using Bearer.sh
140
14
email:
141
15
- engineering@bearer.sh
@@ -143,9 +17,9 @@ executables: []
143
17
extensions: []
144
18
extra_rdoc_files: []
145
19
files:
20
+ - ".drone.yml"
146
21
- ".github/CODEOWNERS"
147
22
- ".github/PULL_REQUEST_TEMPLATE.md"
148
- - ".github/main.workflow"
149
23
- ".gitignore"
150
24
- ".jenkins/stack.yml"
151
25
- ".overcommit.yml"
@@ -157,16 +31,19 @@ files:
157
31
- Gemfile
158
32
- Gemfile.lock
159
33
- Jenkinsfile
34
+ - LICENSE
160
35
- README.md
161
36
- Rakefile
162
37
- bearer.gemspec
163
38
- bin/console
164
39
- bin/setup
40
+ - bin/setup-credentials
165
41
- bin/test
166
42
- lib/bearer.rb
167
43
- lib/bearer/configuration.rb
168
44
- lib/bearer/errors.rb
169
45
- lib/bearer/integration.rb
46
+ - lib/bearer/response.rb
170
47
- lib/bearer/version.rb
171
48
homepage: https://www.bearer.sh
172
49
licenses:
@@ -188,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
65
- !ruby/object:Gem::Version
189
66
version: '0'
190
67
requirements: []
191
- rubygems_version: 3.0.1
68
+ rubygems_version: 3.0.3
192
69
signing_key:
193
70
specification_version: 4
194
71
summary: Bearer Ruby