-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
44 lines (33 loc) · 971 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
require "rubocop/rake_task"
RuboCop::RakeTask.new
task default: %i[spec rubocop]
require_relative "data/importer"
require_relative "data/exporter"
namespace :jplocalgov do
namespace :data do
desc "Updates local_government_code data"
task :update_all do
puts "Reset temp DB..."
importer = JpLocalGov::Data::Importer.new
importer.reset_table
puts "Retrieving local government data..."
importer.retrieve_and_save
puts "Extract to json files..."
JpLocalGov::Data::Exporter.new.execute
end
end
end
namespace :steep do
desc "Run type-check by Steep"
task :check do
sh "bundle", "exec", "steep", "check", "--log-level=fatal"
end
desc "Show the Steep coverage report"
task :stats do
sh "bundle", "exec", "steep", "stats", "--log-level=fatal", "--format=table"
end
end