rundoc 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +7 -0
- data/CHANGELOG.md +10 -0
- data/README.md +219 -96
- data/bin/rundoc +4 -68
- data/lib/rundoc.rb +1 -0
- data/lib/rundoc/cli.rb +84 -0
- data/lib/rundoc/code_command.rb +3 -2
- data/lib/rundoc/code_command/background/process_spawn.rb +28 -2
- data/lib/rundoc/code_command/background/start.rb +1 -0
- data/lib/rundoc/code_command/bash/cd.rb +20 -2
- data/lib/rundoc/code_command/no_such_command.rb +4 -0
- data/lib/rundoc/code_command/rundoc/depend_on.rb +37 -0
- data/lib/rundoc/code_command/rundoc/require.rb +41 -0
- data/lib/rundoc/code_command/rundoc_command.rb +4 -1
- data/lib/rundoc/code_command/website.rb +7 -0
- data/lib/rundoc/code_command/website/driver.rb +111 -0
- data/lib/rundoc/code_command/website/navigate.rb +29 -0
- data/lib/rundoc/code_command/website/screenshot.rb +28 -0
- data/lib/rundoc/code_command/website/visit.rb +47 -0
- data/lib/rundoc/code_section.rb +13 -4
- data/lib/rundoc/parser.rb +4 -3
- data/lib/rundoc/peg_parser.rb +1 -1
- data/lib/rundoc/version.rb +1 -1
- data/rundoc.gemspec +6 -2
- data/test/fixtures/build_logs/rundoc.md +56 -0
- data/test/fixtures/depend_on/dependency/rundoc.md +5 -0
- data/test/fixtures/depend_on/main/rundoc.md +10 -0
- data/test/fixtures/java/rundoc.md +9 -0
- data/test/fixtures/rails_4/rundoc.md +1 -1
- data/test/fixtures/rails_5/rundoc.md +3 -3
- data/test/fixtures/{rails_5_beta → rails_6}/rundoc.md +79 -86
- data/test/fixtures/require/dependency/rundoc.md +5 -0
- data/test/fixtures/require/main/rundoc.md +10 -0
- data/test/fixtures/screenshot/rundoc.md +10 -0
- data/test/rundoc/peg_parser_test.rb +33 -0
- metadata +71 -8
@@ -261,6 +261,39 @@ class PegParserTest < Minitest::Test
|
|
261
261
|
assert_equal("email = ENV['HEROKU_EMAIL'] || `heroku auth:whoami`", actual.original_args)
|
262
262
|
end
|
263
263
|
|
264
|
+
def test_rundoc_sub_commands_no_quotes
|
265
|
+
input = String.new
|
266
|
+
input << %Q{:::-- rundoc.depend_on ../foo/bar.md\n}
|
267
|
+
|
268
|
+
parser = Rundoc::PegParser.new.command_with_stdin
|
269
|
+
tree = parser.parse_with_debug(input)
|
270
|
+
|
271
|
+
actual = @transformer.apply(tree)
|
272
|
+
assert_equal :"rundoc.depend_on", actual.keyword
|
273
|
+
end
|
274
|
+
|
275
|
+
def test_seattle_style_method_call
|
276
|
+
input = String.new
|
277
|
+
input << %Q{rundoc.depend_on '../foo/bar.md'}
|
278
|
+
parser = Rundoc::PegParser.new.method_call
|
279
|
+
tree = parser.parse_with_debug(input)
|
280
|
+
|
281
|
+
actual = @transformer.apply(tree)
|
282
|
+
|
283
|
+
assert_equal :"rundoc.depend_on", actual.keyword
|
284
|
+
end
|
285
|
+
|
286
|
+
def test_rundoc_seattle_sub_command
|
287
|
+
input = String.new
|
288
|
+
input << %Q{:::>> rundoc.depend_on '../foo/bar.md'\n}
|
289
|
+
|
290
|
+
parser = Rundoc::PegParser.new.command
|
291
|
+
tree = parser.parse_with_debug(input)
|
292
|
+
|
293
|
+
actual = @transformer.apply(tree)
|
294
|
+
|
295
|
+
assert_equal :"rundoc.depend_on", actual.keyword
|
296
|
+
end
|
264
297
|
|
265
298
|
def test_positional_args
|
266
299
|
input = +""
|
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: 1.0.
|
4
|
+
version: 1.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:
|
11
|
+
date: 2019-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -52,6 +52,48 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: capybara
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: selenium-webdriver
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: aws-sdk-s3
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1'
|
55
97
|
- !ruby/object:Gem::Dependency
|
56
98
|
name: rake
|
57
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,7 +136,7 @@ dependencies:
|
|
94
136
|
- - ">="
|
95
137
|
- !ruby/object:Gem::Version
|
96
138
|
version: '0'
|
97
|
-
description:
|
139
|
+
description: RunDOC turns docs to runable code
|
98
140
|
email:
|
99
141
|
- richard.schneeman+rubygems@gmail.com
|
100
142
|
executables:
|
@@ -110,6 +152,7 @@ files:
|
|
110
152
|
- Rakefile
|
111
153
|
- bin/rundoc
|
112
154
|
- lib/rundoc.rb
|
155
|
+
- lib/rundoc/cli.rb
|
113
156
|
- lib/rundoc/code_command.rb
|
114
157
|
- lib/rundoc/code_command/background.rb
|
115
158
|
- lib/rundoc/code_command/background/log/clear.rb
|
@@ -126,17 +169,31 @@ files:
|
|
126
169
|
- lib/rundoc/code_command/pipe.rb
|
127
170
|
- lib/rundoc/code_command/raw.rb
|
128
171
|
- lib/rundoc/code_command/repl.rb
|
172
|
+
- lib/rundoc/code_command/rundoc/depend_on.rb
|
173
|
+
- lib/rundoc/code_command/rundoc/require.rb
|
129
174
|
- lib/rundoc/code_command/rundoc_command.rb
|
175
|
+
- lib/rundoc/code_command/website.rb
|
176
|
+
- lib/rundoc/code_command/website/driver.rb
|
177
|
+
- lib/rundoc/code_command/website/navigate.rb
|
178
|
+
- lib/rundoc/code_command/website/screenshot.rb
|
179
|
+
- lib/rundoc/code_command/website/visit.rb
|
130
180
|
- lib/rundoc/code_command/write.rb
|
131
181
|
- lib/rundoc/code_section.rb
|
132
182
|
- lib/rundoc/parser.rb
|
133
183
|
- lib/rundoc/peg_parser.rb
|
134
184
|
- lib/rundoc/version.rb
|
135
185
|
- rundoc.gemspec
|
186
|
+
- test/fixtures/build_logs/rundoc.md
|
187
|
+
- test/fixtures/depend_on/dependency/rundoc.md
|
188
|
+
- test/fixtures/depend_on/main/rundoc.md
|
189
|
+
- test/fixtures/java/rundoc.md
|
136
190
|
- test/fixtures/play/source.md
|
137
191
|
- test/fixtures/rails_4/rundoc.md
|
138
192
|
- test/fixtures/rails_5/rundoc.md
|
139
|
-
- test/fixtures/
|
193
|
+
- test/fixtures/rails_6/rundoc.md
|
194
|
+
- test/fixtures/require/dependency/rundoc.md
|
195
|
+
- test/fixtures/require/main/rundoc.md
|
196
|
+
- test/fixtures/screenshot/rundoc.md
|
140
197
|
- test/rundoc/code_commands/append_file_test.rb
|
141
198
|
- test/rundoc/code_commands/background_test.rb
|
142
199
|
- test/rundoc/code_commands/bash_test.rb
|
@@ -167,16 +224,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
224
|
- !ruby/object:Gem::Version
|
168
225
|
version: '0'
|
169
226
|
requirements: []
|
170
|
-
|
171
|
-
rubygems_version: 2.7.6
|
227
|
+
rubygems_version: 3.0.3
|
172
228
|
signing_key:
|
173
229
|
specification_version: 4
|
174
|
-
summary:
|
230
|
+
summary: RunDOC generates runable code from docs
|
175
231
|
test_files:
|
232
|
+
- test/fixtures/build_logs/rundoc.md
|
233
|
+
- test/fixtures/depend_on/dependency/rundoc.md
|
234
|
+
- test/fixtures/depend_on/main/rundoc.md
|
235
|
+
- test/fixtures/java/rundoc.md
|
176
236
|
- test/fixtures/play/source.md
|
177
237
|
- test/fixtures/rails_4/rundoc.md
|
178
238
|
- test/fixtures/rails_5/rundoc.md
|
179
|
-
- test/fixtures/
|
239
|
+
- test/fixtures/rails_6/rundoc.md
|
240
|
+
- test/fixtures/require/dependency/rundoc.md
|
241
|
+
- test/fixtures/require/main/rundoc.md
|
242
|
+
- test/fixtures/screenshot/rundoc.md
|
180
243
|
- test/rundoc/code_commands/append_file_test.rb
|
181
244
|
- test/rundoc/code_commands/background_test.rb
|
182
245
|
- test/rundoc/code_commands/bash_test.rb
|