Class: Whally::Builder

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions, Whally
Defined in:
lib/whally/builder.rb

Overview

Whally Commandline App

Constant Summary

Constants included from Whally

URL, VERSION

Instance Method Summary collapse

Constructor Details

#initialize(args = [], local_options = {}, config = {}) ⇒ Builder

Returns a new instance of Builder.



15
16
17
18
19
# File 'lib/whally/builder.rb', line 15

def initialize(args = [], local_options = {}, config = {})
  super
  @gems = []
  @pathfile = ''
end

Instance Method Details

#dockerize(pathfile) ⇒ Object



22
23
24
25
26
27
28
29
30
31
# File 'lib/whally/builder.rb', line 22

def dockerize(pathfile)
  @pathfile = pathfile.gsub('Gemfile', '')
  scan_gems
  response = return_packages
  Whally::Dockerfiler.new(response, @pathfile).dockerfiles
  if @gems.include?('rails')
    add_development_files
  end
  build_container
end