Sha256: fc2e3f7896b88a97a9af6293eec4634a091c4dab0aafd44867ff3716c6aa2ecd

Contents?: true

Size: 1.1 KB

Versions: 107

Compression:

Stored size: 1.1 KB

Contents

# frozen_string_literal: true

require 'avm/eac_writings_base0/commons'
require 'avm/eac_writings_base0/file_build'

module Avm
  module EacWritingsBase0
    class ProjectBuild
      module CopyFiles
        def copy_project_files
          copy_project_dir('.')
        end

        def copy_project_obj(subpath)
          return if File.basename(subpath).start_with?('.')

          if File.directory?(File.join(project.root, subpath))
            copy_project_dir(subpath)
          else
            copy_project_file(subpath)
          end
        end

        def copy_project_file(subpath)
          ::Avm::EacWritingsBase0::FileBuild.new(project, subpath).build_to_dir(source_temp_dir)
        end

        def copy_project_dir(subpath)
          Dir.entries(File.join(project.root, subpath)).each do |f|
            copy_project_obj(File.join(subpath, f))
          end
        end

        def copy_commons_files
          target_dir = source_temp_dir.join('commons')
          target_dir.mkpath
          ::Avm::EacWritingsBase0::Commons.instance.template.apply(self, target_dir)
        end
      end
    end
  end
end

Version data entries

107 entries across 107 versions & 2 rubygems

Version Path
avm-tools-0.130.0 lib/avm/eac_writings_base0/project_build/copy_files.rb
eac_tools-0.17.0 sub/avm-tools/lib/avm/eac_writings_base0/project_build/copy_files.rb
avm-tools-0.129.1 lib/avm/eac_writings_base0/project_build/copy_files.rb
eac_tools-0.16.1 sub/avm-tools/lib/avm/eac_writings_base0/project_build/copy_files.rb
avm-tools-0.129.0 lib/avm/eac_writings_base0/project_build/copy_files.rb
eac_tools-0.16.0 sub/avm-tools/lib/avm/eac_writings_base0/project_build/copy_files.rb
avm-tools-0.128.0 lib/avm/eac_writings_base0/project_build/copy_files.rb
eac_tools-0.15.0 sub/avm-tools/lib/avm/eac_writings_base0/project_build/copy_files.rb
eac_tools-0.14.0 sub/avm-tools/lib/avm/eac_writings_base0/project_build/copy_files.rb
eac_tools-0.13.0 sub/avm-tools/lib/avm/eac_writings_base0/project_build/copy_files.rb
avm-tools-0.127.0 lib/avm/eac_writings_base0/project_build/copy_files.rb
eac_tools-0.12.0 sub/avm-tools/lib/avm/eac_writings_base0/project_build/copy_files.rb
avm-tools-0.126.0 lib/avm/eac_writings_base0/project_build/copy_files.rb
eac_tools-0.11.1 sub/avm-tools/lib/avm/eac_writings_base0/project_build/copy_files.rb
avm-tools-0.125.0 lib/avm/eac_writings_base0/project_build/copy_files.rb
eac_tools-0.11.0 sub/avm-tools/lib/avm/eac_writings_base0/project_build/copy_files.rb
avm-tools-0.124.0 lib/avm/eac_writings_base0/project_build/copy_files.rb
eac_tools-0.10.0 sub/avm-tools/lib/avm/eac_writings_base0/project_build/copy_files.rb
avm-tools-0.123.0 lib/avm/eac_writings_base0/project_build/copy_files.rb
eac_tools-0.9.0 sub/avm-tools/lib/avm/eac_writings_base0/project_build/copy_files.rb