pls 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fa2ba719cfd78fadf6b1472179a1c406cbdadfda39b6453a2a5cc1f033aab0a
4
- data.tar.gz: 698fbb490d6d46877f7f53eb3224eb1041b9a779d4c548d8f1b408d943318232
3
+ metadata.gz: 5f648766cc73dcdeb5e8c5d229b12361b471a5e0795b956caeeb65339137034a
4
+ data.tar.gz: 686b5e21bdbfcc4cf047b31d82229b51ef9c46bf1dd65f5c78d7dda99ad337b4
5
5
  SHA512:
6
- metadata.gz: 573d06a91c3896be1884c22fffab1e65e4ca59c06252b9619d4f630b21c351b211ae24b99b5298710415593fda89bdcb7f8a9ad8bd900da4ff31529e96010c38
7
- data.tar.gz: d90d81f0d8948889ccfc7c12459cfb58d8426c9f5c73e8a2b4002624577a513f35379e48365d61da14063b0de578a31b5a06c4bf3ab45dbbc75302b5c80f2da4
6
+ metadata.gz: a3eca7062ae6ea7c79e19a191244c1ef25ac8068cd812b1e3bc1d199fc5069485580ad0f535627fd67223ef141a4312a8ae1d2298121126b927e0c1125473d0c
7
+ data.tar.gz: 2951092338d802aacf3e62958a67518dde7a74ef916efdabc15055ac40957f3d3e39f35d4a21b74a7a3653f5a4c4b149bb856b8edb58e3a1577c98d1ec28b5c3
@@ -0,0 +1,24 @@
1
+ # SPDX-FileCopyrightText: 2025 David Rabkin
2
+ # SPDX-License-Identifier: 0BSD
3
+ ---
4
+ name: actionlint
5
+ 'on':
6
+ push:
7
+ branches:
8
+ - master
9
+ pull_request:
10
+ branches:
11
+ - master
12
+ env:
13
+ URL: https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash # yamllint disable-line
14
+ jobs:
15
+ actionlint:
16
+ timeout-minutes: 15
17
+ runs-on: ubuntu-24.04
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Download actionlint
21
+ id: get_actionlint
22
+ run: bash <(curl "$URL")
23
+ - name: Check workflow files
24
+ run: ${{ steps.get_actionlint.outputs.executable }}
@@ -0,0 +1,37 @@
1
+ # SPDX-FileCopyrightText: 2025 David Rabkin
2
+ # SPDX-License-Identifier: 0BSD
3
+ ---
4
+ name: rake
5
+ 'on':
6
+ push:
7
+ branches:
8
+ - master
9
+ pull_request:
10
+ branches:
11
+ - master
12
+ jobs:
13
+ rake:
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ os:
18
+ - macos-13
19
+ - macos-14
20
+ - macos-15
21
+ - ubuntu-22.04
22
+ - ubuntu-24.04
23
+ - windows-2022
24
+ - windows-2025
25
+ ruby:
26
+ - 3.2
27
+ - 3.3
28
+ - 3.4
29
+ name: Rake on ${{ matrix.os }} / Ruby ${{ matrix.ruby }}
30
+ runs-on: ${{ matrix.os }}
31
+ steps:
32
+ - uses: actions/checkout@v4
33
+ - uses: ruby/setup-ruby@v1
34
+ with:
35
+ ruby-version: ${{ matrix.ruby }}
36
+ bundler-cache: true
37
+ - run: bundle exec rake
@@ -0,0 +1,18 @@
1
+ # SPDX-FileCopyrightText: 2025 David Rabkin
2
+ # SPDX-License-Identifier: 0BSD
3
+ ---
4
+ name: reuse
5
+ 'on':
6
+ push:
7
+ branches:
8
+ - master
9
+ pull_request:
10
+ branches:
11
+ - master
12
+ jobs:
13
+ reuse:
14
+ timeout-minutes: 15
15
+ runs-on: ubuntu-24.04
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: fsfe/reuse-action@v5
@@ -0,0 +1,20 @@
1
+ # SPDX-FileCopyrightText: 2023-2025 David Rabkin
2
+ # SPDX-License-Identifier: 0BSD
3
+ ---
4
+ name: rubocop
5
+ 'on':
6
+ push:
7
+ branches:
8
+ - master
9
+ pull_request:
10
+ branches:
11
+ - master
12
+ jobs:
13
+ rubocop:
14
+ timeout-minutes: 15
15
+ runs-on: ubuntu-24.04
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: andrewmcodes/rubocop-linter-action@v3.3.0
19
+ with:
20
+ exit_on_failure: true
@@ -0,0 +1,18 @@
1
+ # SPDX-FileCopyrightText: 2025 David Rabkin
2
+ # SPDX-License-Identifier: 0BSD
3
+ ---
4
+ name: typos
5
+ 'on':
6
+ push:
7
+ branches:
8
+ - master
9
+ pull_request:
10
+ branches:
11
+ - master
12
+ jobs:
13
+ typos:
14
+ timeout-minutes: 15
15
+ runs-on: ubuntu-24.04
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: crate-ci/typos@v1.34.0
@@ -0,0 +1,21 @@
1
+ # SPDX-FileCopyrightText: 2025 David Rabkin
2
+ # SPDX-License-Identifier: 0BSD
3
+ ---
4
+ name: yamllint
5
+ 'on':
6
+ push:
7
+ branches:
8
+ - master
9
+ pull_request:
10
+ branches:
11
+ - master
12
+ jobs:
13
+ yamllint:
14
+ timeout-minutes: 15
15
+ runs-on: ubuntu-24.04
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: ibiqlik/action-yamllint@v3
19
+ with:
20
+ file_or_dir: ./.github/*.yml ./.github/workflows/*.yml
21
+ strict: true
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ coverage/
2
+ .idea/
3
+ *.gem
4
+ .bundle/
5
+ .DS_Store
6
+ rdoc/
data/Gemfile CHANGED
@@ -1,14 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # vi:ts=2 sw=2 tw=79 et lbr wrap
4
- # Copyright 2021 by David Rabkin
4
+ # SPDX-FileCopyrightText: 2021-2025 David Rabkin
5
+ # SPDX-License-Identifier: 0BSD
5
6
 
6
7
  source 'https://rubygems.org'
7
- ruby '~>2.6'
8
-
9
- gem 'minitest', '5.11.3'
10
- gem 'pidfile', '0.3.0'
11
- gem 'rake', '13.0.1'
12
- gem 'rubocop', '0.76.0'
13
-
14
- # gemspec
8
+ gem 'httparty'
9
+ gem 'minitest'
10
+ gem 'rake'
11
+ gem 'rubocop'
data/Gemfile.lock ADDED
@@ -0,0 +1,57 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ ast (2.4.3)
5
+ bigdecimal (3.2.2)
6
+ csv (3.3.5)
7
+ httparty (0.23.1)
8
+ csv
9
+ mini_mime (>= 1.0.0)
10
+ multi_xml (>= 0.5.2)
11
+ json (2.13.2)
12
+ language_server-protocol (3.17.0.5)
13
+ lint_roller (1.1.0)
14
+ mini_mime (1.1.5)
15
+ minitest (5.25.5)
16
+ multi_xml (0.7.2)
17
+ bigdecimal (~> 3.1)
18
+ parallel (1.27.0)
19
+ parser (3.3.9.0)
20
+ ast (~> 2.4.1)
21
+ racc
22
+ prism (1.4.0)
23
+ racc (1.8.1)
24
+ rainbow (3.1.1)
25
+ rake (13.3.0)
26
+ regexp_parser (2.11.0)
27
+ rubocop (1.79.2)
28
+ json (~> 2.3)
29
+ language_server-protocol (~> 3.17.0.2)
30
+ lint_roller (~> 1.1.0)
31
+ parallel (~> 1.10)
32
+ parser (>= 3.3.0.2)
33
+ rainbow (>= 2.2.2, < 4.0)
34
+ regexp_parser (>= 2.9.3, < 3.0)
35
+ rubocop-ast (>= 1.46.0, < 2.0)
36
+ ruby-progressbar (~> 1.7)
37
+ unicode-display_width (>= 2.4.0, < 4.0)
38
+ rubocop-ast (1.46.0)
39
+ parser (>= 3.3.7.2)
40
+ prism (~> 1.4)
41
+ ruby-progressbar (1.13.0)
42
+ unicode-display_width (3.1.4)
43
+ unicode-emoji (~> 4.0, >= 4.0.4)
44
+ unicode-emoji (4.0.4)
45
+
46
+ PLATFORMS
47
+ arm64-darwin-24
48
+ ruby
49
+
50
+ DEPENDENCIES
51
+ httparty
52
+ minitest
53
+ rake
54
+ rubocop
55
+
56
+ BUNDLED WITH
57
+ 2.7.1
data/LICENSE CHANGED
@@ -1,12 +1,5 @@
1
- Copyright 2021 by David Rabkin
1
+ Copyright 2021-2025 David Rabkin
2
2
 
3
- Permission to use, copy, modify, and/or distribute this software for any
4
- purpose with or without fee is hereby granted.
3
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
5
4
 
6
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
12
- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
5
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
data/LICENSES/0BSD.txt ADDED
@@ -0,0 +1,5 @@
1
+ Copyright 2021-2025 David Rabkin
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
4
+
5
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
data/README.md CHANGED
@@ -1,17 +1,5 @@
1
- # Pls
2
- Package lister.
3
-
4
- [![Build
5
- Status](https://travis-ci.org/rdavid/pls.svg)](https://travis-ci.org/rdavid/pls)
6
- [![Build
7
- status](https://ci.appveyor.com/api/projects/status/yqxb43ltxrjj776a?svg=true)](https://ci.appveyor.com/project/rdavid/pls)
8
- ![Ruby](https://github.com/rdavid/pls/workflows/Ruby/badge.svg)
9
- [![Gem
10
- Version](https://badge.fury.io/rb/pls.svg)](https://badge.fury.io/rb/pls)
11
-
12
- [![Maintainability](https://api.codeclimate.com/v1/badges/5e21a1c1f8a3923584e3/maintainability)](https://codeclimate.com/github/rdavid/pls/maintainability)
13
- [![Hits-of-Code](https://hitsofcode.com/github/rdavid/pls)](https://hitsofcode.com/view/github/rdavid/pls)
14
- [![License](https://img.shields.io/badge/license-0BSD-green)](https://github.com/rdavid/pls/blob/master/LICENSE)
1
+ # Pls ![rake](https://github.com/rdavid/pls/workflows/rake/badge.svg) [![Gem Version](https://badge.fury.io/rb/pls.svg)](https://badge.fury.io/rb/pls) [![Hits-of-Code](https://hitsofcode.com/github/rdavid/pls)](https://hitsofcode.com/view/github/rdavid/pls) [![License](https://img.shields.io/badge/license-0BSD-green)](https://github.com/rdavid/pls/blob/master/LICENSE)
2
+ Prints the full NodeJS package dependency tree based on a given package name.
15
3
 
16
4
  * [About](#about)
17
5
  * [Installation](#installation)
@@ -19,11 +7,17 @@ Version](https://badge.fury.io/rb/pls.svg)](https://badge.fury.io/rb/pls)
19
7
  * [License](#license)
20
8
 
21
9
  ## About
22
- Hi, I'm [David Rabkin](http://davi.drabk.in).
10
+ Developers working with NodeJS use packages in their code. A package is a
11
+ functional NodeJS module that includes versioning, documentation, dependencies
12
+ (in the form of other packages), and more. NodeJS has a managed packages
13
+ environment called npm. npm is regularly updated with new packages and new
14
+ versions of existing packages. The user provides the name of the package for
15
+ analysis. The tool fetches the overall set of dependencies from the relevant
16
+ package manager, for the given package.
23
17
 
24
18
  ## Installation
25
19
  The tool is designed to work on macOS, GNU/Linux, Windows, Unix-like OS. It is
26
- packaged as a Gem and require Ruby version 2.6 or later. See “[Installing
20
+ packaged as a Gem and require Ruby version 3.2 or later. See “[Installing
27
21
  Ruby](https://www.ruby-lang.org/en/documentation/installation/)” if you don't
28
22
  have the proper version on your platform.
29
23
 
@@ -45,5 +39,5 @@ Use this command to update the package:
45
39
  pls -p express
46
40
 
47
41
  ## License
48
- Pls is copyright [David Rabkin](http://davi.drabk.in) and
49
- available under a [Zero-Claus BSD license](https://github.com/rdavid/pls/blob/master/LICENSE).
42
+ Pls is copyright [David Rabkin](http://cv.rabkin.co.il) and
43
+ available under a [Zero-Clause BSD license](https://github.com/rdavid/pls/blob/master/LICENSE).
data/REUSE.toml ADDED
@@ -0,0 +1,12 @@
1
+ # SPDX-FileCopyrightText: 2025 David Rabkin
2
+ # SPDX-License-Identifier: 0BSD
3
+ version = 1
4
+ [[annotations]]
5
+ path = [
6
+ ".gitignore",
7
+ "Gemfile.lock",
8
+ "README.md",
9
+ ]
10
+ precedence = "override"
11
+ SPDX-FileCopyrightText = "2025 David Rabkin"
12
+ SPDX-License-Identifier = "0BSD"
data/Rakefile CHANGED
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # vi:ts=2 sw=2 tw=79 et lbr wrap
4
- # Copyright 2021 by David Rabkin
4
+ # SPDX-FileCopyrightText: 2021-2025 David Rabkin
5
+ # SPDX-License-Identifier: 0BSD
5
6
 
6
7
  task default: %w[test]
7
8
 
data/bin/pls CHANGED
@@ -2,10 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  # vi:ts=2 sw=2 tw=79 et lbr wrap
5
- # Copyright 2021 by David Rabkin
5
+ # SPDX-FileCopyrightText: 2021-2025 David Rabkin
6
+ # SPDX-License-Identifier: 0BSD
6
7
 
7
- require 'pidfile'
8
8
  require_relative '../lib/pls'
9
9
 
10
- PidFile.new
11
10
  Pls::Pls.new.do
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # vi:ts=2 sw=2 tw=79 et lbr wrap
4
- # Copyright 2021 by David Rabkin
4
+ # SPDX-FileCopyrightText: 2021-2025 David Rabkin
5
+ # SPDX-License-Identifier: 0BSD
5
6
 
6
7
  require 'optparse'
7
8
 
@@ -22,16 +23,22 @@ module Pls
22
23
  end
23
24
 
24
25
  def initialize
26
+ ARGV << '-h' if ARGV.empty?
25
27
  @options = {}
26
28
  OptionParser.new do |o|
27
29
  o.banner = "Usage: #{File.basename($PROGRAM_NAME)} [options]."
28
30
  DIC.each { |f, p, d, t, k| o.on(f, p, t, d) { |i| @options[k] = i } }
29
31
  add(o)
30
32
  end.parse!
33
+ raise 'Please specify a package name with -p flag.' if pac.nil?
31
34
  end
32
35
 
33
- def dir
36
+ def pac
34
37
  @options[:pac]
35
38
  end
39
+
40
+ def url
41
+ 'https://registry.npmjs.org'
42
+ end
36
43
  end
37
44
  end
data/lib/pls/pls.rb CHANGED
@@ -1,21 +1,80 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # vi:ts=2 sw=2 tw=79 et lbr wrap
4
- # Copyright 2021 by David Rabkin
4
+ # SPDX-FileCopyrightText: 2021-2025 David Rabkin
5
+ # SPDX-License-Identifier: 0BSD
5
6
 
7
+ require 'httparty'
8
+ require 'json'
6
9
  require_relative 'configurator'
7
10
  require_relative 'reporter'
8
11
 
9
12
  module Pls
10
- # Transcodes any video file to m4v format.
13
+ # Data structure is hash, key - package name, val - array of hashes:
14
+ # {
15
+ # aaa => [
16
+ # bbb => [],
17
+ # ccc => [
18
+ # ddd => [],
19
+ # eee => []
20
+ # ]
21
+ # ]
22
+ # }
11
23
  class Pls
12
24
  def initialize
13
25
  @cfg = Configurator.new
14
26
  @rep = Reporter.new
27
+ @dat = {}
28
+ @mut_dat = Mutex.new
29
+ end
30
+
31
+ def read_http(pac)
32
+ url = "#{@cfg.url}/#{pac}/latest"
33
+ res = HTTParty.get(url)
34
+ raise "Unable to continue with #{url}." unless res.code == 200
35
+
36
+ res.body
37
+ end
38
+
39
+ def build_dep(dep) # rubocop:disable Metrics/MethodLength
40
+ arr = []
41
+ threads = []
42
+ mut = Mutex.new
43
+ dep.each_key do |pac|
44
+ threads << Thread.new(pac, arr) do |p, a|
45
+ dat = build(p)
46
+ mut.synchronize { a << dat }
47
+ end
48
+ end
49
+ threads.each(&:join)
50
+ arr
51
+ end
52
+
53
+ # Consider time validation for cache data.
54
+ def read_cache(pac)
55
+ arr = []
56
+ @mut_dat.synchronize { arr = @dat[pac] }
57
+ arr
58
+ end
59
+
60
+ def write_cache(pac, arr)
61
+ @mut_dat.synchronize { @dat[pac] = arr }
62
+ end
63
+
64
+ def build(pac)
65
+ arr = read_cache(pac)
66
+ if arr.to_a.empty?
67
+ str = read_http(pac)
68
+ doc = JSON.parse(str)
69
+ dep = doc['dependencies']
70
+ arr = dep.to_a.empty? ? [] : build_dep(dep)
71
+ write_cache(pac, arr)
72
+ end
73
+ { pac => arr }
15
74
  end
16
75
 
17
76
  def do
18
- @rep.do
77
+ @rep.do(build(@cfg.pac))
19
78
  end
20
79
  end
21
80
  end
data/lib/pls/reporter.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # vi:ts=2 sw=2 tw=79 et lbr wrap
4
- # Copyright 2021 by David Rabkin
4
+ # SPDX-FileCopyrightText: 2021-2025 David Rabkin
5
+ # SPDX-License-Identifier: 0BSD
5
6
 
6
7
  module Pls
7
8
  # Formats and prints output data.
@@ -10,8 +11,17 @@ module Pls
10
11
  @beg = Time.now.to_i
11
12
  end
12
13
 
13
- def do
14
- puts "Done in #{Time.now.to_i - @beg}."
14
+ def out(pac, del)
15
+ key = pac.keys[0]
16
+ del.times { print ' ' }
17
+ print key
18
+ puts "\n"
19
+ pac[key].each { |sub| out(sub, del + 2) }
20
+ end
21
+
22
+ def do(dat)
23
+ out(dat, 0)
24
+ puts "Done in #{Time.now.to_i - @beg} seconds."
15
25
  end
16
26
  end
17
27
  end
data/lib/pls/version.rb CHANGED
@@ -1,9 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # vi:ts=2 sw=2 tw=79 et lbr wrap
4
- # Copyright 2021 by David Rabkin
4
+ # SPDX-FileCopyrightText: 2021-2025 David Rabkin
5
+ # SPDX-License-Identifier: 0BSD
5
6
 
6
7
  module Pls
7
- VERSION = '1.0.1'
8
- DATE = '2021-02-12'
8
+ VERSION = '1.0.3'
9
+ DATE = '2025-08-06'
9
10
  end
data/lib/pls.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # vi:ts=2 sw=2 tw=79 et lbr wrap
4
- # Copyright 2021 by David Rabkin
4
+ # SPDX-FileCopyrightText: 2021-2025 David Rabkin
5
+ # SPDX-License-Identifier: 0BSD
5
6
 
6
7
  require_relative 'pls/pls'
7
8
  require_relative 'pls/version'
data/pls.gemspec CHANGED
@@ -1,15 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/lib')
3
+ # vi:ts=2 sw=2 tw=79 et lbr wrap
4
+ # SPDX-FileCopyrightText: 2021-2025 David Rabkin
5
+ # SPDX-License-Identifier: 0BSD
6
+
7
+ $LOAD_PATH.unshift File.expand_path('lib', __dir__)
4
8
 
5
9
  require 'pls'
6
10
 
7
11
  Gem::Specification.new do |s|
12
+ s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
13
+ s.required_ruby_version = '>= 3.2'
8
14
  s.name = 'pls'
9
15
  s.version = Pls::VERSION
10
16
  s.date = Pls::DATE
11
- s.required_ruby_version = '~> 2.6'
12
- s.summary = 'Package lister.'
17
+ s.summary = 'Package lister'
13
18
  s.description = <<-HERE
14
19
  Prints dependant package names.
15
20
  HERE
@@ -17,12 +22,9 @@ Gem::Specification.new do |s|
17
22
  s.author = 'David Rabkin'
18
23
  s.email = 'david@rabkin.co.il'
19
24
  s.homepage = 'https://github.com/rdavid/pls'
20
- s.files = Dir['{bin,lib}/**/*'] + Dir['[A-Z]*'] + ['pls.gemspec']
21
- s.executables = ['pls']
22
- s.extra_rdoc_files = ['LICENSE', 'README.md']
23
25
  s.require_paths = ['lib']
