-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from artichoke/rakefile-devtools
Add Rakefile and devtools
- Loading branch information
Showing
8 changed files
with
162 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: bundler | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
open-pull-requests-limit: 10 | ||
assignees: | ||
- lopopolo | ||
labels: | ||
- A-deps |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"ignorePatterns": [ | ||
{ | ||
"pattern": "img.shields.io" | ||
} | ||
], | ||
"replacementPatterns": [], | ||
"httpHeaders": [ | ||
{ | ||
"urls": ["https://crates.io"], | ||
"headers": { | ||
"Accept": "text/html" | ||
} | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
require: rubocop-rake | ||
AllCops: | ||
NewCops: enable | ||
TargetRubyVersion: 2.6 | ||
DisplayCopNames: true | ||
Exclude: | ||
- "**/node_modules/**/*" | ||
- "**/target/**/*" | ||
- "**/vendor/**/*" | ||
Layout/EndOfLine: | ||
EnforcedStyle: lf | ||
Layout/LineLength: | ||
Enabled: true | ||
Exclude: | ||
- "**/Rakefile" | ||
Metrics: | ||
Enabled: false | ||
Style/Documentation: | ||
Enabled: false |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0.2 |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
gem 'rake', '>= 12.3.3', require: false | ||
gem 'rubocop', '~> 1.18', require: false | ||
gem 'rubocop-rake', '~> 0.6', require: false |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
ast (2.4.2) | ||
parallel (1.20.1) | ||
parser (3.0.2.0) | ||
ast (~> 2.4.1) | ||
rainbow (3.0.0) | ||
rake (13.0.6) | ||
regexp_parser (2.1.1) | ||
rexml (3.2.5) | ||
rubocop (1.18.4) | ||
parallel (~> 1.10) | ||
parser (>= 3.0.0.0) | ||
rainbow (>= 2.2.2, < 4.0) | ||
regexp_parser (>= 1.8, < 3.0) | ||
rexml | ||
rubocop-ast (>= 1.8.0, < 2.0) | ||
ruby-progressbar (~> 1.7) | ||
unicode-display_width (>= 1.4.0, < 3.0) | ||
rubocop-ast (1.8.0) | ||
parser (>= 3.0.1.1) | ||
rubocop-rake (0.6.0) | ||
rubocop (~> 1.0) | ||
ruby-progressbar (1.11.0) | ||
unicode-display_width (2.0.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
rake (>= 12.3.3) | ||
rubocop (~> 1.18) | ||
rubocop-rake (~> 0.6) | ||
|
||
BUNDLED WITH | ||
2.0.2 |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'open-uri' | ||
require 'shellwords' | ||
require 'rubocop/rake_task' | ||
|
||
task default: %i[format lint] | ||
|
||
desc 'Lint sources' | ||
task lint: %i[lint:rubocop:auto_correct] | ||
|
||
namespace :lint do | ||
RuboCop::RakeTask.new(:rubocop) | ||
end | ||
|
||
desc 'Format sources' | ||
task format: %i[format:text] | ||
|
||
namespace :format do | ||
desc 'Format text, YAML, and Markdown sources with prettier' | ||
task :text do | ||
sh 'npx prettier --write "**/*"' | ||
end | ||
end | ||
|
||
desc 'Format sources' | ||
task fmt: %i[fmt:text] | ||
|
||
namespace :fmt do | ||
desc 'Format text, YAML, and Markdown sources with prettier' | ||
task :text do | ||
sh 'npx prettier --write "**/*"' | ||
end | ||
end | ||
|
||
namespace :release do | ||
link_check_files = FileList.new('**/*.md') do |f| | ||
f.exclude('node_modules/**/*') | ||
f.exclude('**/target/**/*') | ||
f.exclude('**/vendor/**/*') | ||
f.include('*.md') | ||
f.include('**/vendor/*.md') | ||
end | ||
|
||
link_check_files.sort.uniq.each do |markdown| | ||
desc 'Check for broken links in markdown files' | ||
task markdown_link_check: markdown do | ||
command = ['npx', 'markdown-link-check', '--config', '.github/markdown-link-check.json', markdown] | ||
sh command.shelljoin | ||
sleep(rand(1..5)) | ||
end | ||
end | ||
end |