Skip to content

Commit

Permalink
Install bundler config to ~/.bundle/config so we can provide it custo…
Browse files Browse the repository at this point in the history
…m UAs
  • Loading branch information
michaelklishin committed Nov 22, 2012
1 parent d5054d8 commit 85afa6d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ci_environment/rvm/recipes/default.rb
Expand Up @@ -74,3 +74,25 @@

source "dot_rvmrc.sh.erb"
end


bundler_settings = File.join(node.travis_build_environment.home, ".bundle", "config")
template bundler_settings do
owner node.travis_build_environment.user
group node.travis_build_environment.group

mode 0644

source "bundler_config.yml.erb"
variables Hash[:suffix => node.travis_build_environment.installation_suffix]
action :nothing
end


directory(File.join(node.travis_build_environment.home, ".bundle")) do
owner node.travis_build_environment.user
group node.travis_build_environment.group

action :create
notifies :create, resources(:template => bundler_settings)
end
2 changes: 2 additions & 0 deletions ci_environment/rvm/templates/default/bundler_config.yml.erb
@@ -0,0 +1,2 @@
api:
user_agent_extra: "travis-ci.<%= suffix %>/1.0.0"
2 changes: 2 additions & 0 deletions ci_environment/travis_build_environment/attributes/default.rb
Expand Up @@ -7,6 +7,8 @@
:hosts => Hash.new,
:builds_volume_size => "350m",
:use_tmpfs_for_builds => true,
# "org" or "com"
:installation_suffix => "org",

:apt => {
# in seconds
Expand Down

0 comments on commit 85afa6d

Please sign in to comment.