aptible-resource 1.1.1 → 1.1.3
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/test.yml +34 -0
- data/README.md +0 -1
- data/SECURITY.md +23 -0
- data/lib/aptible/resource/base.rb +1 -0
- data/lib/aptible/resource/version.rb +1 -1
- data/lib/aptible/resource.rb +4 -0
- data/lib/hyper_resource/modules/http.rb +5 -1
- data/lib/hyper_resource/version.rb +1 -1
- data/lib/hyper_resource.rb +2 -0
- data/spec/aptible/resource/base_spec.rb +2 -2
- metadata +7 -6
- data/.travis.yml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5900b6d991cbb35f8f24586a4159c5e20a42bf7eb084c896a1e03d2fd88d393
|
4
|
+
data.tar.gz: 3bc765fa4be89779be7e70e90d64827281057a1857b2fa6d6bdf7d6473561c19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8829126f5c77257f43619f14a8db713c4fe16ad7c63c9d0823047aca7fd3e0d0790238ee677d21648b9cf5e8e55611d062213aa631d4d6053436a6f3254d84e3
|
7
|
+
data.tar.gz: c3b5c7229ca716235b946402fc92b3b6295b3707e05a762e988956e45c5d32080fcd11fd6ef18c405bb3526ec941bc8b389281a8da9045f8b51e40502d90d5df
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: Tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
name: Run tests on Ruby ${{ matrix.RUBY_VERSION }}
|
14
|
+
runs-on: ubuntu-24.04
|
15
|
+
strategy:
|
16
|
+
fail-fast: false
|
17
|
+
matrix:
|
18
|
+
RUBY_VERSION: [2.2, 2.3, 2.6, 2.7]
|
19
|
+
steps:
|
20
|
+
- name: Check out code
|
21
|
+
uses: actions/checkout@v4
|
22
|
+
|
23
|
+
- name: Install Ruby
|
24
|
+
uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: ${{ matrix.RUBY_VERSION }}
|
27
|
+
bundler: 1.17.3
|
28
|
+
bundler-cache: true
|
29
|
+
|
30
|
+
- name: Rubocop
|
31
|
+
run: bundle exec rake rubocop
|
32
|
+
|
33
|
+
- name: Test
|
34
|
+
run: bundle exec rspec
|
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
#  Aptible::Resource
|
2
2
|
|
3
3
|
[](https://rubygems.org/gems/aptible-resource)
|
4
|
-
[](https://travis-ci.org/aptible/aptible-resource)
|
5
4
|
[](https://gemnasium.com/aptible/aptible-resource)
|
6
5
|
|
7
6
|
Foundation classes for Aptible resource server gems.
|
data/SECURITY.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Aptible Open Source Security Policies and Procedures
|
2
|
+
|
3
|
+
This document outlines security procedures and general policies for the Aptible open source projects as found on https://github.com/aptible.
|
4
|
+
|
5
|
+
* [Reporting a Vulnerability](#reporting-a-vulnerability)
|
6
|
+
* [Responsible Disclosure Policy](#responsible-disclosure-policy)
|
7
|
+
|
8
|
+
## Reporting a Vulnerability
|
9
|
+
|
10
|
+
The Aptible team and community take all security vulnerabilities
|
11
|
+
seriously. Thank you for improving the security of our open source software. We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.
|
12
|
+
|
13
|
+
Report security vulnerabilities by emailing the Aptible security team at:
|
14
|
+
|
15
|
+
security@aptible.com
|
16
|
+
|
17
|
+
Security researchers can also privately report security vulnerabilities to repository maintainers using the GitHub "Report a Vulnerability" feature. [See how-to here](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability).
|
18
|
+
|
19
|
+
The Aptible team will acknowledge your email within 24 business hours and send a detailed response within 48 business hours indicating the next steps in handling your report. The Aptible security team will keep you informed of the progress and may ask for additional information or guidance.
|
20
|
+
|
21
|
+
## Responsible Disclosure Policy
|
22
|
+
|
23
|
+
Please see Aptible's Responsible Disclosure Policy here: https://www.aptible.com/legal/responsible-disclosure/
|
data/lib/aptible/resource.rb
CHANGED
@@ -20,6 +20,10 @@ module Aptible
|
|
20
20
|
classes: [String],
|
21
21
|
default: "aptible-resource #{Aptible::Resource::VERSION}"
|
22
22
|
|
23
|
+
has :timeout,
|
24
|
+
classes: [Integer],
|
25
|
+
default: 90
|
26
|
+
|
23
27
|
has :logger,
|
24
28
|
classes: [Logger],
|
25
29
|
default: Logger.new(STDERR).tap { |l| l.level = Logger::WARN }
|
@@ -23,7 +23,6 @@ class HyperResource
|
|
23
23
|
c.cookie_manager = nil
|
24
24
|
c.connect_timeout = 30
|
25
25
|
c.send_timeout = 45
|
26
|
-
c.receive_timeout = 30
|
27
26
|
c.keep_alive_timeout = 15
|
28
27
|
c.ssl_config.set_default_paths
|
29
28
|
end
|
@@ -36,6 +35,11 @@ class HyperResource
|
|
36
35
|
# by loading Webmock first, but this is just as simple.
|
37
36
|
initialize_http_client!
|
38
37
|
|
38
|
+
# Allow the application to configure the timeout
|
39
|
+
def configure_client
|
40
|
+
HTTP.http_client.receive_timeout = Aptible::Resource.configuration.timeout
|
41
|
+
end
|
42
|
+
|
39
43
|
## Loads and returns the resource pointed to by +href+. The returned
|
40
44
|
## resource will be blessed into its "proper" class, if
|
41
45
|
## +self.class.namespace != nil+.
|
data/lib/hyper_resource.rb
CHANGED
@@ -105,7 +105,7 @@ describe Aptible::Resource::Base do
|
|
105
105
|
it 'should pass options to the HyperResource initializer' do
|
106
106
|
klass = Api::Mainframe
|
107
107
|
options = { token: 'token' }
|
108
|
-
expect(klass).to receive(:new).
|
108
|
+
expect(klass).to receive(:new).and_return klass.new
|
109
109
|
Api::Mainframe.all(options)
|
110
110
|
end
|
111
111
|
end
|
@@ -167,7 +167,7 @@ describe Aptible::Resource::Base do
|
|
167
167
|
|
168
168
|
it 'should create a new top-level resource' do
|
169
169
|
mainframes_link.stub(:create) { mainframe }
|
170
|
-
expect(mainframes_link).to receive(:create)
|
170
|
+
expect(mainframes_link).to receive(:create)
|
171
171
|
Api::Mainframe.create(foo: 'bar')
|
172
172
|
end
|
173
173
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -186,14 +186,15 @@ extensions: []
|
|
186
186
|
extra_rdoc_files: []
|
187
187
|
files:
|
188
188
|
- ".github/CODEOWNERS"
|
189
|
+
- ".github/workflows/test.yml"
|
189
190
|
- ".gitignore"
|
190
191
|
- ".rspec"
|
191
192
|
- ".rubocop.yml"
|
192
|
-
- ".travis.yml"
|
193
193
|
- Gemfile
|
194
194
|
- LICENSE.md
|
195
195
|
- README.md
|
196
196
|
- Rakefile
|
197
|
+
- SECURITY.md
|
197
198
|
- aptible-resource.gemspec
|
198
199
|
- lib/aptible/resource.rb
|
199
200
|
- lib/aptible/resource/adapter.rb
|
@@ -227,7 +228,7 @@ homepage: https://github.com/aptible/aptible-resource
|
|
227
228
|
licenses:
|
228
229
|
- MIT
|
229
230
|
metadata: {}
|
230
|
-
post_install_message:
|
231
|
+
post_install_message:
|
231
232
|
rdoc_options: []
|
232
233
|
require_paths:
|
233
234
|
- lib
|
@@ -243,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
244
|
version: '0'
|
244
245
|
requirements: []
|
245
246
|
rubygems_version: 3.0.3.1
|
246
|
-
signing_key:
|
247
|
+
signing_key:
|
247
248
|
specification_version: 4
|
248
249
|
summary: Foundation classes for Aptible resource server gems
|
249
250
|
test_files:
|