yard_ghurt 1.2.1 → 1.2.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: 1ba77aa5e6b3ec3b9467138381e4c0af1e3c7e2cd1b08f48b496b6ccbce682a7
4
- data.tar.gz: 1343014b656ac37ca4639ee0ff4ec0f9efbdbff6c74cac272a733287ea2406ca
3
+ metadata.gz: c2bfcf160b53592d1c17718a1811ade25bc5b9ca1a873f87f86cfecaa8978bb7
4
+ data.tar.gz: 927542fe06f6dd0945a172d7e5abf5118bd1cb712aeb0f04162d691f47c600dd
5
5
  SHA512:
6
- metadata.gz: e86568ddae7285e682359272e8376af0c0c72a3559e61be6db1e7f165f38117484bddcb137a978fd29ce6e2144d5d60ee3bd2ec717daee86aea9fa8254debfb8
7
- data.tar.gz: aa4842125f2dfb966543b7bc78771d928da1de5d44cc6d7ad1b6bf1d57ad1096f6f07d5cfc4064bb80eac9556a20f77dd02ac30fd96ce7bf3c84b84e4f58cc14
6
+ metadata.gz: b0b9ba1d972051bf73f3c36e6042ed40c150e4f7c98f55a2c2fcb4b43beae191f6a92da951f73494a7949e6dea3828d4ba6fb841bff43796ed0d937c04b06e53
7
+ data.tar.gz: 41bc4528945c3b394434f8926ae5bff3a5e965b8c402bbaf60cb510efaa10fd8061795a409a05b3e902a67cbc28f7a26aa471bd525af4b10c595dfb7eb77ceee
data/.yardopts ADDED
@@ -0,0 +1,5 @@
1
+ --charset 'UTF-8'
2
+ --embed-mixins
3
+ --files 'LICENSE.txt,TODO.md'
4
+ --protected
5
+ --readme 'README.md'
data/Gemfile CHANGED
@@ -1,7 +1,17 @@
1
1
  # encoding: UTF-8
2
2
  # frozen_string_literal: true
3
3
 
4
-
5
4
  source 'https://rubygems.org'
6
5
 
7
6
  gemspec
