rundoc 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/rundoc/parser.rb +1 -1
- data/lib/rundoc/version.rb +1 -1
- data/test/fixtures/rails_4/rundoc.md +5 -7
- data/test/fixtures/rails_5/rundoc.md +1 -1
- data/test/fixtures/rails_6/rundoc.md +2 -2
- data/test/fixtures/rails_7/rundoc.md +2 -2
- data/test/rundoc/regex_test.rb +22 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ffd4e661f146495e1f5a1c450ab4b053a0c625a980ef877c9d1b77b1061a9a0
|
4
|
+
data.tar.gz: e2fa4c55862c6bb84a5aa5c9fd393942a47991ec8b7af6ecfe74a6bcfae91d3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ebdd506647124c812344520d0ed85a3c28cfc0443fba6d1436a3605c7b2156f99a9620f58bc56125303aeca3a33eef5bc84a17cc7031d9d86793c498203b492
|
7
|
+
data.tar.gz: 1dec5d073813c7b3853ee29b9e6425a74e201eb14adb47c9eb662f17ccc5e1e35644d463e93e80d5bf315e235ff50d9533e9c67ebd43f1041770d6fd154d3f7c
|
data/CHANGELOG.md
CHANGED
data/lib/rundoc/parser.rb
CHANGED
@@ -2,7 +2,7 @@ module Rundoc
|
|
2
2
|
class Parser
|
3
3
|
DEFAULT_KEYWORD = ":::"
|
4
4
|
INDENT_BLOCK = '(?<before_indent>(^\s*$\n|\A)(^(?:[ ]{4}|\t))(?<indent_contents>.*)(?<after_indent>[^\s].*$\n?(?:(?:^\s*$\n?)*^(?:[ ]{4}|\t).*[^\s].*$\n?)*))'
|
5
|
-
GITHUB_BLOCK = '^(?<fence>(?<fence_char>~|`){3,})\s*?(?<lang>\w+)?\s*?\n(?<contents>.*?)^\g<fence>\g<fence_char>*\s*?\n'
|
5
|
+
GITHUB_BLOCK = '^(?<fence>(?<fence_char>~|`){3,})\s*?(?<lang>\w+)?\s*?\n(?<contents>.*?)^\g<fence>\g<fence_char>*\s*?\n?'
|
6
6
|
CODEBLOCK_REGEX = /(#{GITHUB_BLOCK})/m
|
7
7
|
COMMAND_REGEX = ->(keyword) {
|
8
8
|
/^#{keyword}(?<tag>(\s|=|-|>)?(=|-|>)?)\s*(?<command>(\S)+)\s+(?<statement>.*)$/
|
data/lib/rundoc/version.rb
CHANGED
@@ -252,13 +252,11 @@ Provision a Postgresql database using Add-ons.
|
|
252
252
|
>A `mini` Postgres size costs [$5 a month, prorated to the minute](https://elements.heroku.com/addons/heroku-postgresql). At the end of this tutorial, you will be prompted to [delete your database](https://devcenter.heroku.com/articles/heroku-postgresql#removing-the-add-on) to minimize costs.
|
253
253
|
|
254
254
|
```term
|
255
|
-
$ heroku addons:create heroku-postgresql:
|
256
|
-
Creating heroku-postgresql:
|
257
|
-
Database
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
Created postgresql-encircled-75487 as DATABASE_URL
|
255
|
+
$ heroku addons:create heroku-postgresql:essential-0
|
256
|
+
Creating heroku-postgresql:essential-0 on ⬢ shrouded-anchorage-34700... ~$0.007/hour (max $5/month)
|
257
|
+
Database should be available soon
|
258
|
+
postgresql-encircled-75487 is being created in the background. The app will restart when complete...
|
259
|
+
Use heroku addons:info postgresql-encircled-75487 to check creation progress
|
262
260
|
Use heroku addons:docs heroku-postgresql to view documentation
|
263
261
|
```
|
264
262
|
|
@@ -249,7 +249,7 @@ Provision a Postgresql database using Add-ons.
|
|
249
249
|
>A `mini` Postgres size costs [$5 a month, prorated to the minute](https://elements.heroku.com/addons/heroku-postgresql). At the end of this tutorial, you will be prompted to [delete your database](https://devcenter.heroku.com/articles/heroku-postgresql#removing-the-add-on) to minimize costs.
|
250
250
|
|
251
251
|
```term
|
252
|
-
:::>> $ heroku addons:create heroku-postgresql:
|
252
|
+
:::>> $ heroku addons:create heroku-postgresql:essential-0
|
253
253
|
```
|
254
254
|
|
255
255
|
Your Heroku app now has access to a Postgresql database. The credentials are stored in the `DATABASE_URL` environment variable, which Rails will connect to by convention.
|
@@ -279,7 +279,7 @@ Provision a [Heroku Postgres](https://devcenter.heroku.com/articles/heroku-postg
|
|
279
279
|
>A `mini` Postgres size costs [$5 a month, prorated to the minute](https://elements.heroku.com/addons/heroku-postgresql). At the end of this tutorial, we prompt you to [delete your database](https://devcenter.heroku.com/articles/heroku-postgresql#removing-the-add-on) to minimize costs.
|
280
280
|
|
281
281
|
```term
|
282
|
-
:::>> $ heroku addons:create heroku-postgresql:
|
282
|
+
:::>> $ heroku addons:create heroku-postgresql:essential-0
|
283
283
|
```
|
284
284
|
|
285
285
|
Your Heroku app can now access this Postgres database. The `DATABASE_URL` environment variable stores your credentials, which Rails connects to by convention.
|
@@ -315,7 +315,7 @@ To use an interactive shell session instead, you can execute `heroku run bash`.
|
|
315
315
|
|
316
316
|
## Scale and Access the Application
|
317
317
|
|
318
|
-
Heroku runs application code using defined processes and [process types](procfile). New applications don't a process type active by default. The following command scales your app up to one dyno, running the `web` process:
|
318
|
+
Heroku runs application code using defined processes and [process types](procfile). New applications don't have a process type active by default. The following command scales your app up to one dyno, running the `web` process:
|
319
319
|
|
320
320
|
```term
|
321
321
|
:::>- $ heroku ps:scale web=1
|
@@ -251,7 +251,7 @@ Provision a [Heroku Postgres](https://devcenter.heroku.com/articles/heroku-postg
|
|
251
251
|
>A `mini` Postgres size costs [$5 a month, prorated to the minute](https://elements.heroku.com/addons/heroku-postgresql). At the end of this tutorial, we prompt you to [delete your database](https://devcenter.heroku.com/articles/heroku-postgresql#removing-the-add-on) to minimize costs.
|
252
252
|
|
253
253
|
```term
|
254
|
-
:::>> $ heroku addons:create heroku-postgresql:
|
254
|
+
:::>> $ heroku addons:create heroku-postgresql:essential-0
|
255
255
|
```
|
256
256
|
|
257
257
|
Your Heroku app can now access this Postgres database. The `DATABASE_URL` environment variable stores your credentials, which Rails connects to by convention.
|
@@ -287,7 +287,7 @@ To use an interactive shell session instead, you can execute `heroku run bash`.
|
|
287
287
|
|
288
288
|
## Scale and Access the Application
|
289
289
|
|
290
|
-
Heroku runs application code using defined processes and [process types](procfile). New applications don't a process type active by default. The following command scales your app up to one dyno, running the `web` process:
|
290
|
+
Heroku runs application code using defined processes and [process types](procfile). New applications don't have a process type active by default. The following command scales your app up to one dyno, running the `web` process:
|
291
291
|
|
292
292
|
```term
|
293
293
|
:::>- $ heroku ps:scale web=1
|
data/test/rundoc/regex_test.rb
CHANGED
@@ -190,4 +190,26 @@ class RegexTest < Minitest::Test
|
|
190
190
|
|
191
191
|
assert_equal contents.strip, match.to_s.strip
|
192
192
|
end
|
193
|
+
|
194
|
+
def test_codeblock_optional_newline_regex
|
195
|
+
code_block_with_newline = <<~MD
|
196
|
+
hi
|
197
|
+
```
|
198
|
+
:::>> $ echo "hello"
|
199
|
+
```
|
200
|
+
MD
|
201
|
+
code_block_without_newline = code_block_with_newline.strip
|
202
|
+
|
203
|
+
expected = <<~MD.strip
|
204
|
+
```
|
205
|
+
:::>> $ echo "hello"
|
206
|
+
```
|
207
|
+
MD
|
208
|
+
regex = Rundoc::Parser::CODEBLOCK_REGEX
|
209
|
+
match = code_block_with_newline.match(regex)
|
210
|
+
assert_equal expected, match.to_s.strip
|
211
|
+
|
212
|
+
match = code_block_without_newline.match(regex)
|
213
|
+
assert_equal expected, match.to_s.strip
|
214
|
+
end
|
193
215
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rundoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -259,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
259
259
|
- !ruby/object:Gem::Version
|
260
260
|
version: '0'
|
261
261
|
requirements: []
|
262
|
-
rubygems_version: 3.5.
|
262
|
+
rubygems_version: 3.5.9
|
263
263
|
signing_key:
|
264
264
|
specification_version: 4
|
265
265
|
summary: RunDOC generates runable code from docs
|