oso-cloud 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/Gemfile.lock +19 -0
- data/lib/oso/client.rb +9 -5
- data/lib/oso/version.rb +1 -1
- 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: 062aa3d76c978722bbc9242d4a7c594eb0feb62146559dcc9a07b3d24f81f5c2
|
4
|
+
data.tar.gz: 8f5afb67fd4e4242c35c7808df00b0bf0bbcd9fcd83257d3a34f218a33625070
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd87423b50e294bbf5ea4761a9287fd9a885b94a803ba8a51f56b428197b1bb37612828e7e58c8124e140ff6a0173d7f5614b6eb86141e6a2aeb4affa705ac83
|
7
|
+
data.tar.gz: b3b1bfd172c4adcd344b2531875d1337cf0a34b3ccd12d0536a1c419a51c1a333ff2363f9d7ca9ab686f468de25bc0696ae2cae60bee2bfcc7ae59e83a956abc
|
data/.gitignore
CHANGED
data/Gemfile.lock
ADDED
data/lib/oso/client.rb
CHANGED
@@ -78,22 +78,26 @@ module Oso
|
|
78
78
|
|
79
79
|
private
|
80
80
|
|
81
|
-
def
|
82
|
-
{
|
81
|
+
def headers()
|
82
|
+
{
|
83
|
+
"Authorization" => "Basic %s" % @api_key,
|
84
|
+
"User-Agent" => "Oso Cloud (ruby)",
|
85
|
+
"Accept": "application/json"
|
86
|
+
}
|
83
87
|
end
|
84
88
|
|
85
89
|
def get(path)
|
86
|
-
result = Net::HTTP.get(URI("#{@url}/api/#{path}"),
|
90
|
+
result = Net::HTTP.get(URI("#{@url}/api/#{path}"), headers)
|
87
91
|
handle_result result
|
88
92
|
end
|
89
93
|
|
90
94
|
def post(path, params)
|
91
|
-
result = Net::HTTP.post(URI("#{@url}/api/#{path}"), params.to_json,
|
95
|
+
result = Net::HTTP.post(URI("#{@url}/api/#{path}"), params.to_json, headers)
|
92
96
|
handle_result result
|
93
97
|
end
|
94
98
|
|
95
99
|
def delete(path, params)
|
96
|
-
result = Net::HTTP.delete(URI("#{@url}/api/#{path}"), params.to_json,
|
100
|
+
result = Net::HTTP.delete(URI("#{@url}/api/#{path}"), params.to_json, headers)
|
97
101
|
handle_result result
|
98
102
|
end
|
99
103
|
|
data/lib/oso/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oso-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oso Security, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -19,6 +19,7 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- ".gitignore"
|
21
21
|
- Gemfile
|
22
|
+
- Gemfile.lock
|
22
23
|
- README.md
|
23
24
|
- Rakefile
|
24
25
|
- bin/console
|
@@ -44,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
44
45
|
- !ruby/object:Gem::Version
|
45
46
|
version: '0'
|
46
47
|
requirements: []
|
47
|
-
rubygems_version: 3.1.
|
48
|
+
rubygems_version: 3.1.6
|
48
49
|
signing_key:
|
49
50
|
specification_version: 4
|
50
51
|
summary: Oso authorization library.
|