24
- s.add_runtime_dependency 'pidfile', '0.3.0'
25
- s.add_development_dependency 'minitest', '5.11.3'
26
- s.add_development_dependency 'rake', '13.0.1'
27
- s.add_development_dependency 'rubocop', '0.76.0'
26
+ s.files = `git ls-files`.split($RS)
27
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
28
+ s.extra_rdoc_files = ['LICENSE', 'README.md']
29
+ s.metadata['rubygems_mfa_required'] = 'true'
28
30
  end
data/test/test_pls.rb ADDED
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # vi:ts=2 sw=2 tw=79 et lbr wrap
4
+ # SPDX-FileCopyrightText: 2021-2025 David Rabkin
5
+ # SPDX-License-Identifier: 0BSD
6
+
7
+ require 'minitest/autorun'
8
+ require_relative '../lib/pls/pls'
9
+
10
+ # Main functions.
11
+ class TestPls < Minitest::Test
12
+ def setup
13
+ ARGV << '-pexpress'
14
+ @pls = Pls::Pls.new
15
+ end
16
+
17
+ def test_pls
18
+ @pls.do
19
+ end
20
+ end
metadata CHANGED
@@ -1,71 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pls
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rabkin
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2021-02-12 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: pidfile
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '='
18
- - !ruby/object:Gem::Version
19
- version: 0.3.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '='
25
- - !ruby/object:Gem::Version
26
- version: 0.3.0
27
- - !ruby/object:Gem::Dependency
28
- name: minitest
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '='
32
- - !ruby/object:Gem::Version
33
- version: 5.11.3
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '='
39
- - !ruby/object:Gem::Version
40
- version: 5.11.3
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '='
46
- - !ruby/object:Gem::Version
47
- version: 13.0.1
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '='
53
- - !ruby/object:Gem::Version
54
- version: 13.0.1
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - '='
60
- - !ruby/object:Gem::Version
61
- version: 0.76.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - '='
67
- - !ruby/object:Gem::Version
68
- version: 0.76.0
10
+ date: 2025-08-06 00:00:00.000000000 Z
11
+ dependencies: []
69
12
  description: " Prints dependant package names.\n"
