Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 12 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,17 @@ on:
pull_request:

jobs:
rspec:
call-workflow-from-shared-config:
uses: rubyatscale/shared-config/.github/workflows/ci.yml@main
secrets: inherit
rubyfmt:
name: "Rubyfmt"
runs-on: ubuntu-latest
strategy:
matrix:
ruby:
- '3.3'
- '3.4'
- '4.0'
env:
BUNDLE_GEMFILE: Gemfile
name: "RSpec tests: Ruby ${{ matrix.ruby }}"
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby }}
- name: Run tests
run: bundle exec rspec
static_type_check:
name: "Type Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: '4.0'
- name: Run static type checks
run: bundle exec srb tc
- uses: actions/checkout@v7
- name: Install rubyfmt
run: |
curl -sL "https://github.com/fables-tales/rubyfmt/releases/download/v0.14.1/rubyfmt-v0.14.1-Linux-x86_64.tar.gz" | tar xz
sudo install -m 755 tmp/releases/v0.14.1-Linux/rubyfmt /usr/local/bin/rubyfmt
- name: Check formatting
run: rubyfmt --check lib/ spec/ Rakefile pack_stats.gemspec Gemfile
39 changes: 39 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
inherit_from: .rubocop_todo.yml

inherit_mode:
merge:
- Exclude
- Include

inherit_gem:
rubocop-gusto:
- config/default.yml

plugins:
- rubocop-gusto
- rubocop-rubyfmt

# The behavior of RuboCop can be controlled via the .rubocop.yml
# configuration file. It makes it possible to enable/disable
# certain cops (checks) and to alter their behavior if they accept
# any parameters. The file can be placed either in your home
# directory or in some project directory.
#
# RuboCop will start looking for the configuration file in the directory
# where the inspected file is and continue its way up to the root directory.
#
# See https://docs.rubocop.org/rubocop/configuration
AllCops:
NewCops: enable
SuggestExtensions: false
Exclude:
- bin/**/*
- sorbet/tapioca/**/*
- vendor/bundle/**/**
TargetRubyVersion: 3.3

RSpec/NotToNot:
Enabled: true

Style/BlockDelimiters:
Enabled: true
38 changes: 38 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2026-07-23 21:55:51 UTC using RuboCop version 1.88.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 8
# Configuration parameters: EnforcedStyle, AllowedGems.
# SupportedStyles: Gemfile, gems.rb, gemspec
Gemspec/DevelopmentDependencies:
Exclude:
- 'pack_stats.gemspec'

# Offense count: 2
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'spec/pack_stats/pack_stats_spec.rb'

