Sha256: d5d99df751baf378205663c03caffdcc22e1eb7e75b5ad372be6efc8a132da3f

Contents?: true

Size: 966 Bytes

Versions: 6

Compression:

Stored size: 966 Bytes

Contents

# frozen_string_literal: true

require "bundler/gem_tasks"
require "rake/testtask"
require "syntax_tree/rake_tasks"

Rake.add_rakelib "tasks"

Rake::TestTask.new(:test) do |t|
  t.libs << "test"
  t.libs << "lib"
  t.test_files = FileList["test/**/*_test.rb"]
end

task default: :test

configure = ->(task) do
  task.source_files =
    FileList[
      %w[
        Gemfile
        Rakefile
        syntax_tree.gemspec
        lib/**/*.rb
        tasks/*.rake
        test/*.rb
      ]
    ]

  # Since Syntax Tree supports back to Ruby 2.7.0, we need to make sure that we
  # format our code such that it's compatible with that version. This actually
  # has very little effect on the output, the only change at the moment is that
  # Ruby < 2.7.3 didn't allow a newline before the closing brace of a hash
  # pattern.
  task.target_ruby_version = Gem::Version.new("2.7.0")
end

SyntaxTree::Rake::CheckTask.new(&configure)
SyntaxTree::Rake::WriteTask.new(&configure)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
syntax_tree-6.2.0 Rakefile
syntax_tree-6.1.1 Rakefile
syntax_tree-6.1.0 Rakefile
syntax_tree-6.0.2 Rakefile
syntax_tree-6.0.1 Rakefile
syntax_tree-6.0.0 Rakefile