Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive mode #145

Merged
merged 38 commits into from
May 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6770f88
Add the interactive constructors
christopher-dG Mar 7, 2020
ce7d1fc
Add more cool prompts
christopher-dG Mar 9, 2020
c127b50
Fix some general interactive bugs, specialize for License
christopher-dG Mar 19, 2020
30fe9bb
Misc updates (mostly documentation)
christopher-dG Apr 14, 2020
2aca99c
Document interactive stuff, add a few tests
christopher-dG Apr 14, 2020
999f70a
Bump manifests
christopher-dG Apr 14, 2020
2d66db1
Fix interactive extra_versions for CI plugins
christopher-dG Apr 14, 2020
37c66ba
Fixes for 1.0
christopher-dG Apr 14, 2020
d54b644
Fix a bug or two, add some input tests
christopher-dG Apr 14, 2020
4ecd018
Add some logging to the tests
christopher-dG Apr 14, 2020
1fa1305
Add `generate` interactive shortcut (#128) and a missing deprecation
christopher-dG Apr 14, 2020
3a8db74
Try default Travis command to hopefully make interactive tests work
christopher-dG Apr 15, 2020
2202161
Include 1.5 in Julia version choices
christopher-dG Apr 15, 2020
1e686df
Simplify customizable field extension
christopher-dG Apr 15, 2020
c048030
Delete useless old test helper, add reference to unique!(f, xs)
christopher-dG Apr 20, 2020
2f664d2
Fix a Documenter bug, add some interactive plugin tests
christopher-dG Apr 21, 2020
7e26f43
Bump Documenter
christopher-dG Apr 21, 2020
059b87b
Fix conversion error (maybe)
christopher-dG Apr 23, 2020
e6c4b5c
Add at-plugin macro to save default values
christopher-dG Apr 23, 2020
e157265
Add default values to interactive prompts
christopher-dG Apr 24, 2020
24dec21
Replace Documenter{Nothing} with Documenter{NoDeploy}, fix some bugs
christopher-dG Apr 24, 2020
500649c
Add custom interactive method for Template
christopher-dG Apr 24, 2020
8fc35a8
Relax type parameters
christopher-dG Apr 24, 2020
7766420
Update/fix some tests
christopher-dG May 2, 2020
ad7a886
Test disabling default plugins
christopher-dG May 3, 2020
b140412
Add default keywords to License plugin
christopher-dG May 4, 2020
2fa622a
Fix tests for 1.0
christopher-dG May 5, 2020
2029efd
Make sure to show all menu options
christopher-dG May 5, 2020
9ede8dc
Update docs env, remove root Manifest
christopher-dG May 5, 2020
05caefd
Document `at-plugin`
christopher-dG May 6, 2020
632d1fd
Apply most of Curtis' suggestions
christopher-dG May 21, 2020
1f439cf
Apply more of Curtis' suggestions
christopher-dG May 25, 2020
8bcd6a3
Fix a MethodError
christopher-dG May 25, 2020
ba15a67
Revert a not-1.0-compatible change
christopher-dG May 25, 2020
d8d1886
Simplify plugin collection for new API
christopher-dG May 25, 2020
0741748
Catch interrupt exceptions and cancel gracefully
christopher-dG May 25, 2020
bab37a2
Offer version options that better match the current version
christopher-dG May 25, 2020
8f13009
Update version range
christopher-dG May 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/template.jl
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ function prompt(::Type{Template}, ::Type, ::Val{:host})
end

function prompt(::Type{Template}, ::Type, ::Val{:julia})
versions = map(format_version, [VERSION; map(v -> VersionNumber(1, v), 0:5)])
push!(sort!(unique!(versions)), "Other")
versions = map(format_version, map(v -> VersionNumber(1, v), 0:VERSION.minor))
christopher-dG marked this conversation as resolved.
Show resolved Hide resolved
push!(versions, "Other")
menu = RadioMenu(map(string, versions); pagesize=length(versions))
println("Select minimum Julia version:")
idx = request(menu)
Expand Down
23 changes: 12 additions & 11 deletions test/interactive.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,20 @@ end
end

@testset "Custom options, custom values" begin
nversions = VERSION.minor + 1
print(
stdin.buffer,
ALL, DONE, # Customize all fields
"user", LF, # Enter user
"a, b", LF, # Enter authors
"~", LF, # Enter dir
DOWN^3, CR, # Choose "Other" for host
"x.com", LF, # Enter host
DOWN^6, CR, # Choose "Other" for julia
"0.7", LF, # Enter Julia version
SELECT_DEFAULTS, # Pre-select default plugins
DONE, # Select no additional plugins
DONE^NDEFAULTS, # Don't customize plugins
ALL, DONE, # Customize all fields
"user", LF, # Enter user
"a, b", LF, # Enter authors
"~", LF, # Enter dir
DOWN^3, CR, # Choose "Other" for host
"x.com", LF, # Enter host
DOWN^nversions, CR, # Choose "Other" for julia
"0.7", LF, # Enter Julia version
SELECT_DEFAULTS, # Pre-select default plugins
DONE, # Select no additional plugins
DONE^NDEFAULTS, # Don't customize plugins
)
@test Template(; interactive=true) == Template(;
user="user",
Expand Down