70
13
  email: david@rabkin.co.il
71
14
  executables:
@@ -75,11 +18,20 @@ extra_rdoc_files:
75
18
  - LICENSE
76
19
  - README.md
77
20
  files:
21
+ - ".github/workflows/actionlint.yml"
22
+ - ".github/workflows/rake.yml"
23
+ - ".github/workflows/reuse.yml"
24
+ - ".github/workflows/rubocop.yml"
25
+ - ".github/workflows/typos.yml"
26
+ - ".github/workflows/yamllint.yml"
27
+ - ".gitignore"
78
28
  - Gemfile
29
+ - Gemfile.lock
79
30
  - LICENSE
31
+ - LICENSES/0BSD.txt
80
32
  - README.md
33
+ - REUSE.toml
81
34
  - Rakefile
82
- - appveyor.yml
83
35
  - bin/pls
84
36
  - lib/pls.rb
85
37
  - lib/pls/configurator.rb
@@ -87,27 +39,27 @@ files:
87
39
  - lib/pls/reporter.rb
88
40
  - lib/pls/version.rb
89
41
  - pls.gemspec
42
+ - test/test_pls.rb
90
43
  homepage: https://github.com/rdavid/pls
91
44
  licenses:
92
45
  - 0BSD
93
- metadata: {}
94
- post_install_message:
46
+ metadata:
47
+ rubygems_mfa_required: 'true'
95
48
  rdoc_options: []
