vgs_api_client 0.0.1.alpha202206021125 → 0.0.1.alpha202206031458

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: caa94dcd931e45e0353d9a88820b65c924be8964714bf39a9516f55960a45582
4
- data.tar.gz: 83981b21513c87143e96624e28a0d189386eaef94e6f13380eebbc2a5f58dc29
3
+ metadata.gz: 80dfe59abbc517f3e44e342c7a63ee52e9b485f5bdca7e7942d55717c9bf0a58
4
+ data.tar.gz: d0b95206d330223521b8be2168df38e9fcf2296f0c692196ee551d0dd23012a0
5
5
  SHA512:
6
- metadata.gz: 329406ce8fe4db28c602a35e5039729ba5d181c37ce2663405b3a160e7ef8379159929b25532556960c7b8b70aa6698e7d2fda55de082e84adb4a225a917e0aa
7
- data.tar.gz: f5dedf70b5dcfe76265a132b43fb64fb55d8a3a501742eae734c68a22c884e5322a1d6ea9eb4fceaac8d0a2cfacb71d82d86e233bf43e8a5e7b05273e42195a0
6
+ metadata.gz: 9c694c4ae2f0227013552a5ddfa7651017b74cdc82acb40e41cfead12da7b8b888549033fd5453a626e7816cdcec7bc2606e05d6fcdb4ab47cc37bc97c689986
7
+ data.tar.gz: b0f691bc74c027bd1be1368a9032ebbd1405ff7bc5c597b63ff43b7cbb5b968b2efd14e6f9b992e98c645e50793dd60ddf6556005d3c034ec9d601559bee16d7
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1.alpha202206021125
1
+ 0.0.1.alpha202206031458
data/docker-compose.yaml CHANGED
@@ -13,6 +13,10 @@ services:
13
13
  dockerfile: scripts/assemble/Dockerfile
14
14
  environment:
15
15
  LIB_VERSION: ${LIB_VERSION}
16
+ RUBY_SIGNING_KEY: ${RUBY_SIGNING_KEY}
17
+ RUBY_PUBLIC_CERT: ${RUBY_PUBLIC_CERT}
18
+ RUBY_PEM_PASSPHRASE: ${RUBY_PEM_PASSPHRASE}
19
+ CI_BUILD: ${CI_BUILD}
16
20
  volumes:
17
21
  - ./:/vgs-api-client/
18
22
  publish:
@@ -31,7 +31,7 @@ module VgsApiClient
31
31
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
32
32
  def initialize(config = Configuration.default)
33
33
  @config = config
