pls 1.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3fa2ba719cfd78fadf6b1472179a1c406cbdadfda39b6453a2a5cc1f033aab0a
4
+ data.tar.gz: 698fbb490d6d46877f7f53eb3224eb1041b9a779d4c548d8f1b408d943318232
5
+ SHA512:
6
+ metadata.gz: 573d06a91c3896be1884c22fffab1e65e4ca59c06252b9619d4f630b21c351b211ae24b99b5298710415593fda89bdcb7f8a9ad8bd900da4ff31529e96010c38
7
+ data.tar.gz: d90d81f0d8948889ccfc7c12459cfb58d8426c9f5c73e8a2b4002624577a513f35379e48365d61da14063b0de578a31b5a06c4bf3ab45dbbc75302b5c80f2da4
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ # vi:ts=2 sw=2 tw=79 et lbr wrap
4
+ # Copyright 2021 by David Rabkin
5
+
6
+ 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
data/LICENSE ADDED
@@ -0,0 +1,12 @@
1
+ Copyright 2021 by David Rabkin
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for any
4
+ purpose with or without fee is hereby granted.
5
+
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.
data/README.md ADDED
@@ -0,0 +1,49 @@
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)
15
+
16
+ * [About](#about)
17
+ * [Installation](#installation)
18
+ * [Usage](#usage)
19
+ * [License](#license)
20
+
21
+ ## About
22
+ Hi, I'm [David Rabkin](http://davi.drabk.in).
23
+
24
+ ## Installation
25
+ 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
27
+ Ruby](https://www.ruby-lang.org/en/documentation/installation/)” if you don't
28
+ have the proper version on your platform.
29
+
30
+ Use this command to install:
31
+
32
+ gem install pls
33
+
34
+ ### Updating
35
+ Use this command to update the package:
36
+
37
+ gem update pls
38
+
39
+ ## Usage
40
+ pls [options]
41
+ -p, --pac package Package name.
42
+ -v, --version Shows version.
43
+
44
+ ### Example
45
+ pls -p express
46
+
47
+ ## 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).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ # vi:ts=2 sw=2 tw=79 et lbr wrap
4
+ # Copyright 2021 by David Rabkin
5
+
6
+ task default: %w[test]
7
+
8
+ task :test do
9
+ ruby 'test/test_pls.rb'
10
+ end
data/appveyor.yml ADDED
@@ -0,0 +1,26 @@
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
data/bin/pls ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # vi:ts=2 sw=2 tw=79 et lbr wrap
5
+ # Copyright 2021 by David Rabkin
6
+
7
+ require 'pidfile'
8
+ require_relative '../lib/pls'
9
+
10
+ PidFile.new
11
+ Pls::Pls.new.do
data/lib/pls.rb ADDED
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # vi:ts=2 sw=2 tw=79 et lbr wrap
4
+ # Copyright 2021 by David Rabkin
5
+
6
+ require_relative 'pls/pls'
7
+ require_relative 'pls/version'
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ # vi:ts=2 sw=2 tw=79 et lbr wrap
4
+ # Copyright 2021 by David Rabkin
5
+
6
+ require 'optparse'
7
+
8
+ module Pls
9
+ # Handles input parameters.
10
+ class Configurator
11
+ attr_reader :files
12
+
13
+ DIC = [
14
+ ['-p', '--pac package', 'Package name.', String, :pac]
15
+ ].freeze
16
+
17
+ def add(opt)
18
+ opt.on('-v', '--version', 'Show version.') do
19
+ puts "#{File.basename($PROGRAM_NAME)} #{VERSION} #{DATE}"
20
+ exit
21
+ end
22
+ end
23
+
24
+ def initialize
25
+ @options = {}
26
+ OptionParser.new do |o|
27
+ o.banner = "Usage: #{File.basename($PROGRAM_NAME)} [options]."
28
+ DIC.each { |f, p, d, t, k| o.on(f, p, t, d) { |i| @options[k] = i } }
29
+ add(o)
30
+ end.parse!
31
+ end
32
+
33
+ def dir
34
+ @options[:pac]
35
+ end
36
+ end
37
+ end
data/lib/pls/pls.rb ADDED
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # vi:ts=2 sw=2 tw=79 et lbr wrap
4
+ # Copyright 2021 by David Rabkin
5
+
6
+ require_relative 'configurator'
7
+ require_relative 'reporter'
8
+
9
+ module Pls
10
+ # Transcodes any video file to m4v format.
11
+ class Pls
12
+ def initialize
13
+ @cfg = Configurator.new
14
+ @rep = Reporter.new
15
+ end
16
+
17
+ def do
18
+ @rep.do
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # vi:ts=2 sw=2 tw=79 et lbr wrap
4
+ # Copyright 2021 by David Rabkin
5
+
6
+ module Pls
7
+ # Formats and prints output data.
8
+ class Reporter
9
+ def initialize
10
+ @beg = Time.now.to_i
11
+ end
12
+
13
+ def do
14
+ puts "Done in #{Time.now.to_i - @beg}."
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ # vi:ts=2 sw=2 tw=79 et lbr wrap
4
+ # Copyright 2021 by David Rabkin
5
+
6
+ module Pls
7
+ VERSION = '1.0.1'
8
+ DATE = '2021-02-12'
9
+ end
data/pls.gemspec ADDED
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/lib')
4
+
5
+ require 'pls'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = 'pls'
9
+ s.version = Pls::VERSION
10
+ s.date = Pls::DATE
11
+ s.required_ruby_version = '~> 2.6'
12
+ s.summary = 'Package lister.'
13
+ s.description = <<-HERE
14
+ Prints dependant package names.
15
+ HERE
16
+ s.license = '0BSD'
17
+ s.author = 'David Rabkin'
18
+ s.email = 'david@rabkin.co.il'
19
+ 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
+ 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'
28
+ end
metadata ADDED
@@ -0,0 +1,113 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pls
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - David Rabkin
8
+ autorequire:
9
+ bindir: bin
10
+ 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
69
+ description: " Prints dependant package names.\n"
70
+ email: david@rabkin.co.il
71
+ executables:
72
+ - pls
73
+ extensions: []
74
+ extra_rdoc_files:
75
+ - LICENSE
76
+ - README.md
77
+ files:
78
+ - Gemfile
79
+ - LICENSE
80
+ - README.md
81
+ - Rakefile
82
+ - appveyor.yml
83
+ - bin/pls
84
+ - lib/pls.rb
85
+ - lib/pls/configurator.rb
86
+ - lib/pls/pls.rb
87
+ - lib/pls/reporter.rb
88
+ - lib/pls/version.rb
89
+ - pls.gemspec
90
+ homepage: https://github.com/rdavid/pls
91
+ licenses:
92
+ - 0BSD
93
+ metadata: {}
94
+ post_install_message:
95
+ rdoc_options: []
96
+ require_paths:
97
+ - lib
98
+ required_ruby_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '2.6'
103
+ required_rubygems_version: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ requirements: []
109
+ rubygems_version: 3.1.4
110
+ signing_key:
111
+ specification_version: 4
112
+ summary: Package lister.
113
+ test_files: []