vgs_api_client 0.0.1.alpha202204202050 → 0.0.1.alpha202204202226
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/docker-compose.yaml +10 -2
- data/lib/vgs_api_client/api_client.rb +1 -1
- data/lib/vgs_api_client/version.rb +1 -1
- data/scripts/assemble/run.sh +1 -1
- data/scripts/run-tests-e2e.sh +2 -2
- data/scripts/run-tests.sh +1 -1
- data/scripts/test/Dockerfile +2 -0
- data/scripts/test/run.sh +6 -30
- data/scripts/test-e2e/Dockerfile +13 -0
- data/scripts/test-e2e/run.sh +27 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3fec09563eaf1f434308d839001a287b70b773f8ebd33751d68ade7e703984b
|
4
|
+
data.tar.gz: 4f3b446c82be2710536be60af8c909ce3ec637dcf43313bdc9ecc8638264416b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96a3e00cccaf211a83abc4a09f21290e1d38eac9c12f2f04128e5b014848cd26a6cc235e7641cf3fb671a64242c7b592dc3cc35fe2650a723702a5a0f1c288e7
|
7
|
+
data.tar.gz: 060c2c46aa7f9413373b958ae0b1d818e85039ddb7171e2b9c76a3507f20c71e06141253968ce1511872b44f0b7c665662859cbb2aa3765573aed0a5d57dc0ea
|
data/docker-compose.yaml
CHANGED
@@ -28,5 +28,13 @@ services:
|
|
28
28
|
VAULT_API_BASE_URI: https://api.sandbox.verygoodvault.com
|
29
29
|
VAULT_API_VAULT_ID: tntkxfmsefj
|
30
30
|
LIB_VERSION: ${LIB_VERSION}
|
31
|
-
|
32
|
-
|
31
|
+
test-e2e:
|
32
|
+
build:
|
33
|
+
context: .
|
34
|
+
dockerfile: scripts/test/Dockerfile
|
35
|
+
environment:
|
36
|
+
VAULT_API_USERNAME: US7oyrzRGmaKqi3ET8eSsECS
|
37
|
+
VAULT_API_PASSWORD: c06cf6d1-a35e-439d-91d1-8bd04e5fd9e5
|
38
|
+
VAULT_API_BASE_URI: https://api.sandbox.verygoodvault.com
|
39
|
+
VAULT_API_VAULT_ID: tntkxfmsefj
|
40
|
+
LIB_VERSION: ${LIB_VERSION}
|
@@ -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.
|
34
|
+
@user_agent = "vgs-api-client/0.0.1.alpha202204202226/ruby"
|
35
35
|
@default_headers = {
|
36
36
|
'Content-Type' => 'application/json',
|
37
37
|
'User-Agent' => @user_agent
|
data/scripts/assemble/run.sh
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
LIB_VERSION=${LIB_VERSION:-0.0.1.alpha$(date "+%Y%m%d%H%M")}
|
4
4
|
|
5
5
|
# fix version
|
6
|
-
grep -rl 0.0.1.
|
6
|
+
grep -rl 0.0.1.alpha202204202226 . | xargs sed -i "s/0.0.1.alpha202204202226/${LIB_VERSION}/g"
|
7
7
|
|
8
8
|
# build
|
9
9
|
gem build vgs_api_client.gemspec
|
data/scripts/run-tests-e2e.sh
CHANGED
data/scripts/run-tests.sh
CHANGED
data/scripts/test/Dockerfile
CHANGED
data/scripts/test/run.sh
CHANGED
@@ -2,36 +2,12 @@
|
|
2
2
|
|
3
3
|
set -e
|
4
4
|
|
5
|
-
|
5
|
+
echo "Installing lib from local sources"
|
6
|
+
# fix version
|
7
|
+
VERSION=0.0.1.alpha$(date "+%Y%m%d%H%M")
|
8
|
+
grep -rl 0.0.1.alpha202204202226 . | xargs sed -i "s/0.0.1.alpha202204202226/$VERSION/g"
|
6
9
|
|
7
|
-
|
8
|
-
echo "Installing lib from rubygems.org ${LIB_VERSION} ..."
|
9
|
-
|
10
|
-
set +e
|
11
|
-
ATTEMPT=1
|
12
|
-
while [ $ATTEMPT -lt 60 ]; do
|
13
|
-
echo "Attempt ${ATTEMPT} ..."
|
14
|
-
|
15
|
-
bundle install --without production --binstubs
|
16
|
-
gem install vgs_api_client -v ${LIB_VERSION}
|
17
|
-
|
18
|
-
if [[ $? == 0 ]]; then
|
19
|
-
echo "Installed ${LIB_VERSION}"
|
20
|
-
break
|
21
|
-
fi
|
22
|
-
|
23
|
-
ATTEMPT=$((ATTEMPT+1))
|
24
|
-
|
25
|
-
sleep 5
|
26
|
-
done
|
27
|
-
set -e
|
28
|
-
else
|
29
|
-
echo "Installing lib from local sources"
|
30
|
-
# fix version
|
31
|
-
VERSION=0.0.1.alpha$(date "+%Y%m%d%H%M")
|
32
|
-
grep -rl 0.0.1.alpha202204202050 . | xargs sed -i "s/0.0.1.alpha202204202050/$VERSION/g"
|
33
|
-
|
34
|
-
bundle install
|
35
|
-
fi
|
10
|
+
bundle install
|
36
11
|
|
12
|
+
echo "Running tests"
|
37
13
|
bundle exec rspec ./spec/*.rb
|
@@ -0,0 +1,13 @@
|
|
1
|
+
FROM ruby:3.1.2-alpine3.15
|
2
|
+
|
3
|
+
RUN apk update && \
|
4
|
+
apk add bash && \
|
5
|
+
apk add build-base && \
|
6
|
+
apk add libcurl && \
|
7
|
+
gem install bundler && \
|
8
|
+
gem install rspec-support
|
9
|
+
|
10
|
+
ADD ./scripts/test-e2e /scripts
|
11
|
+
ADD ./spec /spec
|
12
|
+
|
13
|
+
ENTRYPOINT ["bash", "./scripts/run.sh"]
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
set -e
|
4
|
+
|
5
|
+
echo "Installing lib from rubygems.org ${LIB_VERSION} ..."
|
6
|
+
|
7
|
+
set +e
|
8
|
+
ATTEMPT=1
|
9
|
+
while [ $ATTEMPT -lt 10 ]; do
|
10
|
+
echo "Attempt ${ATTEMPT} ..."
|
11
|
+
|
12
|
+
bundle install --without production --binstubs
|
13
|
+
gem install vgs_api_client -v ${LIB_VERSION}
|
14
|
+
|
15
|
+
if [[ $? == 0 ]]; then
|
16
|
+
echo "Installed ${LIB_VERSION}"
|
17
|
+
break
|
18
|
+
fi
|
19
|
+
|
20
|
+
ATTEMPT=$((ATTEMPT+1))
|
21
|
+
|
22
|
+
sleep 5
|
23
|
+
done
|
24
|
+
set -e
|
25
|
+
|
26
|
+
echo "Running tests"
|
27
|
+
bundle exec rspec ./spec/*.rb
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.1.alpha202204202226
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Very Good Security
|
@@ -90,6 +90,8 @@ files:
|
|
90
90
|
- scripts/publish/run.sh
|
91
91
|
- scripts/run-tests-e2e.sh
|
92
92
|
- scripts/run-tests.sh
|
93
|
+
- scripts/test-e2e/Dockerfile
|
94
|
+
- scripts/test-e2e/run.sh
|
93
95
|
- scripts/test/Dockerfile
|
94
96
|
- scripts/test/run.sh
|
95
97
|
- spec/api_client_spec.rb
|