Sha256: ca6e2b661ad3798a5efbd69b63821d373b067e1f5a62200c5e648156cec61d81

Contents?: true

Size: 1.87 KB

Versions: 15

Compression:

Stored size: 1.87 KB

Contents

require 'rake_factory'

require_relative '../tasks/clean'
require_relative '../tasks/download'
require_relative '../tasks/ensure'
require_relative '../tasks/extract'
require_relative '../tasks/fetch'


module RakeDependencies
  module TaskSets
    class All < RakeFactory::TaskSet
      prepend RakeFactory::Namespaceable

      parameter :containing_namespace

      parameter :dependency, required: true
      parameter :version
      parameter :path, required: true
      parameter :type, default: :zip

      parameter :os_ids, default: {mac: 'mac', linux: 'linux'}

      parameter :distribution_directory, default: 'dist'
      parameter :binary_directory, default: 'bin'
      parameter :installation_directory

      parameter :uri_template, required: true
      parameter :file_name_template, required: true
      parameter :strip_path_template

      parameter :source_binary_name_template
      parameter :target_binary_name_template

      parameter :needs_fetch, required: true, lazy: true

      parameter :clean_task_name, default: :clean
      parameter :download_task_name, default: :download
      parameter :extract_task_name, default: :extract
      parameter :install_task_name, default: :install
      parameter :fetch_task_name, default: :fetch
      parameter :ensure_task_name, default: :ensure

      task Tasks::Clean, name: ->(ts) { ts.clean_task_name }
      task Tasks::Download, name: ->(ts) { ts.download_task_name }
      task Tasks::Extract, name: ->(ts) { ts.extract_task_name }
      task Tasks::Install, {
          name: ->(ts) { ts.install_task_name },
          define_if: ->(ts) { ts.installation_directory }
      } do |ts, t|
        t.binary_name_template =
            ts.target_binary_name_template || ts.dependency
      end
      task Tasks::Fetch, name: ->(ts) { ts.fetch_task_name }
      task Tasks::Ensure, name: ->(ts) { ts.ensure_task_name }
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rake_dependencies-1.16.0 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.15.0.pre.1 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.14.0 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.13.0.pre.1 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.12.0 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.11.0.pre.1 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.10.0 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.9.0.pre.1 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.8.0 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.7.0.pre.1 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.6.0 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.5.0.pre.2 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.5.0.pre.1 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.4.0 lib/rake_dependencies/task_sets/all.rb
rake_dependencies-1.3.0.pre.1 lib/rake_dependencies/task_sets/all.rb