Sha256: 84ec3c5d0eab27853d8604434067f9f888e48fc87012ba653a7cfb0df5a6d34e

Contents?: true

Size: 898 Bytes

Versions: 15

Compression:

Stored size: 898 Bytes

Contents

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

require_relative '../mixins/directoried'

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

      default_name :optimise
      default_description "Warn on reflection for all clojure files."
      default_prerequisites RakeFactory::DynamicValue.new { |t|
        t.ensure_task_name ? [t.ensure_task_name] : []
      }

      parameter :profile
      parameter :environment

      parameter :directory, default: '.'

      parameter :ensure_task_name, default: 'leiningen:ensure'

      action do |t|
        puts "Checking for uses of reflection in all clojure files..."

        in_directory(t.directory) do
          RubyLeiningen.check(
              profile: t.profile,
              environment: t.environment)
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rake_leiningen-0.33.0.pre.2 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.33.0.pre.1 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.32.0 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.31.0.pre.4 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.31.0.pre.3 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.31.0.pre.2 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.31.0.pre.1 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.30.0 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.29.0.pre.1 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.28.0 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.27.0.pre.1 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.26.0 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.25.0.pre.1 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.24.0 lib/rake_leiningen/tasks/optimise.rb
rake_leiningen-0.23.0.pre.2 lib/rake_leiningen/tasks/optimise.rb