diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8676abd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +# syntax=docker/dockerfile:1 +FROM ruby:3.2.3-alpine as base + +RUN apk --update add build-base git curl + +WORKDIR /app + +COPY . /app +RUN bundle install diff --git a/Gemfile.lock b/Gemfile.lock index 7a2113f..67767d0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,6 +57,7 @@ GEM unicode-display_width (2.5.0) PLATFORMS + aarch64-linux-musl arm64-darwin-23 x86_64-linux diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..99e5073 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +services: + simplecov-inline: + build: + context: . + volumes: + - .:/app + - ${APPBOT_TOOL_FRIENDLY_HOST:-/dev/null}:${APPBOT_TOOL_FRIENDLY_CONTAINER:-/dev/null} # see usage in .env_example file diff --git a/docker/bundle b/docker/bundle new file mode 100755 index 0000000..6331630 --- /dev/null +++ b/docker/bundle @@ -0,0 +1,8 @@ +#!/bin/bash + +# https://gist.github.com/vncsna/64825d5609c146e80de8b1fd623011ca +set -euo pipefail + +echo '[docker container]' + +docker compose run --rm simplecov-inline bundle $* diff --git a/docker/rubocop b/docker/rubocop new file mode 100755 index 0000000..849679f --- /dev/null +++ b/docker/rubocop @@ -0,0 +1,8 @@ +#!/bin/bash + +# https://gist.github.com/vncsna/64825d5609c146e80de8b1fd623011ca +set -euo pipefail + +echo '[docker container]' + +docker compose run --rm simplecov-inline rubocop $* diff --git a/docker/setup b/docker/setup new file mode 100755 index 0000000..b6f6929 --- /dev/null +++ b/docker/setup @@ -0,0 +1,8 @@ +#!/bin/bash + +# https://gist.github.com/vncsna/64825d5609c146e80de8b1fd623011ca +set -euo pipefail + +echo '[docker container]' +docker compose down --remove-orphans +docker compose build diff --git a/simplecov-inline.gemspec b/simplecov-inline.gemspec index 87afbe7..1a290f4 100644 --- a/simplecov-inline.gemspec +++ b/simplecov-inline.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |spec| spec.summary = "See missed lines of coverage inline with rspec output." spec.homepage = "https://github.com/appbot/simplecov-inline" spec.license = "MIT" - spec.required_ruby_version = ">= 2.6.0" + spec.required_ruby_version = '>= 3.1.0' spec.metadata["homepage_uri"] = spec.homepage spec.metadata["source_code_uri"] = "https://github.com/appbot/simplecov-inline"