Skip to content

Commit fa185f3

Browse files
committed
doc: update and enhancement + prepare new version
1 parent 69ee7d8 commit fa185f3

22 files changed

+175
-163
lines changed

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ GIT
99
PATH
1010
remote: .
1111
specs:
12-
pass-station (1.4.0)
12+
pass-station (2.0.0)
1313
docopt (~> 0.6)
1414
paint (~> 2.3)
1515

docs/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
- Fanciness:
66
- Colored help message
77
- Add examples and project links to help message
8+
- Documentation:
9+
- Rework the publishing process
10+
- Use syntax highlight for shell commands without output
811
- Chore:
912
- Add support for Ruby 3.2, 3.3, 3.4
1013
- **Breaking change**: Drop support for Ruby 2.6, 2.7, 3.0

docs/pages/documentation.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ See [Usage](pages/usage.md?id=cli).
66

77
### Serve locally
88

9-
```plaintext
10-
$ npm i docsify-cli -g
11-
$ docsify serve docs
9+
```bash
10+
npm i docsify-cli -g
11+
docsify serve docs
1212
```
1313

1414
## Library doc
@@ -23,14 +23,14 @@ You can consult it online [here](https://noraj.github.io/pass-station/yard/).
2323

2424
For developers who only want to use the library.
2525

26-
```plaintext
27-
$ bundle exec yard doc
26+
```bash
27+
bundle exec yard doc
2828
```
2929

3030
### Building locally: for project developer
3131

3232
For developers who want to participate to development of the project.
3333

34-
```plaintext
35-
$ bundle exec yard doc --yardopts .yardopts-dev
34+
```bash
35+
bundle exec yard doc --yardopts .yardopts-dev
3636
```

docs/pages/install.md

+17-25
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
### Install from rubygems.org
66

7-
```plaintext
8-
$ gem install pass-station
7+
```bash
8+
gem install pass-station
99
```
1010