7
+
8
+ group :development,:test do
9
+ gem 'bundler' ,'~> 2.6'
10
+
11
+ gem 'rdoc' ,'~> 6.14' # For RDoc for YARD (*.rb).
12
+ gem 'redcarpet','~> 3.6' # For Markdown for YARD (*.md).
13
+ end
14
+
15
+ group :test do
16
+ # gem 'minitest' ,'~> 5.25'
17
+ end
data/README.md CHANGED
@@ -1,10 +1,8 @@
1
1
  # YardGhurt
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/yard_ghurt.svg)](https://badge.fury.io/rb/yard_ghurt)
4
-
5
4
  [![Documentation](https://img.shields.io/badge/doc-yard-%23A0522D.svg)](https://esotericpig.github.io/docs/yard_ghurt/yardoc/index.html)
6
5
  [![Source Code](https://img.shields.io/badge/source-github-%23211F1F.svg)](https://github.com/esotericpig/yard_ghurt)
7
- [![Changelog](https://img.shields.io/badge/changelog-md-%23A0522D.svg)](CHANGELOG.md)
8
6
  [![License](https://img.shields.io/github/license/esotericpig/yard_ghurt.svg)](LICENSE.txt)
9
7
 
10
8
  <u>YARD</u>oc <u>G</u>it<u>Hu</u>b <u>R</u>ake <u>T</u>asks
@@ -12,190 +10,192 @@
12
10
  - Fix GitHub Flavored Markdown files.
13
11
  - Sync YARDoc to a local GitHub Pages repo.
14
12
 
15
- ## Contents
13
+ ## // Contents
16
14
 
17
- - [Setup](#setup)
18
- - [Using](#using)
19
- - [GFMFixTask](#gfmfixtask)
20
- - [GHPSyncTask](#ghpsynctask)
21
- - [Util / YardGhurt](#util--yardghurt)
22
- - [AnchorLinks](#anchorlinks)
23
- - [CLI App](#cli-app)
24
- - [Hacking](#hacking)
25
- - [Testing](#testing)
26
- - [Tests](#tests)
27
- - [License](#license)
15
+ - [Setup](#-setup)
16
+ - [Using](#-using)
17
+ - [GFMFixTask](#-gfmfixtask)
18
+ - [GHPSyncTask](#-ghpsynctask)
19
+ - [Util / YardGhurt](#-util--yardghurt)
20
+ - [AnchorLinks](#-anchorlinks)
21
+ - [CLI App](#-cli-app)
22
+ - [Hacking](#-hacking)
23
+ - [Testing](#-testing)
24
+ - [Tests](#-tests)
25
+ - [License](#-license)
28
26
 
29
- ## [Setup](#contents)
27
+ ## [//](#-contents) Setup
30
28
 
31
29
  Pick your poison...
32
30
 
33
31
  With the RubyGems CLI package manager:
34
32
 
35
- `$ gem install yard_ghurt`
33
+ ```bash
34
+ gem install yard_ghurt
35
+ ```
36
36
 
37
- In your *Gemspec* (*&lt;project&gt;.gemspec*):
37
+ In your *Gemspec*:
38
38
 
39
- ```Ruby
39
+ ```ruby
40
40
  spec.add_development_dependency 'yard_ghurt', '~> X.X.X'
41
41
  ```
42
42
 
43
43
  In your *Gemfile*:
44
44
 
45
- ```Ruby
46
- gem 'yard_ghurt', '~> X.X.X', :group => [:development, :test]
45
+ ```ruby
46
+ gem 'yard_ghurt', '~> X.X.X', group: %i[development test]
47
47
  # or...
48
- gem 'yard_ghurt', :git => 'https://github.com/esotericpig/yard_ghurt.git',
49
- :tag => 'vX.X.X', :group => [:development, :test]
48
+ gem 'yard_ghurt', git: 'https://github.com/esotericpig/yard_ghurt.git',
49
+ branch: main, group: %i[development test]
50
50
  ```
51
51
 
52
- Manually:
52
+ From source:
53
53
 
54
- ```
55
- $ git clone 'https://github.com/esotericpig/yard_ghurt.git'
56
- $ cd yard_ghurt
57
- $ bundle install
58
- $ bundle exec rake install:local
54
+ ```bash
55
+ git clone --depth 1 'https://github.com/esotericpig/yard_ghurt.git'
56
+ cd yard_ghurt
57
+ bundle install
58
+ bundle exec rake install:local
59
59
  ```
60
60
 
61
- ## [Using](#contents)
61
+ ## [//](#-contents) Using
62
62
 
63
63
  Currently, you can't use this project as a YARDoc Plugin, but planning on it for v2.0. Read the [TODO](TODO.md) for more info.
64
64
 
65
65
  **Rake Tasks:**
66
66
 
67
- | Task | Description |
68
- | --- | --- |
69
- | [GFMFixTask](#gfmfixtask) | Fix GitHub Flavored Markdown files |
70
- | [GHPSyncTask](#ghpsynctask) | Sync YARDoc to a local GitHub Pages repo. |
67
+ | Task | Description |
68
+ |------------------------------|-------------------------------------------|
69
+ | [GFMFixTask](#-gfmfixtask) | Fix GitHub Flavored Markdown files. |
70
+ | [GHPSyncTask](#-ghpsynctask) | Sync YARDoc to a local GitHub Pages repo. |
71
71
 
72
72
  **Helpers:**
73
73
 
74
- | Helper | Description |
75
- | --- | --- |
76
- | [Util / YardGhurt](#util--yardghurt) | Utility methods for tasks |
77
- | [AnchorLinks](#anchorlinks) | A “database” of anchor links |
74
+ | Helper | Description |
75
+ |---------------------------------------|-------------------------------|
76
+ | [Util / YardGhurt](#-util--yardghurt) | Utility methods for tasks. |
77
+ | [AnchorLinks](#-anchorlinks) | A “database” of anchor links. |
78
78
 
79
- ### [GFMFixTask](#using)
79
+ ### [//](#-contents) GFMFixTask
80
80
 
81
81
  Fix (find & replace) text in the GitHub Flavored Markdown (GFM) files in the YARDoc directory, for differences between the two formats.
82
82
 
83
83
  **Very Important!**
84
84
 
85
- In order for this to work, you must also add `redcarpet` as a dependency, per YARDoc's documentation:
85
+ In order for this to work, you must also add `redcarpet` as a dependency (per YARDoc's documentation), else, you'll get a bunch of `label-*` relative links.
86
86
 
87
- ```Ruby
88
- spec.add_development_dependency 'redcarpet','~> X.X' # For YARDoc Markdown (*.md)
87
+ ```ruby
88
+ gem 'redcarpet','~> X.X' # For YARDoc Markdown (*.md).
89
89
  ```
90
90
 
91
- Else, you'll get a bunch of `label-*` relative links.
92
-
93
91
  You can set *dry_run* on the command line:
94
92
 
95
- `$ rake yard_gfm_fix dryrun=true`
93
+ ```bash
94
+ rake yard_gfm_fix dryrun=true
95
+ ```
96
96
 
97
97
  **What I typically use:**
98
98
 
99
- ```Ruby
100
- YardGhurt::GFMFixTask.new() do |task|
101
- task.arg_names = [:dev]
99
+ ```ruby
100
+ YardGhurt::GFMFixTask.new do |task|
101
+ task.arg_names = %i[dev]
102
102
  task.dry_run = false
103
103
  task.fix_code_langs = true
104
104
  task.md_files = ['index.html']
105
105
 
106
- task.before = Proc.new() do |t2,args|
107
- # Delete this file as it's never used (index.html is an exact copy)
108
- YardGhurt.rm_exist(File.join(t2.doc_dir,'file.README.html'))
106
+ task.before = proc do |task2,args|
107
+ # Delete this file as it's never used (`index.html` is an exact copy).
108
+ YardGhurt.rm_exist(File.join(task2.doc_dir,'file.README.html'))
109
109
 
110
- # Root dir of my GitHub Page for CSS/JS
110
+ # Root dir of my GitHub Page for CSS/JS.
111
111
  ghp_root_dir = YardGhurt.to_bool(args.dev) ? '../../esotericpig.github.io' : '../../..'
112
112
 
113
- t2.css_styles << %Q(<link rel="stylesheet" type="text/css" href="#{ghp_root_dir}/css/prism.css" />)
114
- t2.js_scripts << %Q(<script src="#{ghp_root_dir}/js/prism.js"></script>)
113
+ task2.css_styles << %(<link rel="stylesheet" type="text/css" href="#{ghp_root_dir}/css/prism.css" />)
114
+ task2.js_scripts << %(<script src="#{ghp_root_dir}/js/prism.js"></script>)
115
115
  end
116
116
  end
117
117
  ```
118
118
 
119
- **Using all options:**
119
+ **All options:**
120
120
 
121
- ```Ruby
121
+ ```ruby
122
122
  YardGhurt::GFMFixTask.new(:yard_fix) do |task|
123
- task.anchor_db = {'tests' => 'Testing'} # #tests => #Testing
124
- task.arg_names << :name # Custom args
125
- task.css_styles << '<link rel="stylesheet" href="css/my_css.css" />' # Inserted at </head>
126
- task.css_styles << '<style>body{ background-color: linen; }</style>'
127
- task.custom_gsub = Proc.new() {|line| !line.gsub!('YardGhurt','YARD GHURT!').nil?()}
123
+ task.anchor_db = {'tests' => 'Testing'} # Anchor links `#tests` become `#Testing`.
124
+ task.arg_names << :name # Custom args.
125
+ task.css_styles << '<link rel="stylesheet" href="css/my_css.css" />' # Inserted at `</head>`.
126
+ task.css_styles << '<style>body { background-color: linen; }</style>'
127
+ task.custom_gsub = proc { |line| !line.gsub!('YardGhurt','YARD GHURT!').nil? }
128
128
  task.custom_gsubs << [/newline/i,'Do you smell what The Rock is cooking?']
129
- task.deps << :yard # Custom dependencies
129
+ task.deps << :yard # Custom dependencies.
130
130
  task.description = 'Fix it'
131
131
  task.doc_dir = 'doc'
132
- task.dry_run = false
132
+ task.dry_run = true
133
133
  task.exclude_code_langs = Set['ruby']
134
134
  task.fix_anchor_links = true
135
135
  task.fix_code_langs = true
136
136
  task.fix_file_links = true
137
- task.js_scripts << '<script src="js/my_js.js"></script>' # Inserted at </body>
137
+ task.js_scripts << '<script src="js/my_js.js"></script>' # Inserted at `</body>`.
138
138
  task.js_scripts << '<script>document.write("Hello World!");</script>'
139
139
  task.md_files = ['index.html']
140
140
  task.verbose = false
141
141
 
142
- task.before = Proc.new() {|task,args| puts "Hi, #{args.name}!"}
143
- task.during = Proc.new() {|task,args,file| puts "#{args.name} can haz #{file}?"}
144
- task.after = Proc.new() {|task,args| puts "Goodbye, #{args.name}!"}
142
+ task.before = proc { |_task2,args| puts "Hi, #{args.name}!" }
143
+ task.during = proc { |_task2,args,file| puts "#{args.name} can haz #{file}?" }
144
+ task.after = proc { |_task2,args| puts "Goodbye, #{args.name}!" }
145
145
  end
146
146
  ```
147
147
 
148
- ### [GHPSyncTask](#using)
148
+ ### [//](#-contents) GHPSyncTask
149
149
 
150
150
  Sync YARDoc to a local GitHub Pages repo (uses `rsync` by default).
151
151
 
152
152
  **What I typically use:**
153
153
 
154
- ```Ruby
155
- YardGhurt::GHPSyncTask.new() do |task|
154
+ ```ruby
155
+ YardGhurt::GHPSyncTask.new do |task|
156
156
  task.ghp_dir = '../esotericpig.github.io/docs/yard_ghurt/yardoc'
157
157
  task.sync_args << '--delete-after'
158
158
  end
159
159
  ```
160
160
 
161
- **Using all options:**
161
+ **All options:**
162
162
 
163
- ```Ruby
164
- # Execute: rake ghp_doc[false,'Ruby']
163
+ ```ruby
164
+ # Execute: rake ghp_doc[false,'Custom']
165
165
  YardGhurt::GHPSyncTask.new(:ghp_doc) do |task|
166
- task.arg_names << :name # Custom args
167
- task.deps << :yard # Custom dependencies
166
+ task.arg_names << :name # Custom args ('Custom').
167
+ task.deps << :yard # Custom dependencies.
168
168
  task.description = 'Rsync my_doc/ to my page'
169
- task.doc_dir = 'my_doc' # YARDoc directory of generated files
169
+ task.doc_dir = 'my_doc' # YARDoc directory of generated files.
170
170
  task.ghp_dir = '../dest_dir/my_page'
171
- task.strict = true # Fail if doc_dir doesn't exist
171
+ task.strict = true # Fail if doc_dir doesn't exist.
172
172
  task.sync_args << '--delete-after'
173
173
  task.sync_cmd = '/usr/bin/rsync'
174
174
 
175
- task.before = Proc.new() {|task,args| puts "Hi, #{args.name}!"}
176
- task.after = Proc.new() {|task,args| puts "Goodbye, #{args.name}!"}
175
+ task.before = proc { |_task2,args| puts "Hi, #{args.name}!" }
176
+ task.after = proc { |_task2,args| puts "Goodbye, #{args.name}!" }
177
177
  end
178
178
  ```
179
179
 
180
- ### [Util / YardGhurt](#using)
180
+ ### [//](#-contents) Util / YardGhurt
181
181
 
182
182
  Utility methods for tasks.
183
183
 
184
- ```Ruby
184
+ ```ruby
185
185
  require 'yard_ghurt/util'
186
186
 
187
- # If the file exists, delete it, and if +output+ is true, log it to stdout
187
+ # If the file exists, delete it, and if `output` is true, log it to stdout.
188
188
  YardGhurt::Util.rm_exist('doc/file.README.html')
189
189
  YardGhurt::Util.rm_exist('doc/file.README.html',false)
190
190
 
191
- # Convert an Object to true or false
192
- puts YardGhurt::Util.to_bool('true') # true
193
- puts YardGhurt::Util.to_bool('on') # true
194
- puts YardGhurt::Util.to_bool('yes') # true
195
- puts YardGhurt::Util.to_bool(nil) # false
191
+ # Convert an Object to true or false.
192
+ puts YardGhurt::Util.to_bool('true') #=> true
193
+ puts YardGhurt::Util.to_bool('on') #=> true
194
+ puts YardGhurt::Util.to_bool('yes') #=> true
195
+ puts YardGhurt::Util.to_bool(nil) #=> false
196
196
  ```
197
197
 
198
- For convenience, *Util*'s methods are also included in the top module *YardGhurt*. However, this will also include all of the Tasks and Helpers, so *Util* is preferred, unless you're already requiring *yard_ghurt*.
198
+ For convenience, *Util*'s methods are also included in the top module *YardGhurt*. However, this will also include all the Tasks and Helpers, so *Util* is preferred, unless you're already requiring *yard_ghurt*.
199
199
 
200
200
  ```Ruby
201
201
  require 'yard_ghurt'
@@ -204,64 +204,62 @@ YardGhurt.rm_exist('doc/file.README.html')
204
204
  puts YardGhurt.to_bool('true')
205
205
  ```
206
206
 
207
- ### [AnchorLinks](#using)
207
+ ### [//](#-contents) AnchorLinks
208
+
208
209
  A “database” of anchor links specific to GitHub Flavored Markdown (GFM) and YARDoc.
209
210
 
210
211
  You can use this by itself to view what anchor IDs would be generated:
211
212
 
212
- ```Ruby
213
+ ```ruby
213
214
  require 'yard_ghurt/anchor_links'
214
215
 
215
- al = YardGhurt::AnchorLinks.new()
216
-
217
- puts al.to_github_anchor_id('This is a test!')
218
- puts al.to_yard_anchor_id('This is a test!')
216
+ al = YardGhurt::AnchorLinks.new
219
217
 
220
- # Output:
221
- # ---
222
- # this-is-a-test
223
- # This_is_a_test_
218
+ puts al.to_github_anchor_id('This is a test!') #=> this-is-a-test
219
+ puts al.to_yard_anchor_id('This is a test!') #=> This_is_a_test_
224
220
  ```
225
221
 
226
- Be aware that YARDoc depends on a common number that will be incremented for all duplicates, while GFM's number is only local to each specific duplicate:
222
+ Be aware that YARDoc depends on a common number that will be incremented for all duplicates, while GFM's number is only local to each duplicate:
227
223
 
228
- ```Ruby
229
- al = YardGhurt::AnchorLinks.new()
224
+ ```ruby
225
+ al = YardGhurt::AnchorLinks.new
230
226
  name = 'This is a test!'
231
227
 
232
- puts al.to_yard_anchor_id(name) # This_is_a_test_
233
- puts al.to_yard_anchor_id(name) # This_is_a_test_
228
+ puts al.to_yard_anchor_id(name) #=> This_is_a_test_
229
+ puts al.to_yard_anchor_id(name) #=> This_is_a_test_
234
230
 
235
- puts al.to_github_anchor_id(name) # this-is-a-test
236
- puts al.to_github_anchor_id(name) # this-is-a-test
231
+ puts al.to_github_anchor_id(name) #=> this-is-a-test
232
+ puts al.to_github_anchor_id(name) #=> this-is-a-test
237
233
 
238
- al << name # Officially add it to the database
234
+ al << name # Officially add it to the database.
239
235
 
240
- # Instead of being 0 & 0, will be 0 & 1 (incremented),
241
- # even without being added to the database
242
- puts al.to_yard_anchor_id(name) # This_is_a_test_0
243
- puts al.to_yard_anchor_id(name) # This_is_a_test_1
236
+ # Instead of being 0 & 0, it will be 0 & 1 (incremented),
237
+ # even without being added to the database.
238
+ puts al.to_yard_anchor_id(name) #=> This_is_a_test_0
239
+ puts al.to_yard_anchor_id(name) #=> This_is_a_test_1
244
240
 
245
- puts al.to_github_anchor_id(name) # this-is-a-test-1
246
- puts al.to_github_anchor_id(name) # this-is-a-test-1
241
+ puts al.to_github_anchor_id(name) #=> this-is-a-test-1
242
+ puts al.to_github_anchor_id(name) #=> this-is-a-test-1
247
243
 
248
244
  name = 'This is another test!'
249
- al << name # Officially add it to the database
245
+ al << name # Officially add it to the database.
250
246
 
251
- # Instead of being 0 & 1, will be 2 & 3 (global increment),
252
- # even without being added to the database
253
- puts al.to_yard_anchor_id(name) # This_is_another_test_2
254
- puts al.to_yard_anchor_id(name) # This_is_another_test_3
247
+ # Instead of being 0 & 1, it will be 2 & 3 (global increment),
248
+ # even without being added to the database.
249
+ puts al.to_yard_anchor_id(name) #=> This_is_another_test_2
250
+ puts al.to_yard_anchor_id(name) #=> This_is_another_test_3
255
251
 
256
- puts al.to_github_anchor_id(name) # this-is-another-test-1
257
- puts al.to_github_anchor_id(name) # this-is-another-test-1
252
+ puts al.to_github_anchor_id(name) #=> this-is-another-test-1
253
+ puts al.to_github_anchor_id(name) #=> this-is-another-test-1
258
254
  ```
259
255
 
260
- ## [CLI App](#contents)
256
+ ## [//](#-contents) CLI App
257
+
261
258
  A CLI app has been added for convenience for when writing your own README.
262
259
 
263
260
  On the command line:
264
- ```
261
+
262
+ ```bash
265
263
  $ yard_ghurt -g "What's this ID?"
266
264
  # => whats-this-id
267
265
 
@@ -274,6 +272,7 @@ $ yard_ghurt -a "What's this ID?"
274
272
  ```
275
273
 
276
274
  Help:
275
+
277
276
  ```
278
277
  Usage: yard_ghurt [options]
279
278
  -a, --anchor <string> Print GitHub & YARDoc anchor link IDs of <string>
@@ -284,24 +283,28 @@ Usage: yard_ghurt [options]
284
283
  -v, --version Print the version
285
284
  ```
286
285
 
287
- ## [Hacking](#contents)
286
+ ## [//](#-contents) Hacking
288
287
 
289
- ```
290
- $ git clone 'https://github.com/esotericpig/yard_ghurt.git'
291
- $ cd yard_ghurt
292
- $ bundle install
293
- $ bundle exec rake -T
288
+ ```bash
289
+ git clone 'https://github.com/esotericpig/yard_ghurt.git'
290
+ cd yard_ghurt
291
+ bundle install
292
+ bundle exec rake -T
294
293
  ```
295
294
 
296
- ### [Testing](#hacking)
295
+ ### [//](#-contents) Testing
297
296
 
298
297
  First, execute this:
299
298
 
300
- `$ bundle exec rake clobber yard yard_gfm_fix[true]`
299
+ ```bash
300
+ bundle exec rake clobber yard yard_gfm_fix[true]
301
+ ```
301
302
 
302
303
  Then execute this and make sure there are no warnings and no changes:
303
304
 
304
- `$ bundle exec rake yard_gfm_fix[true]`
305
+ ```bash
306
+ bundle exec rake yard_gfm_fix[true]
307
+ ```
305
308
 
306
309
  It should output this:
307
310
 
@@ -312,13 +315,15 @@ It should output this:
312
315
  = Nothing written (up-to-date)
313
316
  ```
314
317
 
315
- Then open up **doc/index.html** and check all of the [anchor links](#tests), [local file links](#license), etc.
318
+ Then open up [doc/index.html](doc/index.html) and check all the [anchor links](#-tests), [local file links](#-license), etc.
316
319
 
317
320
  Lastly, the 2 files should be almost identical, except for 1 line:
318
321
 
319
- `$ diff doc/index.html doc/file.README.html`
322
+ ```bash
323
+ diff doc/index.html doc/file.README.html
324
+ ```
320
325
 
321
- ## [Tests](#contents)
326
+ ## [//](#-contents) Tests
322
327
 
323
328
  These are actual tests for this gem.
324
329
 
@@ -334,17 +339,17 @@ These are actual tests for this gem.
334
339
  - [中文?](#中文)
335
340
  - [汉语?](#汉语)
336
341
 
337
- ### [This is Test #1](#tests)
338
- ### [This-is-Test-#2](#tests)
339
- ### [This_is_Test_#3](#tests)
340
- ### ["This is Test #4"](#tests)
341
- ### ["This is Test #4"](#tests)
342
- ### [this is test #5](#tests)
343
- ### [THIS IS TEST #6](#tests)
344
- ### [日本語?](#tests)
345
- ### [テスト?](#tests)
346
- ### [中文?](#tests)
347
- ### [汉语?](#tests)
342
+ ### [This is Test #1](#-tests)
343
+ ### [This-is-Test-#2](#-tests)
344
+ ### [This_is_Test_#3](#-tests)
345
+ ### ["This is Test #4"](#-tests)
346
+ ### ["This is Test #4"](#-tests)
347
+ ### [this is test #5](#-tests)
348
+ ### [THIS IS TEST #6](#-tests)
349
+ ### [日本語?](#-tests)
350
+ ### [テスト?](#-tests)
351
+ ### [中文?](#-tests)
352
+ ### [汉语?](#-tests)
348
353
 
349
354
  ```
350
355
  Newline
@@ -360,12 +365,12 @@ Newline
360
365
  Newline
361
366
  ```
362
367
 
363
- ## [License](#contents)
368
+ ## [//](#-contents) License
364
369
 
365
370
  [GNU LGPL v3+](LICENSE.txt)
366
371
 
367
372
  > YardGhurt (<https://github.com/esotericpig/yard_ghurt>)
368
- > Copyright (c) 2019-2021 Jonathan Bradley Whited
373
+ > Copyright (c) 2019-2025 Bradley Whited
369
374
  >
370
375
  > YardGhurt is free software: you can redistribute it and/or modify
371
376
  > it under the terms of the GNU Lesser General Public License as published by
data/Rakefile CHANGED
@@ -1,50 +1,40 @@
1
1
  # encoding: UTF-8
2
2
  # frozen_string_literal: true
3
3
 
4
-
5
4
  require 'bundler/gem_tasks'
6
5
 
7
6
  require 'rake/clean'
8
-
9
7
  require 'yard'
10
8
  require 'yard_ghurt'
11
9
 
10
+ task default: %i[doc]
12
11
 
13
- task default: [:doc]
14
-
15
- CLEAN.exclude('.git/','stock/')
12
+ CLEAN.exclude('.git/','.github/','.idea/','stock/')
16
13
  CLOBBER.include('doc/')
17
14
 
18
-
19
- desc 'Generate documentation (YARDoc)'
20
- task :doc,%i[] => %i[ yard yard_gfm_fix ] do |task|
21
- # pass
22
- end
15
+ # TEST: To test using different Gem versions:
16
+ # GST=1 bundle update && bundle exec rake doc
17
+ desc 'Generate doc'
18
+ task doc: %i[yard yard_gfm_fix]
23
19
 
24
20
  YARD::Rake::YardocTask.new do |task|
25
- task.files = [File.join('lib','**','*.rb')]
26
-
27
- task.options += ['--files','CHANGELOG.md,LICENSE.txt,TODO.md']
28
- task.options += ['--readme','README.md']
29
-
30
- task.options << '--protected' # Show protected methods
31
- task.options += ['--template-path',File.join('yard','templates')]
32
- task.options += ['--title',"YardGhurt v#{YardGhurt::VERSION} Doc"]
21
+ task.files = ['lib/**/*.rb']
22
+ task.options.push('--title',"YardGhurt v#{YardGhurt::VERSION}")
33
23
  end
34
24
 
35
25
  YardGhurt::GFMFixTask.new do |task|
36
- task.arg_names = %i[ dev ]
26
+ task.arg_names = %i[dev]
37
27
  task.dry_run = false
38
28
  task.fix_code_langs = true
39
29
 
40
- task.before = proc do |t2,args|
41
- # Do not delete 'file.README.html', as we need it for testing.
30
+ task.before = proc do |task2,args|
31
+ # NOTE: Do not delete `file.README.html`, as we need it for testing.
42
32
 
43
- # Root dir of my GitHub Page for CSS/JS
33
+ # Root dir of my GitHub Page for CSS/JS.
44
34
  ghp_root_dir = YardGhurt.to_bool(args.dev) ? '../../esotericpig.github.io' : '../../..'
45
35
 
46
- t2.css_styles << %Q(<link rel="stylesheet" type="text/css" href="#{ghp_root_dir}/css/prism.css" />)
47
- t2.js_scripts << %Q(<script src="#{ghp_root_dir}/js/prism.js"></script>)
36
+ task2.css_styles << %(<link rel="stylesheet" type="text/css" href="#{ghp_root_dir}/css/prism.css" />)
37
+ task2.js_scripts << %(<script src="#{ghp_root_dir}/js/prism.js"></script>)
48
38
  end
49
39
  end
50
40
 
data/bin/yard_ghurt CHANGED
@@ -4,15 +4,13 @@
4
4
 
5
5
  #--
6
6
  # This file is part of YardGhurt.
7
- # Copyright (c) 2020-2021 Jonathan Bradley Whited
7
+ # Copyright (c) 2020 Bradley Whited
8
8
  #
9
9
  # SPDX-License-Identifier: LGPL-3.0-or-later
10
10
  #++
11
11
 
12
-
13
12
  require 'yard_ghurt'
14
13
 
15
-
16
14
  # @since 1.2.0
17
15
  yg = YardGhurt::App.new
18
16
  yg.run