Sha256: adeb969f4b9d16f1cdcbf45d1983b563a7c6ee66a5b834569b798bbf5fef97a4
Contents?: true
Size: 567 Bytes
Versions: 19
Compression:
Stored size: 567 Bytes
Contents
class ForgeCLI::CustomFileCopier attr_accessor :app def self.copy_files!(app) new(app).copy_files! end def initialize(app) @app = app end def copy_files! files.each do |file| rel_path = file.gsub(File.join(ENV["HOME"], '.forge') + "/", '') ForgeCLI::Output.write('create', rel_path) FileUtils.cp_r(file, @app) end end def files @files ||= Dir.glob(File.join(ENV["HOME"], '.forge', '{*,.*}')). reject { |f| rejects.include?(File.basename(f)) } end def rejects %w{. .. .git} end end
Version data entries
19 entries across 19 versions & 1 rubygems