lib/robotkit/cli.rb in robotkit-0.1.2 vs lib/robotkit/cli.rb in robotkit-0.1.3

- old
+ new

@@ -2,10 +2,11 @@ require 'thor' require "fileutils" require "erb" module Robotkit + PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__))) class CLI < Thor desc "create :project_name --package com.github.library", "Create Android project" option :package, required: true option :library_module option :sample_module @@ -19,10 +20,10 @@ def self.exec(params) sample_package_name = "#{params[:package]}.sample" library_package_name = params[:package] library_module = params[:library_module] || "library" sample_module = params[:sample_module] || "sample" - fixtures_dir = params[:fixtures_dir] || "fixtures" + fixtures_dir = params[:fixtures_dir] || File.join(PROJECT_ROOT_PATH, "fixtures") output_dir = params[:output_dir] # copy from fixtues dir to output dir FileUtils.mkdir(output_dir) Dir.foreach(fixtures_dir).reject{|it| it.start_with?(".")}.each do |item|