rundoc 1.1.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/check_changelog.yml +16 -7
- data/.github/workflows/ci.yml +48 -0
- data/.standard.yml +6 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +1 -1
- data/README.md +98 -5
- data/Rakefile +9 -10
- data/lib/rundoc/cli.rb +15 -17
- data/lib/rundoc/code_command/background/log/clear.rb +1 -1
- data/lib/rundoc/code_command/background/log/read.rb +1 -1
- data/lib/rundoc/code_command/background/process_spawn.rb +8 -9
- data/lib/rundoc/code_command/background/start.rb +7 -7
- data/lib/rundoc/code_command/background/stop.rb +1 -1
- data/lib/rundoc/code_command/background/wait.rb +2 -2
- data/lib/rundoc/code_command/background.rb +6 -6
- data/lib/rundoc/code_command/bash/cd.rb +6 -7
- data/lib/rundoc/code_command/bash.rb +12 -13
- data/lib/rundoc/code_command/file_command/append.rb +12 -16
- data/lib/rundoc/code_command/file_command/remove.rb +6 -9
- data/lib/rundoc/code_command/no_such_command.rb +0 -1
- data/lib/rundoc/code_command/pipe.rb +2 -5
- data/lib/rundoc/code_command/print/erb.rb +48 -0
- data/lib/rundoc/code_command/print/text.rb +33 -0
- data/lib/rundoc/code_command/raw.rb +1 -1
- data/lib/rundoc/code_command/rundoc/depend_on.rb +0 -1
- data/lib/rundoc/code_command/rundoc/require.rb +2 -3
- data/lib/rundoc/code_command/rundoc_command.rb +3 -4
- data/lib/rundoc/code_command/website/driver.rb +17 -17
- data/lib/rundoc/code_command/website/navigate.rb +2 -2
- data/lib/rundoc/code_command/website/screenshot.rb +1 -1
- data/lib/rundoc/code_command/website/visit.rb +4 -5
- data/lib/rundoc/code_command/website.rb +4 -4
- data/lib/rundoc/code_command/write.rb +10 -11
- data/lib/rundoc/code_command.rb +28 -17
- data/lib/rundoc/code_section.rb +42 -25
- data/lib/rundoc/parser.rb +17 -19
- data/lib/rundoc/peg_parser.rb +57 -59
- data/lib/rundoc/version.rb +1 -1
- data/lib/rundoc.rb +10 -14
- data/rundoc.gemspec +19 -21
- data/test/fixtures/rails_4/rundoc.md +100 -33
- data/test/fixtures/rails_5/rundoc.md +77 -14
- data/test/fixtures/rails_6/rundoc.md +231 -167
- data/test/fixtures/rails_7/rundoc.md +477 -0
- data/test/integration/print_test.rb +194 -0
- data/test/rundoc/code_commands/append_file_test.rb +5 -8
- data/test/rundoc/code_commands/background_test.rb +3 -6
- data/test/rundoc/code_commands/bash_test.rb +12 -7
- data/test/rundoc/code_commands/pipe_test.rb +9 -9
- data/test/rundoc/code_commands/print_test.rb +94 -0
- data/test/rundoc/code_commands/remove_contents_test.rb +4 -5
- data/test/rundoc/code_section_test.rb +50 -56
- data/test/rundoc/parser_test.rb +28 -61
- data/test/rundoc/peg_parser_test.rb +49 -53
- data/test/rundoc/regex_test.rb +120 -127
- data/test/rundoc/test_parse_java.rb +1 -3
- data/test/test_helper.rb +4 -6
- metadata +39 -42
- data/.travis.yml +0 -8
- data/lib/rundoc/code_command/repl.rb +0 -37
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -25,61 +25,61 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: parslet
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: capybara
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: selenium-webdriver
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '4'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '4'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: base64
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: aws-sdk-s3
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: standard
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
description: RunDOC turns docs to runable code
|
154
168
|
email:
|
155
169
|
- richard.schneeman+rubygems@gmail.com
|
@@ -159,8 +173,9 @@ extensions: []
|
|
159
173
|
extra_rdoc_files: []
|
160
174
|
files:
|
161
175
|
- ".github/workflows/check_changelog.yml"
|
176
|
+
- ".github/workflows/ci.yml"
|
162
177
|
- ".gitignore"
|
163
|
-
- ".
|
178
|
+
- ".standard.yml"
|
164
179
|
- CHANGELOG.md
|
165
180
|
- Dockerfile
|
166
181
|
- Gemfile
|
@@ -183,8 +198,9 @@ files:
|
|
183
198
|
- lib/rundoc/code_command/file_command/remove.rb
|
184
199
|
- lib/rundoc/code_command/no_such_command.rb
|
185
200
|
- lib/rundoc/code_command/pipe.rb
|
201
|
+
- lib/rundoc/code_command/print/erb.rb
|
202
|
+
- lib/rundoc/code_command/print/text.rb
|
186
203
|
- lib/rundoc/code_command/raw.rb
|
187
|
-
- lib/rundoc/code_command/repl.rb
|
188
204
|
- lib/rundoc/code_command/rundoc/depend_on.rb
|
189
205
|
- lib/rundoc/code_command/rundoc/require.rb
|
190
206
|
- lib/rundoc/code_command/rundoc_command.rb
|
@@ -207,13 +223,16 @@ files:
|
|
207
223
|
- test/fixtures/rails_4/rundoc.md
|
208
224
|
- test/fixtures/rails_5/rundoc.md
|
209
225
|
- test/fixtures/rails_6/rundoc.md
|
226
|
+
- test/fixtures/rails_7/rundoc.md
|
210
227
|
- test/fixtures/require/dependency/rundoc.md
|
211
228
|
- test/fixtures/require/main/rundoc.md
|
212
229
|
- test/fixtures/screenshot/rundoc.md
|
230
|
+
- test/integration/print_test.rb
|
213
231
|
- test/rundoc/code_commands/append_file_test.rb
|
214
232
|
- test/rundoc/code_commands/background_test.rb
|
215
233
|
- test/rundoc/code_commands/bash_test.rb
|
216
234
|
- test/rundoc/code_commands/pipe_test.rb
|
235
|
+
- test/rundoc/code_commands/print_test.rb
|
217
236
|
- test/rundoc/code_commands/remove_contents_test.rb
|
218
237
|
- test/rundoc/code_section_test.rb
|
219
238
|
- test/rundoc/parser_test.rb
|
@@ -240,30 +259,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
259
|
- !ruby/object:Gem::Version
|
241
260
|
version: '0'
|
242
261
|
requirements: []
|
243
|
-
rubygems_version: 3.
|
262
|
+
rubygems_version: 3.5.3
|
244
263
|
signing_key:
|
245
264
|
specification_version: 4
|
246
265
|
summary: RunDOC generates runable code from docs
|
247
|
-
test_files:
|
248
|
-
- test/fixtures/build_logs/rundoc.md
|
249
|
-
- test/fixtures/depend_on/dependency/rundoc.md
|
250
|
-
- test/fixtures/depend_on/main/rundoc.md
|
251
|
-
- test/fixtures/java/rundoc.md
|
252
|
-
- test/fixtures/play/source.md
|
253
|
-
- test/fixtures/rails_4/rundoc.md
|
254
|
-
- test/fixtures/rails_5/rundoc.md
|
255
|
-
- test/fixtures/rails_6/rundoc.md
|
256
|
-
- test/fixtures/require/dependency/rundoc.md
|
257
|
-
- test/fixtures/require/main/rundoc.md
|
258
|
-
- test/fixtures/screenshot/rundoc.md
|
259
|
-
- test/rundoc/code_commands/append_file_test.rb
|
260
|
-
- test/rundoc/code_commands/background_test.rb
|
261
|
-
- test/rundoc/code_commands/bash_test.rb
|
262
|
-
- test/rundoc/code_commands/pipe_test.rb
|
263
|
-
- test/rundoc/code_commands/remove_contents_test.rb
|
264
|
-
- test/rundoc/code_section_test.rb
|
265
|
-
- test/rundoc/parser_test.rb
|
266
|
-
- test/rundoc/peg_parser_test.rb
|
267
|
-
- test/rundoc/regex_test.rb
|
268
|
-
- test/rundoc/test_parse_java.rb
|
269
|
-
- test/test_helper.rb
|
266
|
+
test_files: []
|
data/.travis.yml
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
require 'repl_runner'
|
2
|
-
|
3
|
-
module Rundoc
|
4
|
-
class CodeCommand
|
5
|
-
class Repl < Rundoc::CodeCommand
|
6
|
-
def initialize(command)
|
7
|
-
@command = command
|
8
|
-
@contents = ""
|
9
|
-
end
|
10
|
-
|
11
|
-
def keyword=(keyword)
|
12
|
-
@keyword = keyword
|
13
|
-
if keyword.to_s == "repl"
|
14
|
-
command_array = @command.split(" ")
|
15
|
-
@keyword = command_array.first
|
16
|
-
else
|
17
|
-
@command = "#{keyword} #{@command}"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def call(env = {})
|
22
|
-
puts "Running '#{@command}'' with repl: #{keyword}"
|
23
|
-
repl = ReplRunner.new(:"#{keyword}", @command)
|
24
|
-
@result = repl.zip(contents.strip).flatten.join("\n")
|
25
|
-
return @result
|
26
|
-
end
|
27
|
-
|
28
|
-
def to_md(env = {})
|
29
|
-
return "$ #{@command}"
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
|
36
|
-
Rundoc.register_code_command(:repl, Rundoc::CodeCommand::Repl)
|
37
|
-
Rundoc.register_code_command(:irb, Rundoc::CodeCommand::Repl)
|