Class: Travis::Deploy::Config
- Inherits:
-
Object
- Object
- Travis::Deploy::Config
- Includes:
- Helper
- Defined in:
- lib/travis/deploy/config.rb,
lib/travis/deploy/config/builder.rb
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#remote ⇒ Object
readonly
Returns the value of attribute remote.
-
#shell ⇒ Object
readonly
Returns the value of attribute shell.
Instance Method Summary collapse
-
#initialize(shell, remote, options) ⇒ Config
constructor
A new instance of Config.
- #invoke ⇒ Object
- #pretend ⇒ Object
Constructor Details
#initialize(shell, remote, options) ⇒ Config
Returns a new instance of Config.
12 13 14 15 16 17 |
# File 'lib/travis/deploy/config.rb', line 12 def initialize(shell, remote, ) @remote = remote @options = @shell = shell @env = ['env'] || remote end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
10 11 12 |
# File 'lib/travis/deploy/config.rb', line 10 def env @env end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/travis/deploy/config.rb', line 10 def @options end |
#remote ⇒ Object (readonly)
Returns the value of attribute remote.
10 11 12 |
# File 'lib/travis/deploy/config.rb', line 10 def remote @remote end |
#shell ⇒ Object (readonly)
Returns the value of attribute shell.
10 11 12 |
# File 'lib/travis/deploy/config.rb', line 10 def shell @shell end |
Instance Method Details
#invoke ⇒ Object
19 20 21 22 |
# File 'lib/travis/deploy/config.rb', line 19 def invoke store unless ['source'] push unless @env == 'development' end |
#pretend ⇒ Object
24 25 26 27 |
# File 'lib/travis/deploy/config.rb', line 24 def pretend say 'Config to upload:' say YAML.dump(config) end |