96
49
  require_paths:
97
50
  - lib
98
51
  required_ruby_version: !ruby/object:Gem::Requirement
99
52
  requirements:
100
- - - "~>"
53
+ - - ">="
101
54
  - !ruby/object:Gem::Version
102
- version: '2.6'
55
+ version: '3.2'
103
56
  required_rubygems_version: !ruby/object:Gem::Requirement
104
57
  requirements:
105
58
  - - ">="
106
59
  - !ruby/object:Gem::Version
107
60
  version: '0'
108
61
  requirements: []
109
- rubygems_version: 3.1.4
110
- signing_key:
62
+ rubygems_version: 3.6.9
111
63
  specification_version: 4
112
- summary: Package lister.
64
+ summary: Package lister
113
65
  test_files: []
data/appveyor.yml DELETED
@@ -1,26 +0,0 @@
1
- ---
2
- version: '{build}'
3
- skip_tags: true
4
- clone_depth: 10
5
- branches:
6
- only:
7
- - master
8
- except:
9
- - gh-pages
10
- os: Windows Server 2012
11
- environment:
12
- matrix:
13
- - ruby_version: "26-x64"
14
- install:
15
- - ps: |
16
- $Env:PATH = "C:\Ruby${Env:ruby_version}\bin;${Env:PATH}"
17
- - bundle config --local path vendor/bundle
18
- - ruby -v
19
- - bundle -v
20
- build_script:
21
- - bundle update
22
- - bundle install
23
- test_script:
24
- - bundle exec rake --quiet
25
- cache:
26
- - vendor/bundle