Sha256: a2f5b357ef781b4d595938397079458797844cdfb080ed2c77854ad500c6a5dc

Contents?: true

Size: 994 Bytes

Versions: 12

Compression:

Stored size: 994 Bytes

Contents

require 'rake_factory'
require 'ruby_leiningen'
require 'ruby_leiningen/plugins'

require_relative '../mixins/directoried'

module RakeLeiningen
  module Tasks
    class Start < RakeFactory::Task
      include Mixins::Directoried

      default_name :start
      default_description "Run the application."
      default_prerequisites RakeFactory::DynamicValue.new { |t|
        t.ensure_task_name ? [t.ensure_task_name] : []
      }

      parameter :main_function
      parameter :arguments
      parameter :quote_arguments
      parameter :profile

      parameter :directory, default: '.'

      parameter :ensure_task_name, default: 'leiningen:ensure'

      action do |t|
        puts "Running the application..."

        in_directory(t.directory) do
          RubyLeiningen.run(
              main_function: t.main_function,
              arguments: t.arguments,
              quote_arguments: t.quote_arguments,
              profile: t.profile)
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rake_leiningen-0.23.0.pre.1 lib/rake_leiningen/tasks/start.rb
rake_leiningen-0.22.0 lib/rake_leiningen/tasks/start.rb
rake_leiningen-0.21.0.pre.2 lib/rake_leiningen/tasks/start.rb
rake_leiningen-0.21.0.pre.1 lib/rake_leiningen/tasks/start.rb
rake_leiningen-0.20.0 lib/rake_leiningen/tasks/start.rb
rake_leiningen-0.19.0.pre.1 lib/rake_leiningen/tasks/start.rb
rake_leiningen-0.18.0 lib/rake_leiningen/tasks/start.rb
rake_leiningen-0.17.0.pre.1 lib/rake_leiningen/tasks/start.rb
rake_leiningen-0.16.0 lib/rake_leiningen/tasks/start.rb
rake_leiningen-0.15.0.pre.1 lib/rake_leiningen/tasks/start.rb
rake_leiningen-0.14.0 lib/rake_leiningen/tasks/start.rb
rake_leiningen-0.13.0.pre.1 lib/rake_leiningen/tasks/start.rb