qualmzy 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a23def0cbff72b5a2ea8649909fde7ca50d37aa5bb61236a79777df8b9793198
4
- data.tar.gz: 9df930a73874a5d80592dc838d090cc74fa904b3155115634a09222dc9010c1c
3
+ metadata.gz: c136f70693c4056dbb352a227193f29dbf5a89c9b41a506b7e74b8d1e2427b70
4
+ data.tar.gz: 76b353a62e3cf05b35fb51ff7d0f4538ebba9e80e667422bd247de995486691e
5
5
  SHA512:
6
- metadata.gz: c6466d0b2cd7261ea59cd43924818503ebdc4aa95b06ec6a444f494b07ff660ebe16a7c59f26346d73b02b0ac38db8675c3a4b06cf7b4033f4e61eb5e48239d2
7
- data.tar.gz: ebde319d805d78e06f8844732311ba0c735313416c96e8bb41517a20232e23ec612159e292f75773ea43082b326a69ffb431b6d747d93fcc860358b7dd0e7625
6
+ metadata.gz: 4620ad693fd1ffb80817470b538af39defad1846dcb0dd6c6f010d188ea3bb85d1ab0cc114b1bac3e7aa74c7751d866480be3ec9e13dd7804e402ef0142e93a8
7
+ data.tar.gz: f6698991577d6b75dd1cf1715df35cc7a2a719adb64d4422320d7ecb020077211766d45d5fb4165bf64af311cbd043415c261c32cdd599ac702d3b24650a246d
data/README.md CHANGED
@@ -25,7 +25,7 @@ qualmzy keep lib/example.rb --reason "The algorithm is intentionally complex"
25
25
  qualmzy init --rails
26
26
  ```
27
27
 
28
- Supported flags are `--base`, `--threshold`, `--include-tests`, `--format`, `--cache`, `--no-cache`, `--budget`, `--jobs`, and `--dry-run`. `qualmzy init` creates a safe, empty `qualm.json`; `qualmzy init --rails` writes explicit Rails exclusions into `skip`, including schema dumps, migrations, built assets, runtime directories, and `*.key` files. The optional `qualm.json` also accepts `skip` for repository-specific patterns, plus `gate`, `drop`, `questions`, `model`, and `keeps`.
28
+ Supported flags are `--base`, `--threshold`, `--include-tests`, `--format`, `--cache`, `--no-cache`, `--budget`, `--jobs`, and `--dry-run`. `qualmzy init` creates a safe, empty `qualm.json`; `qualmzy init --rails` writes explicit Rails exclusions into `skip`, including schema dumps, migrations, built assets, runtime directories, and `*.key` and `*.gem` files. The optional `qualm.json` also accepts `skip` for repository-specific patterns, plus `gate`, `drop`, `questions`, `model`, and `keeps`.
29
29
 
30
30
  The API endpoint is `https://openrouter.ai/api/alpha/decisions`; only the unified diff for each judged file is sent.
31
31
 
@@ -26,7 +26,8 @@ module Qualmzy
26
26
  base, changes = git.base(@base_ref), nil
27
27
  changes = git.changes(base, @paths)
28
28
  rules = SkipRules.new(extra: config.skip, include_tests: @include_tests)
29
- diffs, files = {}, changes.map do |change|
29
+ diffs = {}
30
+ files = changes.map do |change|
30
31
  if (reason = rules.reason(change.path))
31
32
  { path: change.path, status: "skipped", reason: reason }
32
33
  else
@@ -90,7 +90,7 @@ module Qualmzy
90
90
  CommandResult.new(stdout, status.success?)
91
91
  end
92
92
  def resolve(ref)
93
- result = git("rev-parse", "--verify", "--quiet", "--end-of-options", "#{ref}^{commit}", allow: [128])
93
+ result = git("rev-parse", "--verify", "--quiet", "--end-of-options", "#{ref}^{commit}", allow: [1, 128])
94
94
  result.success? ? result.stdout.strip : nil
95
95
  end
96
96
  def parse_tracked(base)
@@ -9,15 +9,17 @@ module Qualmzy
9
9
  def text(result)
10
10
  judged = result.files.select { |file| file[:status] == "judged" }
11
11
  failed = judged.select { |file| file[:failed]&.any? }
12
- out = if judged.empty?
13
- "qualmzy: nothing to judge.\n"
14
- elsif result.dry_run
15
- "qualmzy: dry run, nothing sent.\n"
16
- elsif failed.empty?
17
- "qualmzy: #{count(judged.length, "changed file")}, no qualms.\n"
18
- else
19
- "qualmzy: #{failed.length} of #{count(judged.length, "changed file")} drew a qualm.\n"
20
- end
12
+ out = String.new(
13
+ if judged.empty?
14
+ "qualmzy: nothing to judge.\n"
15
+ elsif result.dry_run
16
+ "qualmzy: dry run, nothing sent.\n"
17
+ elsif failed.empty?
18
+ "qualmzy: #{count(judged.length, "changed file")}, no qualms.\n"
19
+ else
20
+ "qualmzy: #{failed.length} of #{count(judged.length, "changed file")} drew a qualm.\n"
21
+ end
22
+ )
21
23
  skipped = result.files.select { |file| file[:status] == "skipped" }
22
24
  unless skipped.empty?
23
25
  reasons = skipped.group_by { |file| file[:reason] }.sort_by { |reason, files| [-files.length, reason] }.map { |reason, files| "#{files.length} #{reason}" }
@@ -16,7 +16,8 @@ module Qualmzy
16
16
  "tmp/",
17
17
  "log/",
18
18
  "storage/",
19
- "*.key"
19
+ "*.key",
20
+ "*.gem"
20
21
  ].freeze
21
22
 
22
23
  def initialize(extra: [], include_tests: false)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Qualmzy
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qualmzy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - qualmzy contributors
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-09 00:00:00.000000000 Z
11
+ date: 2026-11-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Pure Ruby port of Qualm: judge changed files and fail when a reviewer
14
14
  would ask for simplification.'