Sha256: 76055f11753db4e427dded4d32f3aa4f48058cc05e700e44e3028e5fb8a72755

Contents?: true

Size: 718 Bytes

Versions: 29

Compression:

Stored size: 718 Bytes

Contents

require_relative '../tasklib'

module RakeDependencies
  module Tasks
    class Fetch < TaskLib
      parameter :name, default: :fetch
      parameter :dependency, required: true
      parameter :download_task, default: :download
      parameter :extract_task, default: :extract

      def process_arguments args
        super(args)
        self.name = args[0] if args[0]
      end

      def define
        desc "Fetch #{dependency}"
        task name => [
            scoped_task_name(download_task),
            scoped_task_name(extract_task)
        ]
      end

      private

      def scoped_task_name(task_name)
        Rake.application.current_scope.path_with_task_name(task_name)
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
rake_dependencies-0.23.0 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.22.0.pre.pre.2 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.22.0.pre.pre.1 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.21.0 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.20.0.pre.pre.2 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.20.0.pre.pre.1 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.19.0 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.18.1.pre1 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.18.0 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.17.1.pre2 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.17.1.pre1 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.17.0 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.16.1.pre3 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.16.1.pre2 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.16.1.pre1 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.16.0 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.15.2.pre1 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.15.1 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.15.0 lib/rake_dependencies/tasks/fetch.rb
rake_dependencies-0.14.1 lib/rake_dependencies/tasks/fetch.rb