Skip to content

Commit

Permalink
Add a .ruby-version file
Browse files Browse the repository at this point in the history
We're starting to pin the desired ruby version in multiple places:
* Rubocop
* the new `ruby/setup-ruby` action that we're adding in dependabot#5433

We used to not ship the `.ruby-version` file, with the thought that this
is a library... but this file isn't included in the gemfile spec, so
we're not tying the hands of our users. This merely sets the default
version of Ruby that we're using for development. We will keep this in
sync with the version of Ruby installed in the Dockerfile, so it'll
target the version of Ruby we use in production at GitHub. But since not
included in the gem, others are free to use a different Ruby version.

Copy the `.ruby-version` file into the CI container.
  • Loading branch information
jeffwidman committed Aug 7, 2022
1 parent c2adf22 commit 373a772
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ vendor
/.core-bash_history
coverage/
.ruby-gemset
.ruby-version
.tool-versions
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ AllCops:
- "*/bin/**/*"
- "**/tmp/**/*"
- "*/spec/fixtures/**/*"
TargetRubyVersion: 2.7
SuggestExtensions: false
Gemspec/DeprecatedAttributeAssignment:
Enabled: true
Expand Down
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.7.6
1 change: 1 addition & 0 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ RUN git config --global user.name dependabot-ci \
ARG CODE_DIR=/home/dependabot/dependabot-core
WORKDIR ${CODE_DIR}

COPY --chown=dependabot:dependabot .ruby-version ${CODE_DIR}/.ruby-version
COPY --chown=dependabot:dependabot .rubocop.yml ${CODE_DIR}/.rubocop.yml
COPY --chown=dependabot:dependabot omnibus ${CODE_DIR}/omnibus
COPY --chown=dependabot:dependabot git_submodules ${CODE_DIR}/git_submodules
Expand Down

0 comments on commit 373a772

Please sign in to comment.