From fb5364b70d79db9991d7895db479127e6d2f6082 Mon Sep 17 00:00:00 2001 From: David Runger Date: Fri, 2 Feb 2024 08:35:07 -0600 Subject: [PATCH] Source Ruby version from .ruby-version file --- .github/workflows/main.yml | 3 +-- .ruby-version | 1 + simple_cov-formatter-terminal.gemspec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 .ruby-version diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2b6fdd0..dcf3b56 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,10 +12,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up Ruby 3.3.0 + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.3.0 bundler-cache: true - run: bin/rubocop - run: bin/rspec diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..15a2799 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.3.0 diff --git a/simple_cov-formatter-terminal.gemspec b/simple_cov-formatter-terminal.gemspec index d2917a6..1ab4db4 100644 --- a/simple_cov-formatter-terminal.gemspec +++ b/simple_cov-formatter-terminal.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |spec| spec.description = 'Print detailed code coverage info to the terminal' spec.homepage = 'https://github.com/davidrunger/simple_cov-formatter-terminal' spec.license = 'MIT' - spec.required_ruby_version = '>= 3.2.0' + spec.required_ruby_version = Gem::Requirement.new(">= #{File.read('.ruby-version').rstrip}") spec.metadata['homepage_uri'] = spec.homepage spec.metadata['source_code_uri'] = 'https://github.com/davidrunger/simple_cov-formatter-terminal'