curlyq 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfa73d5ba1b30f6b49b593c65306034ea6ce4e93d9d306e5a535009583f45638
4
- data.tar.gz: 76f451e89e6d9f5c3ffe3c1fb87621e1e90fec91ec259fa1d513d8fc6ddd5d40
3
+ metadata.gz: dbd33a3d0d828e3574fa1dbf41a4237f52cd489a11ca00ab9146753b5a0d4fda
4
+ data.tar.gz: 222d5f050317d2c7b12462d65155180fc8e2222d6b05c974f76fbfdc4a65371a
5
5
  SHA512:
6
- metadata.gz: 5cb5c0aa1e5907a524328e3931cb01a501b9a49b36ddc45388e97a115c81c58e16b05c99dffc95870e47eab5ff81db9af809f4d962f8e33ae42a0c90c0bc7d55
7
- data.tar.gz: da161b3b81821bfc6c09615c66927905d1a4f590879613aba0ed526015f06c281c372528ed597c488afd7933ab78c116247ab5545c29099e160e2e49293af90f
6
+ metadata.gz: 84b926cfda6623ea508582e4c0d03fe99fe0153e4ae40772509922fe0efe00917f28f6176c1144a0c7cfbb80f51591b6d7432143a6fe2b664f552cb65eb2caba
7
+ data.tar.gz: b8a81553defeae0797d297937432a3271de65810e9cfaf2d4d4bbde12b54c645940d8674bf2995263f170151c4295a5a73c142851031e9d4f84fd3a66b3f6983
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 0.0.15
2
+
3
+ 2024-10-25 10:31
4
+
5
+ #### IMPROVED
6
+
7
+ - Better error when no results, return nothing to STDOUT
8
+
1
9
  ### 0.0.14
2
10
 
3
11
  2024-10-25 10:26
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- curlyq (0.0.14)
4
+ curlyq (0.0.15)
5
5
  gli (~> 2.21.0)
6
6
  nokogiri (~> 1.16.0)
7
7
  selenium-webdriver (~> 4.16.0)
data/README.md CHANGED
@@ -13,7 +13,7 @@ _If you find this useful, feel free to [buy me some coffee][donate]._
13
13
  [jq]: https://github.com/jqlang/jq "Command-line JSON processor"
14
14
  [yq]: https://github.com/mikefarah/yq "yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor"
15
15
 
16
- The current version of `curlyq` is 0.0.14.
16
+ The current version of `curlyq` is 0.0.15.
17
17
 
18
18
  CurlyQ is a utility that provides a simple interface for curl, with additional features for things like extracting images and links, finding elements by CSS selector or XPath, getting detailed header info, and more. It's designed to be part of a scripting pipeline, outputting everything as structured data (JSON or YAML). It also has rudimentary support for making calls to JSON endpoints easier, but it's expected that you'll use something like [jq] to parse the output.
19
19
 
@@ -46,7 +46,7 @@ SYNOPSIS
46
46
  curlyq [global options] command [command options] [arguments...]
47
47
 
48
48
  VERSION
49
- 0.0.14
49
+ 0.0.15
50
50
 
51
51
  GLOBAL OPTIONS
52
52
  --help - Show this message
data/bin/curlyq CHANGED
@@ -149,10 +149,7 @@ command %i[html curl] do |c|
149
149
  output.delete_if(&:nil?)
150
150
  output.delete_if(&:empty?)
151
151
 
152
- if output.nil? || output.empty?
153
- print_out([], global_options[:yaml], raw: options[:raw], pretty: global_options[:pretty])
154
- Process.exit 1
155
- end
152
+ exit_now!('No results') if output.nil? || output.empty?
156
153
 
157
154
  output.map! { |o| o[options[:raw].to_sym] } if options[:raw]
158
155
 
@@ -492,10 +489,7 @@ command :images do |c|
492
489
  end
493
490
  end
494
491
 
495
- if output.nil? || output.empty?
496
- print_out([], global_options[:yaml], raw: options[:raw], pretty: global_options[:pretty])
497
- Process.exit 1
498
- end
492
+ exit_now!('No results') if output.nil? || output.empty?
499
493
 
500
494
  print_out(output, global_options[:yaml], pretty: global_options[:pretty])
501
495
  end
data/lib/curly/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Top level module for CurlyQ
2
2
  module Curly
3
3
  # Current version number
4
- VERSION = '0.0.14'
4
+ VERSION = '0.0.15'
5
5
  end
data/src/_README.md CHANGED
@@ -13,7 +13,7 @@ _If you find this useful, feel free to [buy me some coffee][donate]._
13
13
  [jq]: https://github.com/jqlang/jq "Command-line JSON processor"
14
14
  [yq]: https://github.com/mikefarah/yq "yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor"
15
15
 
16
- The current version of `curlyq` is <!--VER-->0.0.13<!--END VER-->.
16
+ The current version of `curlyq` is <!--VER-->0.0.14<!--END VER-->.
17
17
 
18
18
  CurlyQ is a utility that provides a simple interface for curl, with additional features for things like extracting images and links, finding elements by CSS selector or XPath, getting detailed header info, and more. It's designed to be part of a scripting pipeline, outputting everything as structured data (JSON or YAML). It also has rudimentary support for making calls to JSON endpoints easier, but it's expected that you'll use something like [jq] to parse the output.
19
19
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curlyq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra