From dfa8a8ae6d3b7d54d2ff0cad42940bcf9f745d78 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Fri, 4 Sep 2015 22:31:04 +0000 Subject: [PATCH] Fix shared gems to be deduplicated --- Gemfile | 1 + Gemfile.shared | 3 +++ spec/support/corpus.rb | 1 + test_app/Gemfile.rspec3.2 | 1 + test_app/Gemfile.rspec3.3 | 1 + 5 files changed, 7 insertions(+) create mode 100644 Gemfile.shared diff --git a/Gemfile b/Gemfile index 14859149..34df138a 100644 --- a/Gemfile +++ b/Gemfile @@ -3,3 +3,4 @@ source 'https://rubygems.org' gemspec name: 'mutant' gem 'devtools', git: 'https://github.com/rom-rb/devtools.git' +eval_gemfile File.expand_path('../Gemfile.shared', __FILE__) diff --git a/Gemfile.shared b/Gemfile.shared new file mode 100644 index 00000000..0a905f28 --- /dev/null +++ b/Gemfile.shared @@ -0,0 +1,3 @@ +# Place for shared git sources, used for developing updates to depedencies +# where the git sources (without this file) need to be consistently edited +# into multiple Gemfiles. diff --git a/spec/support/corpus.rb b/spec/support/corpus.rb index 8199eb3b..6601f1a5 100644 --- a/spec/support/corpus.rb +++ b/spec/support/corpus.rb @@ -134,6 +134,7 @@ module MutantSpec repo_path.join('Gemfile').open('a') do |file| file << "gem 'mutant', path: '#{relative}'\n" file << "gem 'mutant-rspec', path: '#{relative}'\n" + file << "eval_gemfile File.expand_path('#{relative.join('Gemfile.shared')}')\n" end lockfile = repo_path.join('Gemfile.lock') lockfile.delete if lockfile.exist? diff --git a/test_app/Gemfile.rspec3.2 b/test_app/Gemfile.rspec3.2 index f28925bb..b64378f3 100644 --- a/test_app/Gemfile.rspec3.2 +++ b/test_app/Gemfile.rspec3.2 @@ -4,3 +4,4 @@ gem 'rspec-core', '~> 3.2.0' gem 'mutant', path: '../' gem 'mutant-rspec', path: '../' gem 'adamantium' +eval_gemfile File.expand_path('../../Gemfile.shared', __FILE__) diff --git a/test_app/Gemfile.rspec3.3 b/test_app/Gemfile.rspec3.3 index 44ce55e6..0100154a 100644 --- a/test_app/Gemfile.rspec3.3 +++ b/test_app/Gemfile.rspec3.3 @@ -4,3 +4,4 @@ gem 'rspec-core', '~> 3.3.0' gem 'mutant', path: '../' gem 'mutant-rspec', path: '../' gem 'adamantium' +eval_gemfile File.expand_path('../../Gemfile.shared', __FILE__)