Skip to content

Commit

Permalink
CI: permit non 'gem' lines in Envfile
Browse files Browse the repository at this point in the history
use a new comment system to permit non 'gem' lines in `Envfile` files
  • Loading branch information
fallwith committed Aug 16, 2024
1 parent 6719a92 commit 4326957
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/multiverse/lib/multiverse/gem_manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def discover_suites

def gems_from_gemfile_body(body, path)
body.split("\n").each do |line|
next if line.empty? || line.match?(/(?:^\s*(?:#|if|else|end))|newrelic_(?:rpm|prepender)/)
next if line.empty? || line.match?(/(?:^\s*(?:#|if|else|end))|newrelic_(?:rpm|prepender)|# non-gem line/)

if line =~ /.*gem\s+['"]([^'"]+)['"](?:,\s+['"]([^'"]+)['"])?/
gem = Regexp.last_match(1)
Expand Down
4 changes: 2 additions & 2 deletions test/multiverse/suites/redis/Envfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.7.0')
gem 'rack'
gem 'redis-clustering'

require 'redis'
::Redis::Cluster.const_set(:Client, 'phony client definition')
require 'redis' # non-gem line
::Redis::Cluster.const_set(:Client, 'phony client definition') # non-gem line
GEMFILE
end

0 comments on commit 4326957

Please sign in to comment.