Skip to content

Commit

Permalink
fix: make development environment use gemspec for better consistency
Browse files Browse the repository at this point in the history
- copy gemspec dependencies to docker context before calling "bundle install"
- specify the desired gem paths by hand to avoid complains about missing git
  • Loading branch information
knarewski committed Sep 12, 2024
1 parent ecf2121 commit dc77182
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 0 additions & 20 deletions Gemfile.docker

This file was deleted.

3 changes: 1 addition & 2 deletions morandi.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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)/})

Check warning on line 19 in morandi.gemspec

View workflow job for this annotation

GitHub Actions / RuboCop Action

morandi.gemspec#L19

Do not set `test_files` in gemspec. [Gemspec/DeprecatedAttributeAssignment]
spec.require_paths = ['lib']

Expand Down

0 comments on commit dc77182

Please sign in to comment.