Skip to content

Commit

Permalink
Merge pull request #2222 from jqnatividad/1981-replace-jql-with-jaq
Browse files Browse the repository at this point in the history
`fetch` & `fetchpost`: replace jql with jaq
  • Loading branch information
jqnatividad authored Oct 20, 2024
2 parents fb1af0f + 3d76f77 commit fa14a58
Show file tree
Hide file tree
Showing 16 changed files with 429 additions and 363 deletions.
138 changes: 51 additions & 87 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ jsonschema = { version = "0.23", features = [
"resolve-file",
"resolve-http",
], default-features = false }
jql-runner = { version = "7.2", default-features = false, optional = true }
local-encoding = { version = "0.2", optional = true }
localzone = { version = "0.3", features = ["auto_validation"] }
log = "0.4"
Expand Down Expand Up @@ -221,7 +220,6 @@ self_update = { version = "0.41", features = [
semver = "1"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
serde_stacker = { version = "0.1", optional = true }
serde_urlencoded = { version = "0.7", optional = true }
simple-expand-tilde = { version = "0.4.3", optional = true }
smallvec = "1"
Expand Down Expand Up @@ -356,10 +354,8 @@ fetch = [
"flate2",
"governor",
"hashbrown",
"jql-runner",
"publicsuffix",
"redis",
"serde_stacker",
"serde_urlencoded",
"simple-expand-tilde",
]
Expand Down
4 changes: 2 additions & 2 deletions contrib/completions/examples/qsv.bash
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ _qsv() {
return 0
;;
qsv__fetch)
opts="-h --url-template --new-column --jql --jqlfile --pretty --rate-limit --timeout --http-header --max-retries --max-errors --store-error --cookies --user-agent --report --no-cache --mem-cache-size --disk-cache --disk-cache-dir --redis-cache --cache-error --flush-cache --output --no-headers --delimiter --progressbar --help"
opts="-h --url-template --new-column --jaq --jaqfile --pretty --rate-limit --timeout --http-header --max-retries --max-errors --store-error --cookies --user-agent --report --no-cache --mem-cache-size --disk-cache --disk-cache-dir --redis-cache --cache-error --flush-cache --output --no-headers --delimiter --progressbar --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand All @@ -1222,7 +1222,7 @@ _qsv() {
return 0
;;
qsv__fetchpost)
opts="-h --new-column --jql --jqlfile --pretty --rate-limit --timeout --http-header --compress --max-retries --max-errors --store-error --cookies --user-agent --report --no-cache --mem-cache-size --disk-cache --disk-cache-dir --redis-cache --cache-error --flush-cache --output --no-headers --delimiter --progressbar --help"
opts="-h --new-column --jaq --jaqfile --pretty --rate-limit --timeout --http-header --compress --max-retries --max-errors --store-error --cookies --user-agent --report --no-cache --mem-cache-size --disk-cache --disk-cache-dir --redis-cache --cache-error --flush-cache --output --no-headers --delimiter --progressbar --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand Down
8 changes: 4 additions & 4 deletions contrib/completions/examples/qsv.elv
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ set edit:completion:arg-completer[qsv] = {|@words|
&'qsv;fetch'= {
cand --url-template 'url-template'
cand --new-column 'new-column'
cand --jql 'jql'
cand --jqlfile 'jqlfile'
cand --jaq 'jaq'
cand --jaqfile 'jaqfile'
cand --pretty 'pretty'
cand --rate-limit 'rate-limit'
cand --timeout 'timeout'
Expand All @@ -441,8 +441,8 @@ set edit:completion:arg-completer[qsv] = {|@words|
}
&'qsv;fetchpost'= {
cand --new-column 'new-column'
cand --jql 'jql'
cand --jqlfile 'jqlfile'
cand --jaq 'jaq'
cand --jaqfile 'jaqfile'
cand --pretty 'pretty'
cand --rate-limit 'rate-limit'
cand --timeout 'timeout'
Expand Down
8 changes: 4 additions & 4 deletions contrib/completions/examples/qsv.fig.js
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,10 @@ const completion: Fig.Spec = {
name: "--new-column",
},
{
name: "--jql",
name: "--jaq",
},
{
name: "--jqlfile",
name: "--jaqfile",
},
{
name: "--pretty",
Expand Down Expand Up @@ -915,10 +915,10 @@ const completion: Fig.Spec = {
name: "--new-column",
},
{
name: "--jql",
name: "--jaq",
},
{
name: "--jqlfile",
name: "--jaqfile",
},
{
name: "--pretty",
Expand Down
8 changes: 4 additions & 4 deletions contrib/completions/examples/qsv.fish
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ complete -c qsv -n "__fish_qsv_using_subcommand explode" -l delimiter
complete -c qsv -n "__fish_qsv_using_subcommand explode" -s h -l help -d 'Print help'
complete -c qsv -n "__fish_qsv_using_subcommand fetch" -l url-template
complete -c qsv -n "__fish_qsv_using_subcommand fetch" -l new-column
complete -c qsv -n "__fish_qsv_using_subcommand fetch" -l jql
complete -c qsv -n "__fish_qsv_using_subcommand fetch" -l jqlfile
complete -c qsv -n "__fish_qsv_using_subcommand fetch" -l jaq
complete -c qsv -n "__fish_qsv_using_subcommand fetch" -l jaqfile
complete -c qsv -n "__fish_qsv_using_subcommand fetch" -l pretty
complete -c qsv -n "__fish_qsv_using_subcommand fetch" -l rate-limit
complete -c qsv -n "__fish_qsv_using_subcommand fetch" -l timeout
Expand All @@ -350,8 +350,8 @@ complete -c qsv -n "__fish_qsv_using_subcommand fetch" -l delimiter
complete -c qsv -n "__fish_qsv_using_subcommand fetch" -l progressbar
complete -c qsv -n "__fish_qsv_using_subcommand fetch" -s h -l help -d 'Print help'
complete -c qsv -n "__fish_qsv_using_subcommand fetchpost" -l new-column
complete -c qsv -n "__fish_qsv_using_subcommand fetchpost" -l jql
complete -c qsv -n "__fish_qsv_using_subcommand fetchpost" -l jqlfile
complete -c qsv -n "__fish_qsv_using_subcommand fetchpost" -l jaq
complete -c qsv -n "__fish_qsv_using_subcommand fetchpost" -l jaqfile
complete -c qsv -n "__fish_qsv_using_subcommand fetchpost" -l pretty
complete -c qsv -n "__fish_qsv_using_subcommand fetchpost" -l rate-limit
complete -c qsv -n "__fish_qsv_using_subcommand fetchpost" -l timeout
Expand Down
8 changes: 4 additions & 4 deletions contrib/completions/examples/qsv.nu
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ module completions {
export extern "qsv fetch" [
--url-template
--new-column
--jql
--jqlfile
--jaq
--jaqfile
--pretty
--rate-limit
--timeout
Expand All @@ -359,8 +359,8 @@ module completions {

export extern "qsv fetchpost" [
--new-column
--jql
--jqlfile
--jaq
--jaqfile
--pretty
--rate-limit
--timeout
Expand Down
8 changes: 4 additions & 4 deletions contrib/completions/examples/qsv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ Register-ArgumentCompleter -Native -CommandName 'qsv' -ScriptBlock {
'qsv;fetch' {
[CompletionResult]::new('--url-template', 'url-template', [CompletionResultType]::ParameterName, 'url-template')
[CompletionResult]::new('--new-column', 'new-column', [CompletionResultType]::ParameterName, 'new-column')
[CompletionResult]::new('--jql', 'jql', [CompletionResultType]::ParameterName, 'jql')
[CompletionResult]::new('--jqlfile', 'jqlfile', [CompletionResultType]::ParameterName, 'jqlfile')
[CompletionResult]::new('--jaq', 'jaq', [CompletionResultType]::ParameterName, 'jaq')
[CompletionResult]::new('--jaqfile', 'jaqfile', [CompletionResultType]::ParameterName, 'jaqfile')
[CompletionResult]::new('--pretty', 'pretty', [CompletionResultType]::ParameterName, 'pretty')
[CompletionResult]::new('--rate-limit', 'rate-limit', [CompletionResultType]::ParameterName, 'rate-limit')
[CompletionResult]::new('--timeout', 'timeout', [CompletionResultType]::ParameterName, 'timeout')
Expand Down Expand Up @@ -480,8 +480,8 @@ Register-ArgumentCompleter -Native -CommandName 'qsv' -ScriptBlock {
}
'qsv;fetchpost' {
[CompletionResult]::new('--new-column', 'new-column', [CompletionResultType]::ParameterName, 'new-column')
[CompletionResult]::new('--jql', 'jql', [CompletionResultType]::ParameterName, 'jql')
[CompletionResult]::new('--jqlfile', 'jqlfile', [CompletionResultType]::ParameterName, 'jqlfile')
[CompletionResult]::new('--jaq', 'jaq', [CompletionResultType]::ParameterName, 'jaq')
[CompletionResult]::new('--jaqfile', 'jaqfile', [CompletionResultType]::ParameterName, 'jaqfile')
[CompletionResult]::new('--pretty', 'pretty', [CompletionResultType]::ParameterName, 'pretty')
[CompletionResult]::new('--rate-limit', 'rate-limit', [CompletionResultType]::ParameterName, 'rate-limit')
[CompletionResult]::new('--timeout', 'timeout', [CompletionResultType]::ParameterName, 'timeout')
Expand Down
8 changes: 4 additions & 4 deletions contrib/completions/examples/qsv.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ _arguments "${_arguments_options[@]}" : \
_arguments "${_arguments_options[@]}" : \
'--url-template[]' \
'--new-column[]' \
'--jql[]' \
'--jqlfile[]' \
'--jaq[]' \
'--jaqfile[]' \
'--pretty[]' \
'--rate-limit[]' \
'--timeout[]' \
Expand Down Expand Up @@ -485,8 +485,8 @@ _arguments "${_arguments_options[@]}" : \
(fetchpost)
_arguments "${_arguments_options[@]}" : \
'--new-column[]' \
'--jql[]' \
'--jqlfile[]' \
'--jaq[]' \
'--jaqfile[]' \
'--pretty[]' \
'--rate-limit[]' \
'--timeout[]' \
Expand Down
1 change: 1 addition & 0 deletions resources/test/fetch_jaq_multiple.jaq
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ ."places"[0]."place name" ,."places"[0]."state abbreviation" ]
1 change: 1 addition & 0 deletions resources/test/fetch_jaq_single.jaq
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
."places"[0]."place name"
1 change: 0 additions & 1 deletion resources/test/fetch_jql_multiple.jql

This file was deleted.

1 change: 0 additions & 1 deletion resources/test/fetch_jql_single.jql

This file was deleted.

Loading

0 comments on commit fa14a58

Please sign in to comment.