vgs_api_client 0.0.1 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa58a9dafab3d45d960f49d470d79509bba961f316afbc3781db258fed4210d8
4
- data.tar.gz: ca3de31ef5e4aa3c54c1f1affb04eafac0f27e522610a43f3b2fdf84729a3df4
3
+ metadata.gz: d4af32502c69f76e06cf4f4d69f7d63d1f7d906743557a8d1c87419f75f55794
4
+ data.tar.gz: dfd60a7a4e8f01b0d14cf5d33de1e4393ac249b722cf47ed02642064981d40dd
5
5
  SHA512:
6
- metadata.gz: 7b607efeb9383e71d6cd91c77f33516af8e15de6e8fffb7afe6bf48da2c2f78d04f3c1cf73fe3344d723f6074bab6f92ffbae51be9e389c4b077e4cc70672752
7
- data.tar.gz: 844366566921e3055a23339c3869edd7ed88ed5e11c10793fbb75bb50a01ae29205e7c4f67317b14403a7d0b7a01a135b865d5937f8e9449deb3e5dcfb579199
6
+ metadata.gz: b6301fee2029e0e9f62d2b4c350a658b540f5a164a1fb506bbb691eb799b6bae46516cf64c3e8142794bee0def369824911cbd5adfddd73853ad3b996c27d1c7
7
+ data.tar.gz: 1b4905f0245e43e253c98df0996c4831717b150d0593c334e795f96a7fa6b583700c9a8eee46cd2ba51b6003054e58e5e0c4003129f88eede14be80db309acfb
data/Gemfile.lock CHANGED
@@ -16,7 +16,7 @@ GEM
16
16
  ffi (1.15.5)
17
17
  jaro_winkler (1.5.4)
18
18
  method_source (1.0.0)
19
- parallel (1.21.0)
19
+ parallel (1.22.0)
20
20
  parser (3.1.1.0)
21
21
  ast (~> 2.4.1)
22
22
  pry (0.13.1)
@@ -67,4 +67,4 @@ DEPENDENCIES
67
67
  vgs_api_client!
68
68
 
69
69
  BUNDLED WITH
70
- 2.2.22
70
+ 2.3.9
data/docker/Dockerfile ADDED
@@ -0,0 +1,11 @@
1
+ FROM ruby:3.1.1-alpine3.15
2
+
3
+ ARG GEM_VGS_PUBLISH_TOKEN
4
+ ARG LIB_VERSION
5
+
6
+ ENV GEM_VGS_PUBLISH_TOKEN=$GEM_VGS_PUBLISH_TOKEN
7
+ ENV LIB_VERSION=$LIB_VERSION
8
+
9
+ WORKDIR /src
10
+
11
+ ENTRYPOINT ["sh", "docker/build_and_publish.sh"]
@@ -0,0 +1,5 @@
1
+ FROM ruby:3.1.1-alpine3.15
2
+
3
+ WORKDIR /src/
4
+
5
+ ENTRYPOINT ["echo", "'true'"]
@@ -0,0 +1,9 @@
1
+ #!/bin/sh
2
+
3
+ # Build
4
+ gem build vgs_api_client.gemspec
5
+
6
+ # Publish
7
+ echo ":rubygems_api_key: ${GEM_VGS_PUBLISH_TOKEN}" > ~/.gem/credentials
8
+
9
+ gem push vgs_api_client-${LIB_VERSION}.gem
@@ -0,0 +1,18 @@
1
+ version: '3.7'
2
+
3
+ services:
4
+ build_and_publish:
5
+ build:
6
+ context: docker
7
+ dockerfile: Dockerfile
8
+ args:
9
+ GEM_VGS_PUBLISH_TOKEN: ${GEM_VGS_PUBLISH_TOKEN}
10
+ LIB_VERSION: ${LIB_VERSION}
11
+ volumes:
12
+ - ./:/src/
13
+ test:
14
+ build:
15
+ context: docker
16
+ dockerfile: Dockerfile.test
17
+ volumes:
18
+ - ./:/src/
data/docs/AliasesApi.md CHANGED
@@ -228,7 +228,7 @@ end
228
228
 
229
229
  Reveal multiple aliases
230
230
 
