calltally 0.3.0 → 0.3.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: 7bbb05d3dd40bb7ec180388541a0d0290023f2a152834f8246c98f285dcf40b9
4
- data.tar.gz: 363208eb22a5a347963ce4accb45ce85744f2e10507a74071d450f5af44d9a51
3
+ metadata.gz: e11a68e7aacf3dee7cd49cab3de7ce4a10084d7b0dc41486fc02a5a4207a2b7a
4
+ data.tar.gz: 6cae950a7bcff1752cef383f4bcf3267f31638cf892916c62ccb3aecbf493e85
5
5
  SHA512:
6
- metadata.gz: 1c4797bf33d18a63b4230887986df0a917785f5d0064053f91bb9702089230de430ceeef0224fbd5a7178bd2b4f610c75b8ea336f823e8dd5cda82a34e070726
7
- data.tar.gz: 015abe2bf689816f2c81951797fac0da9cefb1eebf51f0ed80990b76ff02f21453c1b508e4039524aeba2d22949b612006915ec4d3e6e20786e1119192aa1129
6
+ metadata.gz: f39e6db2a6b417b77b9890108b1523aa070a4e5e6ebd3594f54ff1c70aad8812163711d137666e59ee9da5ad22676c43600698932b7b79afabefa6768f289723
7
+ data.tar.gz: 3a79710e49e5fbb8756b0c1bda47936fa94eb2ce79aceff2e6f0978db40c156a88549a3279d8fd347ad263a4ee35ca583094789e700d40ef7596862855636750
data/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.2] - 2025-10-14
11
+
12
+ ### Fixed
13
+ - Fixed Rails profile detection to check gem declaration instead of string contains
14
+
15
+ ## [0.3.1] - 2025-10-10
16
+
17
+ ### Fixed
18
+ - Fixed `--exclude` option not properly excluding root-level directories (e.g., `spec/`, `test/`)
19
+ - Simplified exclude pattern matching logic for better reliability
20
+
21
+ ### Changed
22
+ - Removed `test` and `spec` from default exclude list to enable test code analysis
23
+ - Test and spec directories are now scanned by default (can still be excluded with `-x test,spec`)
24
+
10
25
  ## [0.3.0] - 2025-09-20
11
26
 
12
27
  ### Added
@@ -8,7 +8,7 @@ module Calltally
8
8
  DEFAULTS = {
9
9
  "profile" => "auto", # auto|rails|default
10
10
  "dirs" => %w[.],
11
- "exclude" => %w[spec test vendor node_modules tmp log .git .bundle],
11
+ "exclude" => %w[vendor node_modules tmp log .git .bundle],
12
12
  "top" => 100,
13
13
  "verbose" => false,
14
14
  "mode" => "pairs", # pairs|methods|receivers
@@ -51,7 +51,7 @@ module Calltally
51
51
  return desired unless desired == "auto"
52
52
 
53
53
  gemfile_path = File.join(base_dir, "Gemfile")
54
- if File.file?(gemfile_path) && File.read(gemfile_path).include?("rails")
54
+ if File.file?(gemfile_path) && File.read(gemfile_path).match?(/^\s*gem\s+["']rails["']/)
55
55
  "rails"
56
56
  else
57
57
  "default"
@@ -84,7 +84,9 @@ module Calltally
84
84
 
85
85
  def excluded?(path)
86
86
  rel = path.sub(@base_dir + "/", "")
87
- @config["exclude"].any? { |ex| rel.include?("/#{ex}/") || File.basename(rel).start_with?("#{ex}.") }
87
+ @config["exclude"].any? do |ex|
88
+ rel == ex || rel.start_with?("#{ex}/", "#{ex}.") || rel.include?("/#{ex}/")
89
+ end
88
90
  end
89
91
 
90
92
  def read_source(path)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Calltally
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calltally
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naoki Nishiguchi