Permalink
Browse files

Merge pull request #21 from travis-ci/meat-logs-readonly-config

Add `logs_readonly_database` ActiveRecord::Base configuration
2 parents 61906e5 + 2540119 commit 113cff17fe383bb72fcfae3a97a8ce98c228342f @meatballhat meatballhat committed on GitHub Mar 2, 2017
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/travis/support/database.rb
@@ -21,6 +21,10 @@ def connect
ActiveRecord::Base.configurations['logs_database'] = Travis.config.logs_database.to_h
end
+ if Travis.config.logs_readonly_database
+ ActiveRecord::Base.configurations['logs_readonly_database'] = Travis.config.logs_readonly_database.to_h
+ end
+
ActiveRecord::Base.establish_connection(Travis.env)
end
end

0 comments on commit 113cff1

Please sign in to comment.