rails_code_auditor 0.1.1 → 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: 598189dda2fba4a0b37869531aae8cb254a7effbcdff35b5be9638892c79eafb
4
- data.tar.gz: d90fc145ba60a605012b332a8c74a2400ba7607f0278387ec74eed58a0211677
3
+ metadata.gz: 02d182284c325102a56357851f1bf841c265b33d601c7af29726be9c1d3d80e0
4
+ data.tar.gz: 30afb60183c7b4fbc029b0b3341afac7c7a857364906caebe29d4a1e359f6773
5
5
  SHA512:
6
- metadata.gz: 506c2a77006ff53ac87a5e58e86d322f79323d10f5a0714d1c0a9a75fa3b27ec32082894af8bd314146be709a464cce296558c5b01e3496100fc862fd2f5938e
7
- data.tar.gz: 97a84b00a918e79e7a7ec9ab4e5b1c6100b6f1c719267649120b13ce9d4c3279d6b119cc5f91c3da7ced0cb4832309efbe987ed20b13f76fd8f74d9047c93b90
6
+ metadata.gz: a5c24bea5bf8a7b816eac7fc88b1d0b38bbb29fe69e0d5a02d9534b96a75b714f15df4ba65fba100c24d112267fee13b25ed13b3eaa096bf59d31ef8f028da72
7
+ data.tar.gz: 97c13bb474926f97522e39c43fb2f9bf8578d163cef77a697f0c43331fe311f314d207cec80d11ee606f88c073d45a0cc211f1b2cd3f1735fae9ba139b2d40a5
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsCodeAuditor
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
@@ -19,6 +19,8 @@ module RailsCodeAuditor
19
19
  use_llm = args.include?("--use-llm")
20
20
  model_arg = args[args.index("--llm-model") + 1] if args.include?("--llm-model")
21
21
  endpoint_arg = args[args.index("--llm-endpoint") + 1] if args.include?("--llm-endpoint")
22
+ format_arg = args[args.index("--format") + 1] if args.include?("--format")
23
+ output_arg = args[args.index("--output") + 1] if args.include?("--output")
22
24
 
23
25
  raw_results = Analyzer.run_all
24
26
  results = ReportGenerator.normalize(raw_results)
@@ -29,9 +31,25 @@ module RailsCodeAuditor
29
31
  else
30
32
  Scorer.score(results)
31
33
  end
34
+
35
+ if format_arg == "json"
36
+ json_output = JSON.pretty_generate({ results: results, scores: scores })
37
+ if output_arg
38
+ File.write(output_arg, json_output)
39
+ puts "[✓] JSON report saved to #{output_arg}"
40
+ else
41
+ puts json_output
42
+ end
43
+ return
44
+ end
32
45
  graphs = Grapher.generate(scores)
33
46
  html_pdf_paths = USE_GROVER ? HtmlToPdfConverter.convert_all : []
34
- PdfGenerator.generate(results, scores, graphs, html_pdf_paths)
35
- puts "[✓] Audit complete. PDF report generated."
47
+ pdf_path = PdfGenerator.generate(results, scores, graphs, html_pdf_paths)
48
+ if output_arg
49
+ FileUtils.mv(pdf_path, output_arg)
50
+ puts "[✓] PDF report saved to #{output_arg}"
51
+ else
52
+ puts "[✓] Audit complete. PDF report generated at #{pdf_path}"
53
+ end
36
54
  end
37
55
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_code_auditor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sivamanikandan
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-07-25 00:00:00.000000000 Z
10
+ date: 2025-08-08 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: brakeman
@@ -247,7 +247,7 @@ licenses:
247
247
  metadata:
248
248
  allowed_push_host: https://rubygems.org
249
249
  homepage_uri: https://github.com/railsfactory-sivamanikandan/rails_code_auditor
250
- source_code_uri: https://github.com/railsfactory-sivamanikandan/rails_code_auditor
250
+ documentation_uri: https://github.com/railsfactory-sivamanikandan/rails_code_auditor/blob/main/README.md
251
251
  changelog_uri: https://github.com/railsfactory-sivamanikandan/rails_code_auditor/CHANGELOG.md
252
252
  rdoc_options: []
253
253
  require_paths: