lslinks 0.1.1 → 0.2.0

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: 49fc1ca703395588f3dfcfa13f6a18116768aa48c4fe6d377fda1cb022f5814b
4
- data.tar.gz: dca70ea3062fb01d1b3cbe33c2f1e642cc21f2153b833cee53aa66ad26d41883
3
+ metadata.gz: aa7bd2c9cd6dcb396ebfcb7267b7a1d70118fe172da958b2df999ef50fcd1f34
4
+ data.tar.gz: f1cc6815ed745e323fe1478bd89bce0b0eb51eb0c8d20c64e7e038b95b1dfe64
5
5
  SHA512:
6
- metadata.gz: 83d50a41d79697d848ddb0cf2e20f4dad7200a2d938d58468853aeaf1cbbdd73e8170892f14e90e431562afe9edee89345fa507013cdb0f57b36087af3cc7b8b
7
- data.tar.gz: 6263fdff0d58c015680e220e747cedbfbb561bf464668659dbba41bdf8b611e1724be4b0059afc90336b5f3b090ae25c13eb232e46432229cf927ada60806cef
6
+ metadata.gz: ed1234dc4c584b720419060f199947df3cf5f17ec94cf132069deb834b84def678c713c42d3f116c57cef066e0440bf3d8df12cdf9be1b406238ef9760b4bb72
7
+ data.tar.gz: ab2bfbf88b4a19909cd114a01a086bf00e392abddac854a97c87832250a803a69e800fd3c61ad15b834b14bb483071ad8180b384cf37a9eba99d49d668361468
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # lslinks
2
2
 
3
+ [![License X11](https://img.shields.io/badge/license-X11-blue.svg)](https://raw.githubusercontent.com/nishidayuya/lslinks/master/LICENSE.txt)
4
+ [![Gem Version](https://badge.fury.io/rb/lslinks.svg)](https://rubygems.org/gems/lslinks)
5
+ [![Build Status](https://github.com/nishidayuya/lslinks/workflows/test/badge.svg)](https://github.com/nishidayuya/lslinks/actions?query=workflow%3Atest)
6
+
3
7
  A command line tool to list links. ls-like.
4
8
 
5
9
  ## Installation
data/Rakefile CHANGED
@@ -1,4 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "bundler/gem_tasks"
4
- task default: %i[]
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new do |t|
7
+ t.libs << "test"
8
+ t.test_files = FileList["test/**/*_test.rb"]
9
+ end
10
+
11
+ task(default: %i[test])
@@ -12,11 +12,12 @@ class Lslinks::OptionParser < OptionParser
12
12
  parser.separator("HTTP input options:")
13
13
  parser.on("--user-agent=USER_AGENT") # from curl wget
14
14
  parser.on("--referer=REFERER") # from curl wget
15
- parser.on("--header=HEADER") # from curl wget
15
+ parser.on("-H", "--header=HEADER") # from curl wget
16
+ parser.on("--compressed", "ignore. no effect.") # from curl
16
17
  options = {
17
18
  http_headers: {},
18
19
  }
19
- rest_args = parser.order(argv, into: options)
20
+ rest_args = parser.permute(argv, into: options)
20
21
  resource_name = rest_args.shift
21
22
  if !resource_name
22
23
  $stderr.puts(parser.help)
@@ -0,0 +1,3 @@
1
+ module Lslinks
2
+ VERSION = "0.2.0"
3
+ end
data/lib/lslinks.rb CHANGED
@@ -6,8 +6,6 @@ require "uri"
6
6
  require "nokogiri"
7
7
 
8
8
  module Lslinks
9
- VERSION = "0.1.1"
10
-
11
9
  class << self
12
10
  def debug?
13
11
  return "1" == ENV["LSLINKS_DEBUG"]
@@ -15,7 +13,7 @@ module Lslinks
15
13
  end
16
14
  end
17
15
 
18
- Pathname(__dir__).glob("**/*.rb").map { |path|
16
+ (Pathname(__dir__).glob("**/*.rb") - [Pathname(__FILE__)]).map { |path|
19
17
  path.sub_ext("")
20
18
  }.sort.each do |path|
21
19
  require(path.relative_path_from(__dir__))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lslinks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuya.Nishida.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-19 00:00:00.000000000 Z
11
+ date: 2023-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -61,6 +61,7 @@ files:
61
61
  - lib/lslinks/reader/file.rb
62
62
  - lib/lslinks/reader/http.rb
63
63
  - lib/lslinks/reader/stdin.rb
64
+ - lib/lslinks/version.rb
64
65
  - sig/lslinks.rbs
65
66
  homepage: https://github.com/nishidayuya/lslinks
66
67
  licenses: []
@@ -75,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
76
  requirements:
76
77
  - - ">="
77
78
  - !ruby/object:Gem::Version
78
- version: 2.6.0
79
+ version: 3.2.0
79
80
  required_rubygems_version: !ruby/object:Gem::Requirement
80
81
  requirements:
81
82
  - - ">="