Module: O2h
Constant Summary collapse
- VERSION =
"0.2.1"
Instance Method Summary collapse
- #app_mode ⇒ Object
- #capistrano(required = :require) ⇒ Object
- #host(recipe) ⇒ Object
- #initialize! ⇒ Object
Instance Method Details
#app_mode ⇒ Object
17 18 19 |
# File 'lib/o2h.rb', line 17 def app_mode require 'newrelic_rpm' end |
#capistrano(required = :require) ⇒ Object
6 7 8 |
# File 'lib/o2h.rb', line 6 def capistrano(required = :require) defined?(Capistrano) and Capistrano::Configuration.instance(required) end |
#host(recipe) ⇒ Object
21 22 23 |
# File 'lib/o2h.rb', line 21 def host(recipe) File.(File.join(%w{o2h recipes host} << recipe + ".rb"), File.dirname(__FILE__)) end |
#initialize! ⇒ Object
10 11 12 13 14 15 |
# File 'lib/o2h.rb', line 10 def initialize! # use app mode only when we are not in capistrano unless capistrano(false) app_mode end end |