Class: Ready::Configuration
- Inherits:
-
Object
- Object
- Ready::Configuration
- Defined in:
- lib/ready/configuration.rb
Overview
Resolves ready's runtime configuration (paths, prefixes, the readyfile) from the environment, falling back to conventional defaults.
Instance Method Summary collapse
Instance Method Details
#build_dir ⇒ Object
16 17 18 |
# File 'lib/ready/configuration.rb', line 16 def build_dir prefix / "builds" end |
#prefix ⇒ Object
10 11 12 13 14 |
# File 'lib/ready/configuration.rb', line 10 def prefix fetched = fetch_env :prefix, default: "/tmp/ready" Pathname(fetched). end |
#project_path ⇒ Object
6 7 8 |
# File 'lib/ready/configuration.rb', line 6 def project_path Pathname(__dir__).parent.parent. end |
#readyfile ⇒ Object
28 29 30 |
# File 'lib/ready/configuration.rb', line 28 def readyfile @readyfile ||= open_readyfile end |
#sock_path ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/ready/configuration.rb', line 20 def sock_path fetched = fetch_env :sock_path do prefix / "ready.sock" end Pathname(fetched) end |