231
- Given a list of aliases, retrieves all associated values stored in the vault. **NOTE:** This endpoint may expose sensitive data. Therefore, it is disabled by default. To enable it, please contact your VGS account manager or drop us a line at [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
231
+ Given a comma separated aliases string, retrieves all associated values stored in the vault. **NOTE:** This endpoint may expose sensitive data. Therefore, it is disabled by default. To enable it, please contact your VGS account manager or drop us a line at [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
232
232
 
233
233
  ### Examples
234
234
 
@@ -243,7 +243,7 @@ VgsapiClient.configure do |config|
243
243
  end
244
244
 
245
245
  api_instance = VgsapiClient::AliasesApi.new
246
- q = ['inner_example'] # Array<String> | Comma-separated list of aliases to reveal.
246
+ q = 'tok_sandbox_5UpnbMvaihRuRwz5QXwBFw, tok_sandbox_9ToiJHedw1nE1Jfx1qYYgz' # String | Comma-separated aliases string
247
247
 
248
248
  begin
249
249
  # Reveal multiple aliases
@@ -276,7 +276,7 @@ end
276
276
 
277
277
  | Name | Type | Description | Notes |
278
278
  | ---- | ---- | ----------- | ----- |
279
- | **q** | [**Array&lt;String&gt;**](String.md) | Comma-separated list of aliases to reveal. | |
279
+ | **q** | **String** | Comma-separated aliases string | |
280
280
 
281
281
  ### Return type
282
282
 
@@ -210,8 +210,8 @@ module VgsapiClient
210
210
  end
211
211
 
212
212
  # Reveal multiple aliases
213
- # Given a list of aliases, retrieves all associated values stored in the vault. **NOTE:** This endpoint may expose sensitive data. Therefore, it is disabled by default. To enable it, please contact your VGS account manager or drop us a line at [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
214
- # @param q [Array<String>] Comma-separated list of aliases to reveal.
213
+ # Given a comma separated aliases string, retrieves all associated values stored in the vault. **NOTE:** This endpoint may expose sensitive data. Therefore, it is disabled by default. To enable it, please contact your VGS account manager or drop us a line at [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
214
+ # @param q [String] Comma-separated aliases string
215
215
  # @param [Hash] opts the optional parameters
216
216
  # @return [InlineResponse200]
217
217
  def reveal_multiple_aliases(q, opts = {})
@@ -220,8 +220,8 @@ module VgsapiClient
220
220
  end
221
221
 
222
222
  # Reveal multiple aliases
223
- # Given a list of aliases, retrieves all associated values stored in the vault. **NOTE:** This endpoint may expose sensitive data. Therefore, it is disabled by default. To enable it, please contact your VGS account manager or drop us a line at [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
224
- # @param q [Array<String>] Comma-separated list of aliases to reveal.
223
+ # Given a comma separated aliases string, retrieves all associated values stored in the vault. **NOTE:** This endpoint may expose sensitive data. Therefore, it is disabled by default. To enable it, please contact your VGS account manager or drop us a line at [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
224
+ # @param q [String] Comma-separated aliases string
225
225
  # @param [Hash] opts the optional parameters
226
226
  # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
227
227
  def reveal_multiple_aliases_with_http_info(q, opts = {})
@@ -232,21 +232,12 @@ module VgsapiClient
232
232
  if @api_client.config.client_side_validation && q.nil?
233
233
  fail ArgumentError, "Missing the required parameter 'q' when calling AliasesApi.reveal_multiple_aliases"
234
234
  end
235
- if @api_client.config.client_side_validation && q.length > 20
236
- fail ArgumentError, 'invalid value for "q" when calling AliasesApi.reveal_multiple_aliases, number of items must be less than or equal to 20.'
237
- end
238
-
239
- if @api_client.config.client_side_validation && q.length < 1
240
- fail ArgumentError, 'invalid value for "q" when calling AliasesApi.reveal_multiple_aliases, number of items must be greater than or equal to 1.'
241
- end
242
-
243
235
  # resource path
244
236
  local_var_path = '/aliases'
245
237
 
246
238
  # query parameters
247
239
  query_params = opts[:query_params] || {}
248
- # query_params[:'q'] = @api_client.build_collection_param(q, :multi)
249
- query_params[:'q'] = q.join(',')
240
+ query_params[:'q'] = q
250
241
 
251
242
  # header parameters
252
243
  header_params = opts[:header_params] || {}
@@ -289,8 +280,8 @@ module VgsapiClient
289
280
  # @option opts [UpdateAliasRequest] :update_alias_request
290
281
  # @return [nil]
291
282
  def update_alias(_alias, opts = {})
292
- data, status_code, headers = update_alias_with_http_info(_alias, opts)
293
- status_code
283
+ update_alias_with_http_info(_alias, opts)
284
+ nil
294
285
  end
295
286
 
296
287
  # Update data classifiers
@@ -104,7 +104,7 @@ describe 'AliasesApi' do
104
104
  describe 'reveal_multiple_aliases test' do
105
105
  it 'should return original values' do
106
106
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
107
- api_response = @api_instance.reveal_multiple_aliases(@aliases)
107
+ api_response = @api_instance.reveal_multiple_aliases(@aliases.join(','))
108
108
  expect(api_response.data[@aliases[0]].value).to eq "122105155"
109
109
  expect(api_response.data[@aliases[1]].value).to eq "122105156"
110
110
  end
@@ -130,7 +130,7 @@ describe 'AliasesApi' do
130
130
  opts[:update_alias_request] = update_alias_request.to_hash
131
131
  api_response = @api_instance.update_alias(@aliases.first, opts)
132
132
  # puts api_response
133
- expect(api_response).to be 204
133
+ expect(api_response).to be nil
134
134
  end
135
135
  end
136
136
 
@@ -17,7 +17,7 @@ require "vgs_api_client/version"
17
17
 
18
18
  Gem::Specification.new do |s|
19
19
  s.name = "vgs_api_client"
20
- s.version = VgsapiClient::VERSION
20
+ s.version = "0.0.15"
21
21
  s.platform = Gem::Platform::RUBY
22
22
  s.authors = ["Very Good Security"]
23
23
  s.email = ["dev@verygoodsecurity.com"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vgs_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Very Good Security
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-22 00:00:00.000000000 Z
11
+ date: 2022-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -61,6 +61,10 @@ files:
61
61
  - Gemfile.lock
62
62
  - README.md
63
63
  - Rakefile
64
+ - docker-compose.yaml
65
+ - docker/Dockerfile
66
+ - docker/Dockerfile.test
67
+ - docker/build_and_publish.sh
64
68
  - docs/AliasFormat.md
65
69
  - docs/AliasesApi.md
66
70
  - docs/ApiError.md
@@ -132,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
136
  - !ruby/object:Gem::Version
133
137
  version: '0'
134
138
  requirements: []
135
- rubygems_version: 3.2.22
139
+ rubygems_version: 3.3.9
136
140
  signing_key:
137
141
  specification_version: 4
138
142
  summary: A ruby wrapper for the VGS Vault API