Skip to content

Commit d9aee09

Browse files
committed
(maint) Allow local Gemfile overrides
Developers may want to use additional gems during development. This commit updates the Gemfile to allow user and project additions to be added without the need to checkin the Gemfile. This is a common pattern used within Puppet.
1 parent 5942871 commit d9aee09

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ tmtags
1616

1717
## BUNDLER
1818
.bundle
19+
Gemfile.local
1920
Gemfile.lock
2021

2122
## YARD

Gemfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,13 @@ group :development do
3636
end
3737

3838
gem 'rubocop', '~> 0.49'
39+
40+
# Evaluate Gemfile.local if it exists
41+
if File.exists? "#{__FILE__}.local"
42+
eval(File.read("#{__FILE__}.local"), binding)
43+
end
44+
45+
# Evaluate ~/.gemfile if it exists
46+
if File.exists?(File.join(Dir.home, '.gemfile'))
47+
eval(File.read(File.join(Dir.home, '.gemfile')), binding)
48+
end

0 commit comments

Comments
 (0)