Sha256: d8351923e1285bf7ab2358044ba9d5328bdcdaab8195d3f3765ba14cafb32131

Contents?: true

Size: 1.65 KB

Versions: 61

Compression:

Stored size: 1.65 KB

Contents

# encoding: utf-8
require 'fedux_org_stdlib/rake/task'
require 'fedux_org_stdlib/project'

module FeduxOrgStdlib
  module Rake
    # Project Task
    #
    # @see Rakefile
    class ProjectTask < Task

      # @!attribute [r] report
      #   The report to be generated
      attr_reader :report

      # Create a new project task
      #
      # @param [String] report_file
      #   The main report file
      # @param [String] plan_file
      #   The main plan file
      # @param [Array] additional_files
      #   A list of additional files for the project plan
      #
      # @example Create new task
      #   FeduxOrgStdlib::Rake::ProjectTask.new
      #
      # @example Create new task using a different report file
      #   FeduxOrgStdlib::Rake::ProjectTask.new( 
      #     report_file: File.join(Dir.getwd, 'reports', 'Index.html')
      #   )
      #
      # @example Create new task using a different project plan and adding additional files
      #   FeduxOrgStdlib::Rake::ProjectTask.new( 
      #     plan_file: File.join(Dir.getwd, 'project1.tjp'),
      #     additional_files: %W{
      #     #{File.join(Dir.getwd, 'resources.tjp')}
      #     #{File.join(Dir.getwd, 'leaves.tjp')}
      #     }
      #   )
      def initialize(
        report_file: File.join(Dir.getwd, 'reports', 'Overview.html'),
        plan_file: File.join(Dir.getwd, 'plan.tjp'),
        additional_files: [],
        **args
      )
        super(**args)

        plan    = FeduxOrgStdlib::Project::Plan.new(main_file: plan_file, additional_files: additional_files)
        @report = FeduxOrgStdlib::Project::Report.new(plan: plan, output_file: report_file)
      end
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.6.54 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.53 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.52 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.51 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.50 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.48 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.47 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.46 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.45 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.44 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.43 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.40 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.39 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.38 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.37 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.34 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.33 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.32 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.31 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.6.30 lib/fedux_org_stdlib/rake/project_task.rb