Sha256: a30c86b5f6ee56b944852443ce54afc5f76ded1adb84e3395fc9764b88acec04

Contents?: true

Size: 1.42 KB

Versions: 10

Compression:

Stored size: 1.42 KB

Contents

#!/usr/bin/env bash

# see https://github.com/OpenAPITools/openapi-generator/tree/08296c2b1dc732829e3aaa2c2cad7c2c8c44eb8d/modules/openapi-generator/src/main/resources/ruby-client

set -e

DIR=$(cd `dirname $0` && pwd)
WORKING_DIR="/app/ruby"

docker run --rm \
  -v "${DIR}/:/local" \
  openapitools/openapi-generator-cli:v5.3.0 generate \
    -i "/local/openapi-sdk.yaml" \
    -c "/local/openapi-config.yaml" \
    -t "/local/templates" \
    -o "/local/"

printf "\nInstalling composer dependencies ...\n"
mkdir -p "${DIR}/vendor"
bash "${DIR}/bin/php" composer install
printf "\n"

printf "Adding examples to Docs ...\n"
bash "${DIR}/bin/php" ./bin/generate-examples.php

printf "Install Ruby dependencies ...\n"
bash "${DIR}/bin/ruby" bundle

printf "Replacing strings ...\n"
docker run --rm \
  -v "${DIR}:${WORKING_DIR}" \
  -w "${WORKING_DIR}" \
  perl bash ./bin/replace

printf "Scanning for prohibited keywords ...\n"
docker run --rm \
  -v "${DIR}:${WORKING_DIR}" \
  -w "${WORKING_DIR}" \
  perl bash ./bin/scan_for

# avoid docker messing with permissions
if [[ -z "$GITHUB_ACTIONS" ]]; then
  chmod 644 "${DIR}/README.md"
  find "${DIR}/docs/" -type f -exec chmod 644 {} \;
  find "${DIR}/examples/" -type f -exec chmod 644 {} \;
  find "${DIR}/test_fixtures/" -type f -exec chmod 644 {} \;
  find "${DIR}/lib/" -type f -exec chmod 644 {} \;
fi

printf "Running tests ...\n"
bash "${DIR}/bin/ruby" bundle exec rspec

printf "Success!\n"

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dropbox-sign-1.4.1 run-build
dropbox-sign-1.4.0 run-build
dropbox-sign-1.3.0 run-build
dropbox-sign-1.2.0 run-build
dropbox-sign-1.1.2 run-build
dropbox-sign-1.1.1 run-build
dropbox-sign-1.1.0 run-build
dropbox-sign-1.0.1 run-build
dropbox-sign-1.0.0 run-build
dropbox-sign-1.0.0.pre.beta2301 run-build