Skip to content

Commit

Permalink
Get everything up to date (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jane Davis and 12ball committed Dec 22, 2024
1 parent 09e1a6a commit 12c42a5
Show file tree
Hide file tree
Showing 125 changed files with 497 additions and 2,030 deletions.
12 changes: 12 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"major": { "automerge": true },
"minor": { "automerge": true },
"patch": { "automerge": true },
"pin": { "automerge": true },
"pinDigest": { "automerge": true },
"digest": { "automerge": true },
"lockFileMaintenance": { "automerge": true },
"rollback": { "automerge": true },
"replacement": { "automerge": true }
}
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on:
pull_request:
push:
branches:
- main
- release
jobs:
test:
runs-on: ubuntu-latest
name: testing and linting this branch
steps:
- name: check out this repo
uses: actions/checkout@v4
with:
lfs: true
- name: setup ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: lint frontend code
run: |
bun i
bun run biome ci --verbose
- name: lint ruby code
run: |
bundle exec rubocop
- name: run frontend build was run
run: |
bundle exec rake build
- name: check for TODOs
run: |
git ls-files frontend backend | xargs grep -Ii todo | wc -l | xargs ruby -e 'exit ARGV[0].to_i == 0'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
40 changes: 28 additions & 12 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
<%
require "open3"
def gem_exists(gem)
res = Open3.popen3("bundle", "info", "^#{gem}$") do |i, o, e, t|
t.value.success?
end
end
%>
---
inherit_mode:
merge:
- Exclude

require:
- standard
- standard-rails
<%= "- standard-rails" if gem_exists "rails" %>
- standard-custom
- standard-performance
- rubocop-performance
- rubocop-rake
- rubocop-rspec
- rubocop-rails
- rubocop-rspec_rails
- rubocop-capybara
<%= "- rubocop-factory_bot" if gem_exists "factory_bot" %>
<%= "- rubocop-rspec" if gem_exists "rspec-core" %>
<%= "- rubocop-rails" if gem_exists "rails" %>
<%= "- rubocop-rspec_rails" if gem_exists "rails" %>
<%= "- rubocop-capybara" if gem_exists "capybara" %>

inherit_gem:
standard: config/base.yml
standard-rails: config/base.yml
<%= "standard-rails: config/base.yml" if gem_exists "rails" %>
standard-performance: config/base.yml
standard-custom: config/base.yml

Expand All @@ -26,24 +35,30 @@ Layout/LineLength:
Enabled: false
Layout/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
Layout/ExtraSpacing:
Enabled: false
Layout/SpaceBeforeComma:
Enabled: false
Layout/SpaceInsideHashLiteralBraces:
Enabled: false
Style/DisableCopsWithinSourceCodeDirective:
Enabled: true
Rake/Desc:
Enabled: false
<% if gem_exists "rails" %>
Rails/ThreeStateBooleanColumn:
Enabled: false
<% end %>
<% if gem_exists "rspec-core" %>
RSpec/MultipleExpectations:
Enabled: false
RSpec/ExampleLength:
Enabled: false
<% end %>

#
# Ignore differences from Rails autogeneration
#
Layout/SpaceInsideHashLiteralBraces:
Exclude:
- 'config/environments/*'
Layout/ExtraSpacing:
Exclude:
- 'config/environments/*'
Style/GlobalStdStream:
Exclude:
- 'config/environments/*'
Expand Down Expand Up @@ -122,3 +137,4 @@ AllCops:
- 'vendor/**/*'
- '.git/**/*'
- 'db/migrate/*.active_storage.rb'
- 'db/migrate/*.acts_as_taggable_on_engine.rb'
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source "https://rubygems.org"

