file_tree_visualizer 0.2.0 → 0.2.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: b43d301f84619b7a620a0cbcef1d135d4906073efaecf03b737b43572ebd6d89
4
- data.tar.gz: 65de782e8d5094d981f0bedd23e6307d1b6cd4eedebd6b8bbb412a9b303e330e
3
+ metadata.gz: b48b5d1e8f778bbacb3fb9e05cbcbe01cc2bcfe461a9483e6a26ecee97ea61e4
4
+ data.tar.gz: 871f3db43591f0bed5778d21a42431a50dad4604fc559690a4fe7c469a97ed05
5
5
  SHA512:
6
- metadata.gz: f6a58da21e94d26fd62fa5a05bc5d0946a16525c187f021e7184b010515051f346b2c8786067879c278c34ca3abfbe61dc416f1a2bd170201654c71d477bffd0
7
- data.tar.gz: ba3cb73876856ee460c66f1b34a61f1965cb6deda2021f52dba5904a8500b995e8cd4c28fd91bb1f388462a88c2d62e381024e94d1430dfaf591555344c674a8
6
+ metadata.gz: eac6f7ab5f691589e622b2c595164b6b7f9043d75b5d22ea3e9aa04eba60fa8919f061ece96a824fd02e60c59dfe40f4894c61cf6a45742becc717e3b7c59f18
7
+ data.tar.gz: 5ec9b4396e7c5e2bdb56608091a60f0370655d1b895b15fdff0210a77fd79658ec7969545bdc27068c3a052dc44f9b01fcd3bf7a5482d2deaf69b4c060ae879f
data/README.md CHANGED
@@ -33,7 +33,7 @@ file-tree-visualizer /path/to/scan -o report.html
33
33
  Install a specific version:
34
34
 
35
35
  ```bash
36
- gem install file_tree_visualizer -v 0.2.0
36
+ gem install file_tree_visualizer -v 0.2.1
37
37
  ```
38
38
 
39
39
  ## Local development install
@@ -41,7 +41,7 @@ gem install file_tree_visualizer -v 0.2.0
41
41
  ```bash
42
42
  bundle install
43
43
  gem build file_tree_visualizer.gemspec
44
- gem install ./file_tree_visualizer-0.2.0.gem
44
+ gem install ./file_tree_visualizer-0.2.1.gem
45
45
  file-tree-visualizer /path/to/scan -o report.html
46
46
  ```
47
47
 
@@ -63,6 +63,7 @@ During scanning, an interactive terminal shows a progress bar with processed fil
63
63
  --json FILE Export full result as JSON
64
64
  --csv FILE Export top files as CSV
65
65
  --lang LANG Language for CLI and report (en|es)
66
+ -v, --version Print version
66
67
  -h, --help Show help
67
68
 
68
69
  Language resolution priority:
@@ -73,6 +74,12 @@ Language resolution priority:
73
74
 
74
75
  ## Common workflows
75
76
 
77
+ Print current gem version:
78
+
79
+ ```bash
80
+ file-tree-visualizer --version
81
+ ```
82
+
76
83
  Summary only (no HTML file generated unless `--output` is explicitly provided):
77
84
 
78
85
  ```bash
@@ -116,17 +123,17 @@ Branch policy:
116
123
 
117
124
  ## Automatic release to RubyGems
118
125
 
119
- - This repository publishes the gem automatically when pushing a tag with format `v*` (for example `v0.2.0`).
126
+ - This repository publishes the gem automatically when pushing a tag with format `v*` (for example `v0.2.1`).
120
127
  - Before using it, configure the `RUBYGEMS_API_KEY` secret in GitHub Actions.
121
128
  - You can also trigger the workflow manually from GitHub Actions (`workflow_dispatch`).
122
129
 
123
130
  ```bash
124
- git tag v0.2.0
125
- git push origin v0.2.0
131
+ git tag v0.2.1
132
+ git push origin v0.2.1
126
133
  ```
127
134
 
128
135
  Reusable release notes template:
129
136
 
130
137
  ```bash
131
- gh release create v0.2.0 --title "v0.2.0" --notes-file .github/release-template.md
138
+ gh release create v0.2.1 --title "v0.2.1" --notes-file .github/release-template.md
132
139
  ```
@@ -15,6 +15,11 @@ module FileTreeVisualizer
15
15
 
16
16
  def run
17
17
  options, parser, locale = parse_options(@argv.dup)
18
+ if options[:version]
19
+ puts FileTreeVisualizer::VERSION
20
+ return 0
21
+ end
22
+
18
23
  if options[:help]
19
24
  puts parser
20
25
  return 0
@@ -149,6 +154,7 @@ module FileTreeVisualizer
149
154
  csv_output: nil,
150
155
  exclude_patterns: [],
151
156
  lang: nil,
157
+ version: false,
152
158
  help: false
153
159
  }
154
160
 
@@ -214,6 +220,10 @@ module FileTreeVisualizer
214
220
  options[:lang] = value
215
221
  end
216
222
 
223
+ opts.on('-v', '--version', t(locale, 'cli.version_option')) do
224
+ options[:version] = true
225
+ end
226
+
217
227
  opts.on('-h', '--help', t(locale, 'cli.help_option')) do
218
228
  options[:help] = true
219
229
  end
@@ -18,6 +18,7 @@ module FileTreeVisualizer
18
18
  'json_option' => 'Export scan result as JSON',
19
19
  'csv_option' => 'Export top files as CSV',
20
20
  'lang_option' => 'Language for CLI and report (en|es)',
21
+ 'version_option' => 'Print version',
21
22
  'help_option' => 'Show this help',
22
23
  'messages' => {
23
24
  'report_generated' => 'Report generated at: %<path>s',
@@ -93,6 +94,7 @@ module FileTreeVisualizer
93
94
  'json_option' => 'Exporta resultado del escaneo como JSON',
94
95
  'csv_option' => 'Exporta top de archivos como CSV',
95
96
  'lang_option' => 'Idioma para CLI y reporte (en|es)',
97
+ 'version_option' => 'Muestra version',
96
98
  'help_option' => 'Muestra esta ayuda',
97
99
  'messages' => {
98
100
  'report_generated' => 'Reporte generado en: %<path>s',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FileTreeVisualizer
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: file_tree_visualizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Bidwell