Class: Gantree::Init
Instance Attribute Summary collapse
-
#bucket_name ⇒ Object
readonly
Returns the value of attribute bucket_name.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(image, options) ⇒ Init
constructor
A new instance of Init.
- #run ⇒ Object
Methods inherited from Base
#authenticate_librato, #cfm, #check_credentials, check_for_updates, #check_template_bucket, #create_default_env, #eb, #env_type, #error_msg, #escape_characters_in_string, #get_latest_docker_solution, #print_options, #s3, #set_aws_keys, #tag, update_configuration, #upload_templates
Constructor Details
#initialize(image, options) ⇒ Init
Returns a new instance of Init.
8 9 10 11 12 13 14 15 |
# File 'lib/gantree/init.rb', line 8 def initialize image, check_credentials set_aws_keys @image = image @options = @bucket_name = @options.bucket || default_bucket_name end |
Instance Attribute Details
#bucket_name ⇒ Object (readonly)
Returns the value of attribute bucket_name.
6 7 8 |
# File 'lib/gantree/init.rb', line 6 def bucket_name @bucket_name end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
6 7 8 |
# File 'lib/gantree/init.rb', line 6 def image @image end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/gantree/init.rb', line 6 def @options end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/gantree/init.rb', line 17 def run puts "initialize image #{@image}" FileUtils.rm("Dockerrun.aws.json") if File.exist?("Dockerrun.aws.json") create_docker_config_s3_bucket unless [:dry_run] create_dockerrun upload_docker_config if .user && ![:dry_run] end |