Module: FakeFlorence::Config
- Defined in:
- lib/fake_florence/config.rb
Constant Summary collapse
- DEFAULT_CONFIG =
Pathname.new(__dir__).join('../../templates/config.yaml').freeze
- SEVERITY =
{ 'DEBUG' => 'đ¤', 'INFO' => 'âšī¸', 'WARN' => 'â ī¸', 'ERROR' => 'đĄ', 'FATAL' => 'đ¤ĸ', }.freeze
Class Attribute Summary collapse
-
.log ⇒ Object
Returns the value of attribute log.
Class Method Summary collapse
- .home_dir ⇒ Object
- .logfile ⇒ Object
- .method_missing(m) ⇒ Object
- .pidfile ⇒ Object
- .store_file ⇒ Object
- .url_for(feature) ⇒ Object
Class Attribute Details
.log ⇒ Object
Returns the value of attribute log.
18 19 20 |
# File 'lib/fake_florence/config.rb', line 18 def log @log end |
Class Method Details
.home_dir ⇒ Object
34 35 36 37 38 |
# File 'lib/fake_florence/config.rb', line 34 def home_dir Pathname.new('~/.flo')..tap do |home| home.mkpath end end |
.logfile ⇒ Object
52 53 54 |
# File 'lib/fake_florence/config.rb', line 52 def logfile home_dir.join('flo.log') end |
.method_missing(m) ⇒ Object
56 57 58 |
# File 'lib/fake_florence/config.rb', line 56 def method_missing(m) read_config(m) end |
.pidfile ⇒ Object
48 49 50 |
# File 'lib/fake_florence/config.rb', line 48 def pidfile home_dir.join('flo.pid') end |
.store_file ⇒ Object
30 31 32 |
# File 'lib/fake_florence/config.rb', line 30 def store_file home_dir.join('config.yaml') end |
.url_for(feature) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/fake_florence/config.rb', line 20 def url_for(feature) URI.join( read_config(:base_url), File.join( mount_path, feature.id ) ) end |