# Offense count: 1
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
Metrics/ParameterLists:
Max: 8

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SuggestedStrictness.
Sorbet/StrictSigil:
Exclude:
- 'spec/spec_helper.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/CombinableLoops:
Exclude:
- 'lib/pack_stats/private/metrics/dependencies.rb'
2 changes: 2 additions & 0 deletions .rubyfmtignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin/**
sorbet/tapioca/**
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source 'https://rubygems.org'
# frozen_string_literal: true
source "https://rubygems.org"

# Specify your gem's dependencies in pack_stats.gemspec
gemspec
82 changes: 53 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,14 @@ GEM
code_teams (~> 1.0)
packs-specification
sorbet-runtime (>= 0.6.12763)
code_ownership (2.1.3-x86_64-darwin)
code_teams (~> 1.0)
packs-specification
sorbet-runtime (>= 0.6.12763)
code_ownership (2.1.3-x86_64-linux)
code_teams (~> 1.0)
packs-specification
sorbet-runtime (>= 0.6.12763)
code_teams (1.3.0)
sorbet-runtime
coderay (1.1.3)
concurrent-ruby (1.3.7)
concurrent-ruby (1.3.8)
connection_pool (3.0.2)
constant_resolver (0.3.0)
crass (1.0.7)
Expand All @@ -71,8 +67,8 @@ GEM
i18n (1.15.2)
concurrent-ruby (~> 1.0)
io-console (0.8.2)
json (2.20.0)
language_server-protocol (3.17.0.5)
json (2.21.1)
language_server-protocol (3.17.0.6)
lint_roller (1.1.0)
logger (1.7.0)
loofah (2.25.2)
Expand All @@ -82,7 +78,7 @@ GEM
minitest (6.0.6)
drb (~> 2.0)
prism (~> 1.5)
multi_json (1.15.0)
multi_json (1.21.1)
netrc (0.11.0)
nokogiri (1.19.4-arm64-darwin)
racc (~> 1.4)
Expand Down Expand Up @@ -117,7 +113,7 @@ GEM
parse_packwerk (0.27.0)
bigdecimal
sorbet-runtime
parser (3.3.11.1)
parser (3.3.12.0)
ast (~> 2.4.1)
racc
pastel (0.8.0)
Expand All @@ -137,7 +133,7 @@ GEM
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rainbow (3.1.1)
rake (13.4.2)
rbi (0.3.14)
rbi (0.4.0)
prism (~> 1.0)
rbs (>= 4.0.1)
rbs (4.0.3)
Expand All @@ -147,7 +143,7 @@ GEM
regexp_parser (2.12.0)
reline (0.6.3)
io-console (~> 0.5)
require-hooks (0.4.0)
require-hooks (0.4.1)
rexml (3.4.4)
rspec (3.13.2)
rspec-core (~> 3.13.0)
Expand All @@ -162,7 +158,7 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.7)
rubocop (1.88.0)
rubocop (1.88.2)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
Expand All @@ -173,9 +169,19 @@ GEM
rubocop-ast (>= 1.49.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.49.1)
rubocop-ast (1.50.0)
parser (>= 3.3.7.2)
prism (~> 1.7)
rubocop-gusto (11.3.0)
code_teams
lint_roller
rubocop (>= 1.76)
rubocop-performance
rubocop-rake
rubocop-rspec
rubocop-sorbet
smart_todo
thor
rubocop-packs (0.0.45)
activesupport
base64
Expand All @@ -185,27 +191,43 @@ GEM
rubocop (~> 1.0)
rubocop-sorbet (>= 0.8.4)
sorbet-runtime
rubocop-sorbet (0.12.0)
rubocop-performance (1.26.1)
lint_roller (~> 1.1)
rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.47.1, < 2.0)
rubocop-rake (0.7.1)
lint_roller (~> 1.1)
rubocop (>= 1.72.1)
rubocop-rspec (3.10.2)
lint_roller (~> 1.1)
regexp_parser (>= 2.0)
rubocop (~> 1.86, >= 1.86.2)
rubocop-rubyfmt (0.1.1)
lint_roller (~> 1.1)
rubocop (>= 1.72.2)
rubocop-sorbet (0.13.2)
lint_roller
rubocop (>= 1.75.2)
ruby-progressbar (1.13.0)
rubydex (0.2.6-arm64-darwin)
rubydex (0.2.6-x86_64-darwin)
rubydex (0.2.6-x86_64-linux)
rubydex (0.3.0-arm64-darwin)
rubydex (0.3.0-x86_64-darwin)
rubydex (0.3.0-x86_64-linux)
securerandom (0.4.1)
smart_properties (1.17.0)
sorbet (0.6.13321)
sorbet-static (= 0.6.13321)
sorbet-runtime (0.6.13321)
sorbet-static (0.6.13321-universal-darwin)
sorbet-static (0.6.13321-x86_64-linux)
sorbet-static-and-runtime (0.6.13321)
sorbet (= 0.6.13321)
sorbet-runtime (= 0.6.13321)
spoom (1.8.2)
smart_todo (1.11.0)
prism (~> 1.0)
sorbet (0.6.13354)
sorbet-static (= 0.6.13354)
sorbet-runtime (0.6.13354)
sorbet-static (0.6.13354-universal-darwin)
sorbet-static (0.6.13354-x86_64-linux)
sorbet-static-and-runtime (0.6.13354)
sorbet (= 0.6.13354)
sorbet-runtime (= 0.6.13354)
spoom (1.8.4)
erubi (>= 1.10.0)
prism (>= 0.28.0)
rbi (>= 0.3.14)
rbi (>= 0.3.15)
rbs (>= 4.0.0.dev.5)
rexml (>= 3.2.6)
sorbet-static-and-runtime (>= 0.5.10187)
Expand Down Expand Up @@ -252,9 +274,11 @@ DEPENDENCIES
pack_stats!
pry
rake
rspec (~> 3.0)
rspec
rubocop-gusto
rubocop-rubyfmt
sorbet
tapioca

BUNDLED WITH
4.0.15
4.0.15
7 changes: 4 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# typed: ignore
# frozen_string_literal: true

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require "bundler/gem_tasks"
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec)

task default: :spec
task(default: :spec)
15 changes: 1 addition & 14 deletions bin/tapioca
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,7 @@
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

require "rubygems"
require "bundler/setup"
Expand Down
Loading