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
67 changes: 42 additions & 25 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
inherit_from: .rubocop_todo.yml

inherit_mode:
merge:
- Exclude
- Include

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

plugins:
- rubocop-sorbet
- rubocop-performance
- rubocop-gusto

AllCops:
TargetRubyVersion: 3.3
Expand All @@ -10,78 +20,85 @@ AllCops:
- bin/**/*
- vendor/**/*

Sorbet/StrictSigil:
Gemspec/RequireMFA:
Enabled: false

Layout/ExtraSpacing:
Enabled: true
Exclude:
- danger-packwerk.gemspec

Layout/LineLength:
Enabled: false

Layout/SpaceAroundOperators:
Enabled: true
Exclude:
- danger-packwerk.gemspec

Sorbet/ValidSigil:
Enabled: true

Gemspec/RequireMFA:
Lint/UnusedMethodArgument:
Enabled: false

Layout/LineLength:
Metrics/AbcSize:
Enabled: false

Metrics/BlockLength:
Enabled: false

Style/Documentation:
Metrics/ClassLength:
Enabled: false

Style/SignalException:
Metrics/CyclomaticComplexity:
Enabled: false

Style/MultilineBlockChain:
Metrics/MethodLength:
Enabled: false

Metrics/MethodLength:
Metrics/ModuleLength:
Enabled: false

Metrics/CyclomaticComplexity:
Metrics/ParameterLists:
Enabled: false

Metrics/ModuleLength:
Metrics/PerceivedComplexity:
Enabled: false

Metrics/ClassLength:
Naming/BlockForwarding:
Enabled: false

RSpec/NotToNot:
Enabled: true

Sorbet/FalseSigil:
Enabled: false

Lint/UnusedMethodArgument:
Sorbet/StrictSigil:
Enabled: false

Metrics/AbcSize:
Enabled: false
Sorbet/ValidSigil:
Enabled: true

Style/GuardClause:
Style/ArgumentsForwarding:
Enabled: false

Style/NumericPredicate:
Style/Documentation:
Enabled: false

Metrics/PerceivedComplexity:
Style/GuardClause:
Enabled: false

Metrics/ParameterLists:
Style/MultilineBlockChain:
Enabled: false

Style/SuperArguments:
Style/NumericPredicate:
Enabled: false

Style/ArgumentsForwarding:
Style/SignalException:
Enabled: false

Naming/BlockForwarding:
Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes

