Class: Figaro::Tasks::Heroku
- Inherits:
-
Struct
- Object
- Struct
- Figaro::Tasks::Heroku
- Defined in:
- lib/figaro/tasks.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Instance Method Summary collapse
- #`(command) ⇒ Object
- #environment ⇒ Object
- #heroku(command) ⇒ Object
- #invoke ⇒ Object
- #vars ⇒ Object
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app
5 6 7 |
# File 'lib/figaro/tasks.rb', line 5 def app @app end |
Instance Method Details
#`(command) ⇒ Object
23 24 25 |
# File 'lib/figaro/tasks.rb', line 23 def `(command) Bundler.with_clean_env { super } end |
#environment ⇒ Object
14 15 16 |
# File 'lib/figaro/tasks.rb', line 14 def environment heroku("run 'echo $RAILS_ENV'").chomp[/(\w+)\z/] end |
#heroku(command) ⇒ Object
18 19 20 21 |
# File 'lib/figaro/tasks.rb', line 18 def heroku(command) with_app = app ? " --app #{app}" : "" `heroku #{command}#{with_app}` end |
#invoke ⇒ Object
6 7 8 |
# File 'lib/figaro/tasks.rb', line 6 def invoke heroku("config:set #{vars}") end |