-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* everything in rakefile * ignore * run other ruby files through syntax tree * explicitly use ruby version from tool versions file * export ruby version * just rake * rake
- Loading branch information
Showing
6 changed files
with
35 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
ruby 3.2.2 | ||
postgres 14.4 | ||
postgres 16.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
source "https://rubygems.org" | ||
|
||
gem 'debug' | ||
if (rails_version = ENV['RAILS_VERSION']) | ||
gem 'rails', "~> #{rails_version}.0" | ||
gem "debug" | ||
if (rails_version = ENV["RAILS_VERSION"]) | ||
gem "rails", "~> #{rails_version}.0" | ||
else | ||
gem 'rails' | ||
gem "rails" | ||
end | ||
gem 'syntax_tree' | ||
gem 'typeprof' | ||
gem "syntax_tree" | ||
gem "typeprof" | ||
|
||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'bundler/gem_tasks' | ||
require 'rake/testtask' | ||
require "bundler/gem_tasks" | ||
require "rake/testtask" | ||
require "syntax_tree/rake_tasks" | ||
|
||
Rake::TestTask.new(:test) do |t| | ||
t.libs << 'test' | ||
t.libs << 'lib' | ||
t.test_files = FileList['test/**/test_*.rb'] | ||
t.libs << "test" | ||
t.libs << "lib" | ||
t.test_files = FileList["test/**/test_*.rb"] | ||
end | ||
|
||
task :pre_commit do | ||
`typeprof lib/hoardable.rb && stree write "**/*.rb"` | ||
SOURCE_FILES = %w[**/*.rb Rakefile Gemfile bin/console] | ||
|
||
SyntaxTree::Rake::CheckTask.new(:check) do |t| | ||
t.source_files = SOURCE_FILES | ||
t.print_width = 100 | ||
t.ignore_files = "vendor/**/*.rb" | ||
end | ||
|
||
SyntaxTree::Rake::WriteTask.new(:write) do |t| | ||
t.source_files = SOURCE_FILES | ||
t.print_width = 100 | ||
end | ||
|
||
task :typeprof do | ||
`typeprof lib/hoardable.rb` | ||
end | ||
|
||
task default: %i[test] | ||
task default: %i[check test] | ||
task pre_commit: %i[write typeprof] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require 'irb' | ||
require_relative '../test/helper' | ||
require "irb" | ||
require_relative "../test/helper" | ||
|
||
IRB.start(__FILE__) |