1111
Gem: [pass-station](https://rubygems.org/gems/pass-station)
@@ -14,41 +14,33 @@ Gem: [pass-station](https://rubygems.org/gems/pass-station)
1414

1515
From the repository:
1616

17-
```plaintext
18-
# pacman -S pass-station
17+
```bash
18+
pacman -S pass-station
1919
```
2020

2121
PKGBUILD: [pass-station](https://github.com/BlackArch/blackarch/blob/master/packages/pass-station/PKGBUILD)
2222

23-
### Install from Pentoo
24-
25-
From the repository:
26-
27-
```plaintext
28-
# emerge TODO/pass-station
29-
```
30-
3123
## Development
3224

3325
It's better to use [rbenv](https://github.com/rbenv/rbenv) or [asdf](https://github.com/asdf-vm/asdf) to have latests version of ruby and to avoid trashing your system ruby.
3426

3527
### Install from rubygems.org
3628

37-
```plaintext
38-
$ gem install --development pass-station
29+
```bash
30+
gem install --development pass-station
3931
```
4032

4133
### Build from git
4234

4335
Just replace `x.x.x` with the gem version you see after `gem build`.
4436

45-
```plaintext
46-
$ git clone https://github.com/noraj/pass-station.git pass-station
47-
$ cd pass-station
48-
$ gem install bundler
49-
$ bundler install
50-
$ gem build pass-station.gemspec
51-
$ gem install pass-station-x.x.x.gem
37+
```bash
38+
git clone https://github.com/noraj/pass-station.git pass-station
39+
cd pass-station
40+
gem install bundler
41+
bundler install
42+
gem build pass-station.gemspec
43+
gem install pass-station-x.x.x.gem
5244
```
5345

5446
Note: if an automatic install is needed you can get the version with `$ gem build pass-station.gemspec | grep Version | cut -d' ' -f4`.
@@ -57,13 +49,13 @@ Note: if an automatic install is needed you can get the version with `$ gem buil
5749

5850
From local file:
5951

60-
```plaintext
61-
$ irb -Ilib -rpass_station
52+
```bash
53+
irb -Ilib -rpass_station
6254
```
6355

6456
Same for the CLI tool:
6557

66-
```plaintext
67-
$ ruby -Ilib -rpass_station bin/pass-station
58+
```bash
59+
ruby -Ilib -rpass_station bin/pass-station
6860
```
6961

docs/pages/publishing.md

+30-20
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,49 @@
11
# Publishing
22

3-
## On Rubygems.org
3+
Change version in `lib/pass_station/version.rb`.
44

5-
```plaintext
6-
$ git tag -a vx.x.x
7-
$ git push --follow-tags
8-
$ gem push pass-station-x.x.x.gem
5+
Be sure all tests pass!
6+
7+
```bash
8+
bundle exec rake test
99
```
1010

11-
See https://guides.rubygems.org/publishing/.
11+
Ensure there is no linting offence.
12+
13+
```bash
14+
bundle exec rubocop
15+
```
1216

13-
On new release don't forget to rebuild the library documentation:
17+
Check if new upstream data is available.
1418

15-
```plaintext
16-
$ bundle exec yard doc
19+
```bash
20+
pass-station update --check
1721
```
1822

19-
And to be sure all tests pass!
23+
If so, update data:
2024

21-
```plaintext
22-
$ rake
25+
```bash
26+
pass-station update --force data/
2327
```
2428

25-
## On BlackArch
29+
And reflect the integrity hash in `PassStation::DB::UPSTREAM_DATABASE` in `lib/pass_station/source.rb`.
2630

27-
BA process
31+
```bash
32+
sha256sum data/*.csv
33+
```
2834

29-
On new release don't forget to rebuild the library documentation:
35+
Don't forget to rebuild the library documentation to reflect, new code, new version, etc.:
3036

31-
```plaintext
32-
$ bundle exec yard doc
37+
```bash
38+
bundle exec yard doc
3339
```
3440

35-
And to be sure all tests pass!
41+
```bash
42+
git tag -a vx.x.x
43+
git push --follow-tags
3644

37-
```plaintext
38-
$ rake
45+
bundle exec rake build
46+
gem push pkg/pass-station-x.x.x.gem
3947
```
48+
49+
See https://guides.rubygems.org/publishing/.

docs/pages/quick-start.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
## Quick install
44

5-
```plaintext
6-
$ gem install pass-station
5+
```bash
6+
gem install pass-station
77
```
88

99
See [Installation](/pages/install)

docs/yard/PassStation.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title>
77
Module: PassStation
88

9-
&mdash; Documentation by YARD 0.9.28
9+
&mdash; Documentation by YARD 0.9.36
1010

1111
</title>
1212

@@ -136,9 +136,9 @@ <h3 class="inherited">Constants included
136136
</div>
137137

138138
<div id="footer">
139-
Generated on Sat Sep 10 16:13:06 2022 by
139+
Generated on Sun Feb 2 14:23:26 2025 by
140140
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
141-
0.9.28 (ruby-3.1.0).
141+
0.9.36 (ruby-3.4.1).
142142
</div>
143143

144144
</div>

docs/yard/PassStation/DB.html

+18-18
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title>
77
Class: PassStation::DB
88

9-
&mdash; Documentation by YARD 0.9.28
9+
&mdash; Documentation by YARD 0.9.36
1010

1111
</title>
1212

@@ -130,7 +130,7 @@ <h2>
130130
<span class='rbrace'>}</span><span class='comma'>,</span>
131131
<span class='label'>DEFAULT_CREDENTIALS_CHEAT_SHEET:</span> <span class='lbrace'>{</span>
132132
<span class='label'>URL:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>https://raw.githubusercontent.com/ihebski/DefaultCreds-cheat-sheet/main/DefaultCreds-Cheat-Sheet.csv</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
133-
<span class='label'>HASH:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>f03f3ed77a8a932b1b2891fbec705d42b1eec4911fb76ccf36cde9e79a385556</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
133+
<span class='label'>HASH:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>6494a05090e14c438c9fa110f1566b3b7b9e2518bd0b8c42255f0dd3f7dff77b</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
134134
<span class='label'>FILENAME:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>DefaultCreds-Cheat-Sheet.csv</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
135135
<span class='label'>COLUMNS:</span> <span class='lbrace'>{</span>
136136
<span class='label'>productvendor:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Product/Vendor</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
@@ -140,7 +140,7 @@ <h2>
140140
<span class='rbrace'>}</span><span class='comma'>,</span>
141141
<span class='label'>MANY_PASSWORDS:</span> <span class='lbrace'>{</span>
142142
<span class='label'>URL:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>https://raw.githubusercontent.com/many-passwords/many-passwords/main/passwords.csv</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
143-
<span class='label'>HASH:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>293ce4411446c702aeda977b9a446ff42d045d980be0b5287a848b5bd7d39402</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
143+
<span class='label'>HASH:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>5eb85093f03dcc6a377fe7263e0629574088892dc283d5f53f93d1db80c7287a</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
144144
<span class='label'>FILENAME:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>many-passwords.csv</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
145145
<span class='label'>COLUMNS:</span> <span class='lbrace'>{</span>
146146
<span class='label'>vendor:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Vendor</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
@@ -747,7 +747,7 @@ <h3 class="signature " id="database_name-instance_method">
747747

748748

749749
&mdash;
750-
<div class='inline'><p>password database filename. Default to
750+
<div class='inline'><p>password database filename. Default to<br />
751751
<code>DefaultCreds-Cheat-Sheet.csv</code>.</p>
752752
</div>
753753

@@ -899,7 +899,7 @@ <h3 class="signature first" id="check_for_update-class_method">
899899

900900
<span class='kw'>def</span> <span class='id identifier rubyid_check_for_update'>check_for_update</span>
901901
<span class='id identifier rubyid_ret_vals'>ret_vals</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
902-
<span class='const'><span class='object_link'><a href="#UPSTREAM_DATABASE-constant" title="PassStation::DB::UPSTREAM_DATABASE (constant)">UPSTREAM_DATABASE</a></span></span><span class='lbracket'>[</span><span class='symbol'>:MAPPING</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__k'>_k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
902+
<span class='const'><span class='object_link'><a href="#UPSTREAM_DATABASE-constant" title="PassStation::DB::UPSTREAM_DATABASE (constant)">UPSTREAM_DATABASE</a></span></span><span class='lbracket'>[</span><span class='symbol'>:MAPPING</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each_value'>each_value</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
903903
<span class='id identifier rubyid_file'>file</span> <span class='op'>=</span> <span class='id identifier rubyid_download_file'>download_file</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#UPSTREAM_DATABASE-constant" title="PassStation::DB::UPSTREAM_DATABASE (constant)">UPSTREAM_DATABASE</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_v'>v</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:URL</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_mktmpdir'>mktmpdir</span><span class='rparen'>)</span>
904904
<span class='comment'># Same hash = no update
905905
</span> <span class='id identifier rubyid_ret_vals'>ret_vals</span> <span class='op'>&lt;&lt;</span> <span class='op'>!</span><span class='id identifier rubyid_check_hash'>check_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#UPSTREAM_DATABASE-constant" title="PassStation::DB::UPSTREAM_DATABASE (constant)">UPSTREAM_DATABASE</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_v'>v</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:HASH</span><span class='rbracket'>]</span><span class='rparen'>)</span>
@@ -974,7 +974,7 @@ <h3 class="signature " id="check_hash-class_method">
974974

975975

976976
&mdash;
977-
<div class='inline'><p>if the hash of the file matched the one provided (<code>true</code>)
977+
<div class='inline'><p>if the hash of the file matched the one provided (<code>true</code>)<br />
978978
or not (<code>false</code>).</p>
979979
</div>
980980

@@ -1058,7 +1058,7 @@ <h3 class="signature " id="download_file-class_method">
10581058

10591059

10601060
&mdash;
1061-
<div class='inline'><p>the destination path (may
1061+
<div class='inline'><p>the destination path (may<br />
10621062
overwrite existing file).</p>
10631063
</div>
10641064

@@ -1100,7 +1100,7 @@ <h3 class="signature " id="download_file-class_method">
11001100

11011101
</span>
11021102

1103-
&mdash; <div class='inline'><p>the SHA256 hash to check, if the file
1103+
&mdash; <div class='inline'><p>the SHA256 hash to check, if the file<br />
11041104
already exist and the hash matches then the download will be skipped.</p>
11051105
</div>
11061106

@@ -1206,7 +1206,7 @@ <h3 class="signature " id="download_upstream-class_method">
12061206

12071207

12081208
&mdash;
1209-
<div class='inline'><p>the destination path (may
1209+
<div class='inline'><p>the destination path (may<br />
12101210
overwrite existing file).</p>
12111211
</div>
12121212

@@ -1246,7 +1246,7 @@ <h3 class="signature " id="download_upstream-class_method">
12461246

12471247
</span>
12481248

1249-
&mdash; <div class='inline'><p>the SHA256 hash to check, if the file
1249+
&mdash; <div class='inline'><p>the SHA256 hash to check, if the file<br />
12501250
already exist and the hash matches then the download will be skipped.</p>
12511251
</div>
12521252

@@ -1426,7 +1426,7 @@ <h3 class="signature " id="write_file-class_method">
14261426

14271427

14281428
&mdash;
1429-
<div class='inline'><p>the file path where the fiel will be
1429+
<div class='inline'><p>the file path where the fiel will be<br />
14301430
written to disk</p>
14311431
</div>
14321432

@@ -1507,8 +1507,8 @@ <h3 class="signature first" id="highlight_found-instance_method">
15071507

15081508
</h3><div class="docstring">
15091509
<div class="discussion">
1510-
<p>Highlight (colorize) a searched term in the input
1511-
When used with the search command, it will ignore in which column the
1510+
<p>Highlight (colorize) a searched term in the input<br />
1511+
When used with the search command, it will ignore in which column the<br />
15121512
search was made, and will instead colorize in every columns.</p>
15131513

15141514

@@ -1907,7 +1907,7 @@ <h3 class="signature " id="parse-instance_method">
19071907

19081908

19091909
&mdash;
1910-
<div class='inline'><p>table of <code>CSV::Row</code>, each row contains multiple
1910+
<div class='inline'><p>table of <code>CSV::Row</code>, each row contains multiple<br />
19111911
attributes (columns depends on the database source, see <span class='object_link'><a href="#UPSTREAM_DATABASE-constant" title="PassStation::DB::UPSTREAM_DATABASE (constant)">UPSTREAM_DATABASE</a></span>)</p>
19121912
</div>
19131913

@@ -1987,7 +1987,7 @@ <h3 class="signature " id="search-instance_method">
19871987

19881988

19891989
&mdash;
1990-
<div class='inline'><p>the column to search in: column name (columns depends on the database source, see
1990+
<div class='inline'><p>the column to search in: column name (columns depends on the database source, see<br />
19911991
<span class='object_link'><a href="#UPSTREAM_DATABASE-constant" title="PassStation::DB::UPSTREAM_DATABASE (constant)">UPSTREAM_DATABASE</a></span>) or :all (all columns)</p>
19921992
</div>
19931993

@@ -2006,7 +2006,7 @@ <h3 class="signature " id="search-instance_method">
20062006

20072007

20082008
&mdash;
2009-
<div class='inline'><p>table of <code>CSV::Row</code>, each row contains multiple
2009+
<div class='inline'><p>table of <code>CSV::Row</code>, each row contains multiple<br />
20102010
attributes (columns depends on the database source, see <span class='object_link'><a href="#UPSTREAM_DATABASE-constant" title="PassStation::DB::UPSTREAM_DATABASE (constant)">UPSTREAM_DATABASE</a></span>)</p>
20112011
</div>
20122012

@@ -2059,9 +2059,9 @@ <h3 class="signature " id="search-instance_method">
20592059
</div>
20602060

20612061
<div id="footer">
2062-
Generated on Sat Sep 10 16:13:06 2022 by
2062+
Generated on Sun Feb 2 14:23:27 2025 by
20632063
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2064-
0.9.28 (ruby-3.1.0).
2064+
0.9.36 (ruby-3.4.1).
20652065
</div>
20662066

20672067
</div>

0 commit comments

Comments
 (0)