aptible-resource 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/SECURITY.md +23 -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 +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9562909be8c0ef4c54e8da94d251e44ecc5dc9f6a2f498622405afb225575d12
|
4
|
+
data.tar.gz: 6b0598714d0d53e7e18a5e0cd5ca36b5ebafa9d85a7325df966e4f84f678c5a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c126d6a58305353b2e048447e6811a4b466d55fd3491a81eebe35654fee4bbb4799ed9b89d6a18ee6b92687034eeafaac30f2855ec4c6761db9e97fec8e9f3b
|
7
|
+
data.tar.gz: '093b700f43b9992a84193b1a953c43b3db1632c35dc72ddcf6acd6ef71eaec6c55635cd859b372e37a2ebe27a0204f71037abb040f377f32bb59b3670076257d'
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -194,6 +194,7 @@ files:
|
|
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
|
@@ -242,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
243
|
- !ruby/object:Gem::Version
|
243
244
|
version: '0'
|
244
245
|
requirements: []
|
245
|
-
rubygems_version: 3.0.3
|
246
|
+
rubygems_version: 3.0.3
|
246
247
|
signing_key:
|
247
248
|
specification_version: 4
|
248
249
|
summary: Foundation classes for Aptible resource server gems
|