34
- @user_agent = "vgs-api-client/0.0.1.alpha202206021125/ruby"
34
+ @user_agent = "vgs-api-client/0.0.1.alpha202206031458/ruby"
35
35
  @default_headers = {
36
36
  'Content-Type' => 'application/json',
37
37
  'User-Agent' => @user_agent
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.4.0
11
11
  =end
12
12
 
13
13
  module VgsApiClient
14
- VERSION = '0.0.1.alpha202206021125'
14
+ VERSION = '0.0.1.alpha202206031458'
15
15
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module VGS
2
- VERSION = '0.0.1.alpha202206021125'
2
+ VERSION = '0.0.1.alpha202206031458'
3
3
  end
@@ -1,7 +1,8 @@
1
1
  FROM ruby:3.1.2-alpine3.15
2
2
 
3
3
  RUN apk update && \
4
- apk add bash
4
+ apk add bash && \
5
+ apk add expect
5
6
 
6
7
  WORKDIR /vgs-api-client/
7
8
 
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/expect
2
+
3
+ # acquire ruby cert passphrase
4
+ set passphrase [lindex $argv 0];
5
+
6
+ # build
7
+ spawn gem build vgs_api_client.gemspec
8
+
9
+ # answer ruby cert PEM passphrase prompt
10
+ expect "Enter PEM pass phrase:"
11
+ send $passphrase\r
12
+ expect eof
@@ -1,9 +1,39 @@
1
1
  #!/bin/bash
2
2
 
3
- LIB_VERSION=${LIB_VERSION:-0.0.1.alpha$(date "+%Y%m%d%H%M")}
3
+ set -e
4
4
 
5
- # fix version
6
- grep -rl 0.0.1.alpha202206021125 . | xargs sed -i "s/0.0.1.alpha202206021125/${LIB_VERSION}/g"
5
+ # sign the gem if build through CI
6
+ if [[ ${CI_BUILD} == "true" ]]
7
+ then
8
+ usage() { echo "Required env var '$1' is missing"; exit 1; }
7
9
 
8
- # build
9
- gem build vgs_api_client.gemspec
10
+ [ -z "${RUBY_SIGNING_KEY}" ] && usage "RUBY_SIGNING_KEY" ;
11
+ [ -z "${RUBY_PUBLIC_CERT}" ] && usage "RUBY_PUBLIC_CERT" ;
12
+ [ -z "${RUBY_PEM_PASSPHRASE}" ] && usage "RUBY_PEM_PASSPHRASE" ;
13
+
14
+ LIB_VERSION=${LIB_VERSION:-0.0.1.alpha$(date "+%Y%m%d%H%M")}
15
+
16
+ # fix version
17
+ grep -rl 0.0.1.alpha202206031458 . | xargs sed -i "s/0.0.1.alpha202206031458/${LIB_VERSION}/g"
18
+
19
+ # prepare certificate files
20
+ cat <<< ${RUBY_SIGNING_KEY} | base64 -d > gem-private_key.pem
21
+ cat <<< ${RUBY_PUBLIC_CERT} | base64 -d > gem-public_cert.pem
22
+
23
+ # build gem with expect to handle PEM passphrase prompt
24
+ /usr/bin/expect -d scripts/assemble/gem_build.exp ${RUBY_PEM_PASSPHRASE}
25
+
26
+ # clean-up certificate files
27
+ rm gem-private_key.pem
28
+ rm gem-public_cert.pem
29
+
30
+ # Local build so don't sign the gem
31
+ else
32
+ LIB_VERSION=${LIB_VERSION:-0.0.1.alpha$(date "+%Y%m%d%H%M")}
33
+
34
+ # fix version
35
+ grep -rl 0.0.1.alpha202206031458 . | xargs sed -i "s/0.0.1.alpha202206031458/${LIB_VERSION}/g"
36
+
37
+ # build
38
+ gem build vgs_api_client_local_build.gemspec
39
+ fi
data/scripts/test/run.sh CHANGED
@@ -5,7 +5,7 @@ set -e
5
5
  echo "Installing lib from local sources"
6
6
  # fix version
7
7
  VERSION=0.0.1.alpha$(date "+%Y%m%d%H%M")
8
- grep -rl 0.0.1.alpha202206021125 . | xargs sed -i "s/0.0.1.alpha202206021125/$VERSION/g"
8
+ grep -rl 0.0.1.alpha202206031458 . | xargs sed -i "s/0.0.1.alpha202206031458/$VERSION/g"
9
9
 
10
10
  bundle install
11
11
 
@@ -29,4 +29,6 @@ Gem::Specification.new do |s|
29
29
  s.test_files = `find spec/*`.split("\n")
30
30
  s.executables = []
31
31
  s.require_paths = ["lib"]
32
+ s.signing_key = 'gem-private_key.pem'
33
+ s.cert_chain = %w[gem-public_cert.pem]
32
34
  end
@@ -0,0 +1,32 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ require_relative "lib/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "vgs_api_client"
7
+ s.version = VGS::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Very Good Security"]
10
+ s.email = ["support@verygoodsecurity.com"]
11
+ s.homepage = "https://github.com/verygoodsecurity/vgs-api-client-ruby"
12
+ s.summary = "Very Good Security API Client"
13
+ s.description = "Very Good Security API Client library. More details on https://www.verygoodsecurity.com/"
14
+ s.license = "BSD-3-Clause"
15
+ s.required_ruby_version = ">= 2.6"
16
+
17
+ s.metadata = {
18
+ "homepage_uri" => "https://www.verygoodsecurity.com",
19
+ "bug_tracker_uri" => "https://github.com/verygoodsecurity/vgs-api-client-ruby/issues",
20
+ "documentation_uri" => "https://www.verygoodsecurity.com/docs",
21
+ "source_code_uri" => "https://github.com/verygoodsecurity/vgs-api-client-ruby"
22
+ }
23
+
24
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
25
+
26
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
27
+
28
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
29
+ s.test_files = `find spec/*`.split("\n")
30
+ s.executables = []
31
+ s.require_paths = ["lib"]
32
+ end
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.alpha202206021125
4
+ version: 0.0.1.alpha202206031458
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-06-02 00:00:00.000000000 Z
11
+ date: 2022-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -88,6 +88,7 @@ files:
88
88
  - lib/version.rb
89
89
  - lib/vgs_api_client.rb
90
90
  - scripts/assemble/Dockerfile
91
+ - scripts/assemble/gem_build.exp
91
92
  - scripts/assemble/run.sh
92
93
  - scripts/lint.sh
93
94
  - scripts/lint/Dockerfile
@@ -106,6 +107,7 @@ files:
106
107
  - spec/spec_helper.rb
107
108
  - spec/test_aliases_api_spec.rb
108
109
  - vgs_api_client.gemspec
110
+ - vgs_api_client_local_build.gemspec
109
111
  homepage: https://github.com/verygoodsecurity/vgs-api-client-ruby
110
112
  licenses:
111
113
  - BSD-3-Clause