From dc77182c1178c930a89db19b2e37b98147ab48fb Mon Sep 17 00:00:00 2001 From: Konrad Date: Thu, 12 Sep 2024 16:10:21 +0200 Subject: [PATCH] fix: make development environment use gemspec for better consistency - copy gemspec dependencies to docker context before calling "bundle install" - specify the desired gem paths by hand to avoid complains about missing git --- Dockerfile | 6 +++--- Gemfile.docker | 20 -------------------- morandi.gemspec | 3 +-- 3 files changed, 4 insertions(+), 25 deletions(-) delete mode 100644 Gemfile.docker diff --git a/Dockerfile b/Dockerfile index 5e58078..3429a10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,9 +15,9 @@ RUN apt-get update && apt-get install -yyq --no-install-recommends \ RUN gem update --system 3.4.22 -COPY Gemfile* /app/ -WORKDIR /app/ -RUN bundle config --local gemfile Gemfile.docker +WORKDIR /app +COPY morandi.gemspec Gemfile ./ +COPY lib/morandi/version.rb lib/morandi/version.rb RUN bundle install COPY . /app diff --git a/Gemfile.docker b/Gemfile.docker deleted file mode 100644 index aa213fc..0000000 --- a/Gemfile.docker +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -source 'https://rubygems.org' - -gem 'cairo' -gem 'colorscore' -gem 'gdk_pixbuf2' -gem 'gtk2', '>= 3.2.7' -gem 'pango' -gem 'pixbufutils' -gem 'redeye' - -group :development, :test do - gem 'rake' - gem 'rspec' - gem 'guard' - gem 'guard-rspec', require: false - gem 'pry' - gem 'rubocop', require: false -end diff --git a/morandi.gemspec b/morandi.gemspec index 523c1c1..da84fb0 100644 --- a/morandi.gemspec +++ b/morandi.gemspec @@ -15,8 +15,7 @@ Gem::Specification.new do |spec| spec.license = 'MIT' spec.required_ruby_version = '>= 2.0' - spec.files = `git ls-files -z`.split("\x0") - spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } + spec.files = Dir['CHANGELOG.md', 'LICENSE.txt', 'README.md', 'lib/**/*'] spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ['lib']