gem "peppermint", "~> 0.1.13", group: :development
gem "peppermint", "~> 0.1.17", group: :development
105 changes: 42 additions & 63 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.2.1)
activesupport (8.0.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
Expand All @@ -12,117 +13,93 @@ GEM
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
ast (2.4.2)
backport (1.2.0)
base64 (0.2.0)
benchmark (0.3.0)
benchmark (0.4.0)
bigdecimal (3.1.8)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
date (3.4.1)
diff-lcs (1.5.1)
drb (2.2.1)
e2mmap (0.1.0)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
jaro_winkler (1.6.0)
json (2.7.2)
kramdown (2.4.0)
rexml
json (2.9.1)
kramdown (2.5.1)
rexml (>= 3.3.9)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
logger (1.6.0)
logger (1.6.4)
method_source (1.1.0)
minitest (5.25.1)
nokogiri (1.16.7-x86_64-linux)
minitest (5.25.4)
nokogiri (1.17.2-x86_64-linux)
racc (~> 1.4)
parallel (1.26.3)
parser (3.3.4.2)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
peppermint (0.1.13)
peppermint (0.1.17)
pry-byebug (~> 3.10)
rake (~> 13.2)
rdoc (~> 6.7)
rspec (~> 3.13)
rubocop (~> 1.65)
rubocop-capybara (~> 2.21)
rubocop-rails (~> 2.25)
rubocop-rake (~> 0.6)
rubocop-rspec (~> 3.0.4)
rubocop-rspec_rails (~> 2.30)
solargraph (~> 0.50)
standard (~> 1.40)
standard-rails (~> 1.1)
yard (~> 0.9)
standard-rails (~> 1.2)
yard (~> 0.9.37)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
psych (5.1.2)
psych (5.2.2)
date
stringio
racc (1.8.1)
rack (3.1.7)
rack (3.1.8)
rainbow (3.1.1)
rake (13.2.1)
rbs (2.8.4)
rdoc (6.7.0)
rdoc (6.10.0)
psych (>= 4.0.0)
regexp_parser (2.9.2)
regexp_parser (2.9.3)
reverse_markdown (2.1.1)
nokogiri
rexml (3.3.6)
strscan
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.65.1)
rexml (3.4.0)
rubocop (1.69.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.1)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.37.0)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-performance (1.21.1)
rubocop-performance (1.23.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.26.0)
rubocop-rails (2.26.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (3.0.4)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
rubocop-rspec (~> 3, >= 3.0.1)
ruby-progressbar (1.13.0)
securerandom (0.3.1)
securerandom (0.4.1)
solargraph (0.50.0)
backport (~> 1.2)
benchmark
Expand All @@ -139,35 +116,37 @@ GEM
thor (~> 1.0)
tilt (~> 2.0)
yard (~> 0.9, >= 0.9.24)
standard (1.40.0)
standard (1.43.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.65.0)
rubocop (~> 1.69.1)
standard-custom (~> 1.0.0)
standard-performance (~> 1.4)
standard-performance (~> 1.6)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.4.0)
standard-performance (1.6.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.21.0)
rubocop-performance (~> 1.23.0)
standard-rails (1.2.0)
lint_roller (~> 1.0)
rubocop-rails (~> 2.26.0)
stringio (3.1.1)
strscan (3.1.0)
stringio (3.1.2)
thor (1.3.2)
tilt (2.4.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
yard (0.9.36)
unicode-display_width (3.1.2)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.2)
yard (0.9.37)

PLATFORMS
x86_64-linux

DEPENDENCIES
peppermint (~> 0.1.13)
peppermint (~> 0.1.17)

BUNDLED WITH
2.4.10
20 changes: 17 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,28 @@ task :build_npm do
sh "mkdir", "-pv", File.join("dist", i)
sh "bun", "i", "--cwd", File.join(__dir__, i)
sh "bun", "run", "--cwd", File.join(__dir__, i), "build"
sh "rsync", "-rv", "--delete", File.join(__dir__, i, "dist") + "/", File.join(__dir__, "dist", i) + "/"
end
sh "rsync", "-rv", "--delete", File.join(__dir__, "freebee", "api") + "/", File.join(__dir__, "dist", "freebee", "api") + "/"
end

task :compress do
Dir.glob(File.join(__dir__, "dist") + "**/*") do |path|
next if File.directory?(path)
next if /.*\.(gz|zst)$/.match?(path)
sh "gzip", "-fk", path
sh "zstd", "-fk", path
if File.size(path) <= File.size(path + ".gz")
File.delete(path + ".gz")
end
if File.size(path) <= File.size(path + ".zst")
File.delete(path + ".zst")
end
end
end

desc "build markdown writeups"
task :build_md do
sh File.join(__dir__, "writeups", "compile")
sh "bash", File.join(__dir__, "writeups", "compile")
end

desc "copy static files to dist"
Expand All @@ -24,7 +38,7 @@ task :cp_static do
end

desc "build project to ./dist"
task build: %i[build_npm build_md cp_static]
task build: %i[build_npm build_md cp_static compress]

desc "deploy the static web server (dry run)"
task :deploy_test do
Expand Down
Loading

0 comments on commit 12c42a5

Please sign in to comment.