qualmzy 0.1.0 → 0.1.1

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: e5713a5989edba9528033bc543711354308b232fa92156a82e9032ef5671feab
4
+ data.tar.gz: 2005ed282e4889f193e146f7873d8f35605fe55f6aa6688581c16477e477707f
5
5
  SHA512:
6
- metadata.gz: c6466d0b2cd7261ea59cd43924818503ebdc4aa95b06ec6a444f494b07ff660ebe16a7c59f26346d73b02b0ac38db8675c3a4b06cf7b4033f4e61eb5e48239d2
7
- data.tar.gz: ebde319d805d78e06f8844732311ba0c735313416c96e8bb41517a20232e23ec612159e292f75773ea43082b326a69ffb431b6d747d93fcc860358b7dd0e7625
6
+ metadata.gz: 5f31a92b05ddd3548033d755dabfb93a7cdd1ce31d7d0459e45ed40cf97dfc7f8cd0eeb8e122d71d8aebd6ddc8265b20a7f24e818b3870c27b0abf66601c42f9
7
+ data.tar.gz: 5f75db7c211f29353ef1a16c827a2f85bf1e3b6e4f29f0e6ca6f103e847b859dd0ead0651d18deb155d2a8f5b05e0446e038f5fc5756c6704af77a4fb134e948
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
@@ -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.1"
5
5
  end
metadata CHANGED
@@ -1,18 +1,16 @@
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - qualmzy contributors
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2026-11-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: 'Pure Ruby port of Qualm: judge changed files and fail when a reviewer
14
13
  would ask for simplification.'
15
- email:
16
14
  executables:
17
15
  - qualmzy
18
16
  extensions: []
@@ -37,7 +35,6 @@ licenses:
37
35
  - MIT
38
36
  metadata:
39
37
  source_code_uri: https://github.com/tools4imps/qualm
40
- post_install_message:
41
38
  rdoc_options: []
42
39
  require_paths:
43
40
  - lib
@@ -52,8 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
49
  - !ruby/object:Gem::Version
53
50
  version: '0'
54
51
  requirements: []
55
- rubygems_version: 3.0.3.1
56
- signing_key:
52
+ rubygems_version: 4.0.21
57
53
  specification_version: 4
58
54
  summary: A subjective pull-request gate powered by Jev
59
55
  test_files: []