Style/SuperArguments:
Enabled: false
37 changes: 37 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 10000`
# on 2026-11-30 21:02:31 UTC using RuboCop version 1.92.1.
# 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: 1
Gusto/NoMetaprogramming:
Exclude:
- 'lib/chatwerk/views/base_view.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Gusto/RegexpBypass:
Exclude:
- 'lib/chatwerk/helpers.rb'

# Offense count: 22
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/VerifiedDoubleReference:
Exclude:
- 'spec/chatwerk/api_spec.rb'
- 'spec/chatwerk/error_spec.rb'
- 'spec/chatwerk/helpers_spec.rb'
- 'spec/chatwerk/views/no_violations_view_spec.rb'
- 'spec/chatwerk/views/package_view_spec.rb'
- 'spec/chatwerk/views/packages_view_spec.rb'
- 'spec/chatwerk/views/violations_details_view_spec.rb'
- 'spec/chatwerk/views/violations_list_view_spec.rb'

# Offense count: 1
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
RSpec/VerifiedDoubles:
Exclude:
- 'spec/chatwerk/mcp_tools_spec.rb'
17 changes: 9 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# frozen_string_literal: true

source 'https://rubygems.org'
source "https://rubygems.org"

# Specify your gem's dependencies in chatwerk.gemspec
gemspec

gem 'irb'
gem 'rake', '~> 13.4'
gem "irb"
gem "rake", "~> 13.4"

gem 'rspec', '~> 3.13'
gem "rspec", "~> 3.13"

gem 'rubocop', '~> 1.92'
gem 'rubocop-performance'
gem 'rubocop-sorbet'
gem 'sorbet', '~> 0.6'
gem "rubocop", "~> 1.92"
gem "rubocop-gusto", require: false
gem "rubocop-performance"
gem "rubocop-sorbet"
gem "sorbet", "~> 0.6"
21 changes: 21 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ GEM
smart_properties
bigdecimal (4.1.3)
builder (3.3.0)
code_teams (1.3.1)
sorbet-runtime
coderay (1.1.3)
concurrent-ruby (1.3.8)
connection_pool (3.0.2)
Expand Down Expand Up @@ -181,10 +183,26 @@ GEM
rubocop-ast (1.50.0)
parser (>= 3.3.7.2)
prism (~> 1.7)
rubocop-gusto (11.12.0)
code_teams
lint_roller
rubocop (>= 1.76)
rubocop-performance
rubocop-rake
rubocop-rspec
rubocop-sorbet (>= 0.13.0)
smart_todo
thor
rubocop-performance (1.27.0)
lint_roller (~> 1.1)
rubocop (>= 1.89.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.11.0)
lint_roller (~> 1.1)
rubocop (~> 1.92)
rubocop-sorbet (0.17.2)
rbi (~> 0.4, >= 0.4.3)
rbs (>= 4.1.1)
Expand All @@ -193,6 +211,8 @@ GEM
securerandom (0.4.1)
simpleidn (0.3.0)
smart_properties (1.17.0)
smart_todo (1.11.0)
prism (~> 1.0)
sorbet (0.6.13593)
sorbet-static (= 0.6.13593)
sorbet-runtime (0.6.13593)
Expand Down Expand Up @@ -238,6 +258,7 @@ DEPENDENCIES
rake (~> 13.4)
rspec (~> 3.13)
rubocop (~> 1.92)
rubocop-gusto
rubocop-performance
rubocop-sorbet
sorbet (~> 0.6)
Expand Down
8 changes: 4 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 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)

require 'rubocop/rake_task'
require "rubocop/rake_task"

RuboCop::RakeTask.new

task default: %i[spec rubocop]
task default: %i(spec rubocop)
46 changes: 23 additions & 23 deletions chatwerk.gemspec
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# frozen_string_literal: true

require_relative 'lib/chatwerk/version'
require_relative "lib/chatwerk/version"

Gem::Specification.new do |spec|
spec.name = 'chatwerk'
spec.name = "chatwerk"
spec.version = Chatwerk::VERSION
spec.authors = ['Gusto Engineering']
spec.email = ['[email protected]']
spec.authors = ["Gusto Engineering"]
spec.email = ["[email protected]"]

spec.summary = 'Chatwerk: AI integration for Packwerk'
spec.description = 'MCP server and API for integrating Packwerk with AI tools like Cursor.'
spec.homepage = 'https://github.com/rubyatscale/chatwerk'
spec.license = 'MIT'
spec.required_ruby_version = '>= 3.3'
spec.summary = "Chatwerk: AI integration for Packwerk"
spec.description = "MCP server and API for integrating Packwerk with AI tools like Cursor."
spec.homepage = "https://github.com/rubyatscale/chatwerk"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.3"

spec.metadata['allowed_push_host'] = 'https://rubygems.org'
spec.metadata["allowed_push_host"] = "https://rubygems.org"

spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = 'https://github.com/rubyatscale/chatwerk'
spec.metadata['changelog_uri'] = 'https://github.com/rubyatscale/chatwerk/blob/main/CHANGELOG.md'
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/rubyatscale/chatwerk"
spec.metadata["changelog_uri"] = "https://github.com/rubyatscale/chatwerk/blob/main/CHANGELOG.md"

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
gemspec = File.basename(__FILE__)
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
spec.files = IO.popen(%w(git ls-files -z), chdir: __dir__, err: IO::NULL) do |ls|
ls.readlines("\x0", chomp: true).reject do |f|
(f == gemspec) ||
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile])
f.start_with?(*%w(bin/ test/ spec/ features/ .git .github appveyor Gemfile))
end
end
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']
spec.bindir = "exe"
spec.executables = spec.files.grep(%r(\Aexe/)) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency 'mcp'
spec.add_dependency 'query_packwerk', '~> 0.1'
spec.add_dependency 'sorbet-runtime'
spec.add_dependency 'thor'
spec.add_dependency 'zeitwerk'
spec.add_dependency "mcp"
spec.add_dependency "query_packwerk", "~> 0.1"
spec.add_dependency "sorbet-runtime"
spec.add_dependency "thor"
spec.add_dependency "zeitwerk"
end
3 changes: 2 additions & 1 deletion config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# typed: false
# frozen_string_literal: true

require 'chatwerk'
require "chatwerk"
run Chatwerk::MCPServer.new
2 changes: 1 addition & 1 deletion exe/chatwerk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'chatwerk'
require "chatwerk"

Chatwerk::Cli.start(ARGV)
8 changes: 4 additions & 4 deletions lib/chatwerk.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# typed: strict
# frozen_string_literal: true

require 'zeitwerk'
require 'query_packwerk'
require 'sorbet-runtime'
require 'chatwerk/version'
require "zeitwerk"
require "query_packwerk"
require "sorbet-runtime"
require "chatwerk/version"

loader = Zeitwerk::Loader.for_gem
loader.setup
Expand Down
Loading