Sha256: 3855a357724749a27ec53c3735286f8ce18156545e7bc06f77d47654f6c93dee

Contents?: true

Size: 1.01 KB

Versions: 8

Compression:

Stored size: 1.01 KB

Contents

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 ->(t) {
        t.ensure_task_name ? [t.ensure_task_name] : []
      }

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

      parameter :directory, default: '.'

      parameter :ensure_task_name, default: 'leiningen:ensure'

      action do |t|
        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)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rake_leiningen-0.12.0 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.11.0.pre.1 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.10.0 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.9.0.pre.1 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.8.0 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.7.0.pre.1 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.6.0 lib/rake_leiningen/tasks/idiomise.rb
rake_leiningen-0.5.0.pre.1 lib/rake_leiningen/tasks/idiomise.rb