Class: Zerg::Generators::HiveGen

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/zerg/generators/hivegen.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



32
33
34
# File 'lib/zerg/generators/hivegen.rb', line 32

def self.source_root
    File.join(File.dirname(__FILE__), "task")
end

Instance Method Details

#copy_sample_taskObject



41
42
43
44
45
# File 'lib/zerg/generators/hivegen.rb', line 41

def copy_sample_task
    load_path = (ENV['HIVE_CWD'] == nil) ? File.join("#{Dir.pwd}", ".hive") : File.join("#{ENV['HIVE_CWD']}", ".hive")
    template("template.ke", "#{File.join(load_path, "helloworld", "helloworld.ke")}")
    template("awstemplate.ke", "#{File.join(load_path, "helloaws", "helloaws.ke")}")
end

#create_hiveObject



36
37
38
39
# File 'lib/zerg/generators/hivegen.rb', line 36

def create_hive
    load_path = (ENV['HIVE_CWD'] == nil) ? File.join("#{Dir.pwd}", ".hive") : File.join("#{ENV['HIVE_CWD']}", ".hive")
    empty_directory "#{File.join(load_path, "driver")}"
end