Module: Branchinator
- Defined in:
- lib/branchinator.rb,
lib/branchinator/railtie.rb,
lib/branchinator/version.rb,
lib/branchinator/constants.rb,
lib/branchinator/branched_database.rb
Defined Under Namespace
Classes: BranchedDatabase, Railtie
Constant Summary
collapse
- VERSION =
'0.2.0'
- FLAG_FILE =
'.branchinator'
Class Method Summary
collapse
Class Method Details
.database ⇒ Object
6
7
8
9
10
11
12
13
|
# File 'lib/branchinator.rb', line 6
def self.database()
dot_file = Rails.root.join(Branchinator::FLAG_FILE)
if dot_file.exist?
JSON.load(dot_file)[Rails.env] || self.default_database
else
self.default_database
end
end
|
.default_database ⇒ Object
15
16
17
|
# File 'lib/branchinator.rb', line 15
def self.default_database()
BranchedDatabase.new.default_database
end
|