Fix shared gems to be deduplicated

This commit is contained in:
Markus Schirp 2015-09-04 22:31:04 +00:00
parent 2a37b113da
commit dfa8a8ae6d
5 changed files with 7 additions and 0 deletions

View file

@ -3,3 +3,4 @@ source 'https://rubygems.org'
gemspec name: 'mutant' gemspec name: 'mutant'
gem 'devtools', git: 'https://github.com/rom-rb/devtools.git' gem 'devtools', git: 'https://github.com/rom-rb/devtools.git'
eval_gemfile File.expand_path('../Gemfile.shared', __FILE__)

3
Gemfile.shared Normal file
View file

@ -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.

View file

@ -134,6 +134,7 @@ module MutantSpec
repo_path.join('Gemfile').open('a') do |file| repo_path.join('Gemfile').open('a') do |file|
file << "gem 'mutant', path: '#{relative}'\n" file << "gem 'mutant', path: '#{relative}'\n"
file << "gem 'mutant-rspec', path: '#{relative}'\n" file << "gem 'mutant-rspec', path: '#{relative}'\n"
file << "eval_gemfile File.expand_path('#{relative.join('Gemfile.shared')}')\n"
end end
lockfile = repo_path.join('Gemfile.lock') lockfile = repo_path.join('Gemfile.lock')
lockfile.delete if lockfile.exist? lockfile.delete if lockfile.exist?

View file

@ -4,3 +4,4 @@ gem 'rspec-core', '~> 3.2.0'
gem 'mutant', path: '../' gem 'mutant', path: '../'
gem 'mutant-rspec', path: '../' gem 'mutant-rspec', path: '../'
gem 'adamantium' gem 'adamantium'
eval_gemfile File.expand_path('../../Gemfile.shared', __FILE__)

View file

@ -4,3 +4,4 @@ gem 'rspec-core', '~> 3.3.0'
gem 'mutant', path: '../' gem 'mutant', path: '../'
gem 'mutant-rspec', path: '../' gem 'mutant-rspec', path: '../'
gem 'adamantium' gem 'adamantium'
eval_gemfile File.expand_path('../../Gemfile.shared', __FILE__)