Sha256: 75915b827ecda0a35af52d114a48786e11c2e8401c4780d15fdc5380e4d6b2f7

Contents?: true

Size: 1.26 KB

Versions: 111

Compression:

Stored size: 1.26 KB

Contents

# frozen_string_literal: true

require 'avm/eac_latex_base0/sources/build/commons'
require 'avm/eac_latex_base0/sources/build/file'

module Avm
  module EacLatexBase0
    module Sources
      class Build
        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::EacLatexBase0::Sources::Build::File.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::EacLatexBase0::Sources::Build::Commons.instance.template.apply(self, target_dir)
          end
        end
      end
    end
  end
end

Version data entries

111 entries across 111 versions & 2 rubygems

Version Path
eac_tools-0.72.0 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.70.1 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.70.0 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.69.1 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.69.0 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.68.0 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.67.1 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.67.0 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.66.0 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.65.1 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.65.0 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.64.0 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.63.0 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.62.1 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.62.0 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.61.1 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.61.0 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.60.3 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
eac_tools-0.60.2 sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb
avm-eac_latex_base0-0.3.1 lib/avm/eac_latex_base0/sources/build/copy_files.rb