-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
25 lines (18 loc) · 713 Bytes
/
Rakefile
File metadata and controls
25 lines (18 loc) · 713 Bytes
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
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
require "standard/rake"
require "code_picture"
task default: %i[spec standard]
task :check_missing_token_types do
require "yaml"
require "net/http"
prism_config_url = "https://raw.githubusercontent.com/ruby/prism/a590c031130ab024488177fa7ccf18c970dce20d/config.yml"
all_tokens = YAML.load(Net::HTTP.get(URI(prism_config_url)))["tokens"].map { _1["name"].to_sym }
current_tokens = CodePicture::Theme.one_dark_pro.colors.keys
missing_tokens = (all_tokens - current_tokens) - CodePicture::IGNORED_TOKENS
if missing_tokens.any?
abort missing_tokens.join("\n")
end
end