Sha256: 1ee815546186944c54edb0780fd5de76b097228ed13ec50232b57385359dd100

Contents?: true

Size: 1.15 KB

Versions: 17

Compression:

Stored size: 1.15 KB

Contents

# frozen_string_literal: true

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

require_relative '../mixins/directoried'

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

      default_name :idiomise
      default_description 'Transform all clojure files to be more idiomatic.'
      default_prerequisites(RakeFactory::DynamicValue.new do |t|
        t.ensure_task_name ? [t.ensure_task_name] : []
      end)

      parameter :replace
      parameter :interactive
      parameter :reporter
      parameter :paths
      parameter :profile
      parameter :environment

      parameter :directory, default: '.'

      parameter :ensure_task_name, default: 'leiningen:ensure'

      action do |t|
        $stdout.puts 'Making all clojure files more idiomatic...'

        in_directory(t.directory) do
          RubyLeiningen.kibit(
            replace: t.replace,
            interactive: t.interactive,
            reporter: t.reporter,
            paths: t.paths,
            profile: t.profile,
            environment: t.environment
          )
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rake_leiningen-0.39.0.pre.2 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.39.0.pre.1 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.38.0 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.37.0.pre.7 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.37.0.pre.6 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.37.0.pre.5 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.37.0.pre.4 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.37.0.pre.3 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.37.0.pre.2 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.37.0.pre.1 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.36.0 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.35.0.pre.2 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.35.0.pre.1 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.34.0 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.33.0.pre.5 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.33.0.pre.4 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.33.0.pre.3 lib/rake_leiningen/tasks/idiomise.rb