helpema 4.0.221210 → 5.0.221213

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -30
  3. data/lib/helpema.rb +1 -44
  4. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a67c2f9a3a5481f978441ef416a1728d754002990dfb03237c949631836ead05
4
- data.tar.gz: 54b942322fa0059c494a45d7ba8a63b2266ea83a2486cfa32beb0c27f95c1fd4
3
+ metadata.gz: 0cc846b64938fbe9205c778b91c05269f7c302b519c207245d06008b29d74b1a
4
+ data.tar.gz: 1c175a3dad5b9ae1d189d1b4fc85195095e5c721d3accd8c12ec63c2caa77508
5
5
  SHA512:
6
- metadata.gz: a36106b836f299738037425d8087c51fbb977783d3b76ccfe18235ac07f2b0a5dfcdbaf8f1996fedf04793f88d2864ae04c05ba1edb158117797d7dee92d13f6
7
- data.tar.gz: 10c6abdeb86321c0b64f8fd275dc25e12c9cd4d2ae2e82dfb864f9898f42c3633202b79afe88f962732e5be9b97638a4cc181c1ce2eb3860a3b2ae967fbbf645
6
+ metadata.gz: 02a981918c3c2ec673c3079681cdf0a854e8eefaccd880962df20ede2189836b374630831defa5715156432b4f3db3ebbcace213ff7515c12873932f3383f593
7
+ data.tar.gz: 3e053f503707a61fe78e90cebdaf83011805eb1c3a8d7c0a619ff373e1b6a292e9edc82adfc169c6d937cfde93780952659444f9d1a3e86756f5a78dc9799df0
data/README.md CHANGED
@@ -1,14 +1,13 @@
1
1
  # Helpema
2
2
 
3
- * [VERSION 4.0.221210](https://github.com/carlosjhr64/helpema/releases)
3
+ * [VERSION 5.0.221213](https://github.com/carlosjhr64/helpema/releases)
4
4
  * [github](https://github.com/carlosjhr64/helpema)
5
5
  * [rubygems](https://rubygems.org/gems/helpema)
6
6
 
7
7
  ## DESCRIPTION:
8
8
 
9
- Meant to be an eclectic collection of useful single functions and wrappers.
10
-
11
- Featured function: `Helpema.requires "good ~>3.0", "bad ~>2.7", "ugly ~>1.8"`
9
+ Meant to be an eclectic collection of useful Linux command wrappers.
10
+ Facilitates creation of custom wrappers for any Linux command.
12
11
 
13
12
  ## INSTALL:
14
13
 
@@ -18,37 +17,13 @@ $ gem install helpema
18
17
 
19
18
  ## SYNOPSIS:
20
19
 
21
- ### Helpema.requires
20
+ Note that `Helpema` auto-loads assets as requested.
22
21
  ```ruby
23
22
  require 'helpema'
24
-
25
- ### requires ###
26
- # Ensure ruby's and helpema's version.
27
- # Returns the list of loaded gems.
28
- # For those quick little scripts one writes in one's bin
29
- # that annoyingly keep falling out of maintainance... right?
30
- Helpema.requires'
31
- ruby ~>3.0
32
- helpema ~>4.0
33
- base_convert ~>6.0
34
- entropia ~>1.0'
35
- #=> ["base_convert", "entropia"]
36
- ```
37
- ### Helpema::Refinements
38
- ```ruby
39
- using Helpema::Refinements
40
- RUBY_VERSION.satisfies?('~>3.1') #=> true
41
- '2.7.5'.satisfies?('~>3.1') #=> false
42
- begin
43
- requires 'ruby ~>9000'
44
- rescue
45
- msg = $!.message
46
- end
47
- msg #=> "ruby 3.1.2 not ~>9000"
23
+ include Helpema
48
24
  ```
49
25
  ### Helpema::Piper
50
26
  ```ruby
51
- include Helpema
52
27
  # These will raise RuntimeError unless version matches:
53
28
  Piper.validate_command('ruby', '^ruby 3.1.2p20', '--version')
54
29
  Piper.validate_command('ssss-split', 'Version: 0\.[567]$', '-v')
data/lib/helpema.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Helpema
2
- VERSION = '4.0.221210'
2
+ VERSION = '5.0.221213'
3
3
 
4
4
  autoload :Piper, 'helpema/piper.rb'
5
5
  autoload :Rubish, 'helpema/rubish.rb'
@@ -8,49 +8,6 @@ module Helpema
8
8
  autoload :ZBar, 'helpema/zbar.rb'
9
9
  autoload :GPG, 'helpema/gpg.rb'
10
10
  autoload :FFMPEG, 'helpema/ffmpeg.rb'
11
-
12
- module Refinements
13
- refine ::String do
14
- def satisfies?(*reqs)
15
- Gem::Requirement.new(*reqs).satisfied_by? Gem::Version.new(self)
16
- end
17
- end
18
-
19
- refine ::Kernel do
20
- def requires(*list)
21
- loaded = []
22
- list.each do |gems|
23
- gems.lines.each do |gemname_reqs|
24
- gemname, *reqs = gemname_reqs.split
25
- next unless gemname
26
- unless reqs.empty?
27
- case gemname
28
- when 'helpema'
29
- unless VERSION.satisfies?(*reqs)
30
- raise "helpema #{VERSION} not #{reqs.join(', ')}"
31
- end
32
- next
33
- when 'ruby'
34
- unless RUBY_VERSION.satisfies?(*reqs)
35
- raise "ruby #{RUBY_VERSION} not #{reqs.join(', ')}"
36
- end
37
- next
38
- else
39
- gem gemname, *reqs
40
- end
41
- end
42
- require gemname and loaded.push gemname
43
- end
44
- end
45
- return loaded
46
- end
47
- end
48
- end
49
-
50
- using Refinements
51
- def Helpema.requires(*list)
52
- Kernel.requires(*list)
53
- end
54
11
  end
55
12
 
56
13
  # Requires:
metadata CHANGED
@@ -1,19 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helpema
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.221210
4
+ version: 5.0.221213
5
5
  platform: ruby
6
6
  authors:
7
7
  - CarlosJHR64
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-10 00:00:00.000000000 Z
11
+ date: 2022-12-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
- Meant to be an eclectic collection of useful single functions and wrappers.
15
-
16
- Featured function: `Helpema.requires "good ~>3.0", "bad ~>2.7", "ugly ~>1.8"`
14
+ Meant to be an eclectic collection of useful Linux command wrappers.
15
+ Facilitates creation of custom wrappers for any Linux command.
17
16
  email: carlosjhr64@gmail.com
18
17
  executables: []
19
18
  extensions: []
@@ -48,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
47
  version: '0'
49
48
  requirements:
50
49
  - 'ruby: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [aarch64-linux]'
51
- - 'youtube-dl: 2021.06.06'
50
+ - 'youtube-dl: 2021.12.17'
52
51
  - 'ssss-split: 0.5'
53
52
  - 'ssss-combine: 0.5'
54
53
  - 'zbarcam: 0.23.90'
@@ -58,5 +57,6 @@ requirements:
58
57
  rubygems_version: 3.3.7
59
58
  signing_key:
60
59
  specification_version: 4
61
- summary: Meant to be an eclectic collection of useful single functions and wrappers.
60
+ summary: Meant to be an eclectic collection of useful Linux command wrappers. Facilitates
61
+ creation of custom wrappers for any Linux command.
62
62
  test_files: []