forked from etsy/deployinator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployinator.rb
71 lines (54 loc) · 1.76 KB
/
deployinator.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# = Deployinator
#
# This is the main entry point for all things in the Deployination.
module Deployinator
# = Config settings
class << self
# File to log to
attr_accessor :log_file
# Your company domain name
attr_accessor :domain
# New Relic logging of deploys
attr_accessor :new_relic_options
# The default stack name
attr_accessor :default_stack
# The default protocol, http/https
attr_accessor :protocol
# Hostname where deployinator runs
attr_accessor :hostname
# Devbot url (announce over irc)
attr_accessor :devbot_url
# Graphite host
attr_accessor :graphite_host
# Graphite port
attr_accessor :graphite_port
# Github host (if you're using Github::FI)
attr_accessor :github_host
# Default svn repo path for unspecified repos
attr_accessor :svn_default_repo
# Default username for passwordless ssh
attr_accessor :default_user
# IRC Log host for irc topics
attr_accessor :irc_log_host
# Bug or issue tracker - proc that takes the issue id as an argument
# ex: Deployinator.issue_tracker = proc {|issue| "http://foo/browse/#{issue}"}
attr_accessor :issue_tracker
# is a log file defined?
def log_file?
log_file
end
# Running environment for deployinator
# This is taken from RACK_ENV or RAILS_ENV
# *note* this is different from deployinator's concept of stacks/environments
def env
ENV["RACK_ENV"] || ENV["RAILS_ENV"] || "development"
end
# Base root path
# Takes an optional argument of a string or array and returns the path(s)
# From the root of deployinator
def root(path = nil)
base = File.expand_path(File.dirname(__FILE__))
path ? File.join(base, path) : base
end
end
end