program_information 1.2.7 → 1.2.8

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: 53e8bc28a72a4c97854d6ae0a999ea70bba84d0ceff8811c767afdbbdaa8db99
4
- data.tar.gz: c4ea22bf184c5eb7a5a356a68106d49d2174a25e0fff0e687f1efb832b13c543
3
+ metadata.gz: 423c820d72bf99567ed7ab239d47d8cf3e20d231cfa84ac5ccd1527f9b885eaa
4
+ data.tar.gz: 87738e4b3c93b518d90b59eba295103b9a34207714fafdb672c68611d8273062
5
5
  SHA512:
6
- metadata.gz: 239b16d41362f0ae71f4628f150d1f549f41d5bdccb9301135ab145308d6a6ceaeccb6b9e4db36d9c86d95c2e28fdfc241cf43ba602b886518c2355284f3a33c
7
- data.tar.gz: 97c9ac8257aaf588d403094da235de5706cc9187df0139dd88f04d0f7629f1c50535c971c02d408669a71c9dbc935033871252dab17566819dcd9097c932ef2b
6
+ metadata.gz: daa4357e1b473e0ad288774a986f6b507fc36199fa873974763b94665007209fbb4ce6d531eb02929b7e6d71e002953a70f091f57c80a6442ab84a0a7d4deb6c
7
+ data.tar.gz: 30681fae85df29685ad5824fa59087d47ee8d8106d3ec0624c0985b74bbab84842fa5ef1f9e7552954391bb98eb9220d247fbe660b577c45998ab332d28585b4
@@ -378,7 +378,8 @@ class ProgramInformation # === ProgramInformation::ProgramInformation
378
378
  # ======================================================================= #
379
379
  # i.delete!('_') if i.include? '_'
380
380
  return [
381
- @short_name, @program_version
381
+ @short_name,
382
+ @program_version
382
383
  ]
383
384
  end; alias rnav return_name_and_version # === rnav
384
385
 
@@ -456,23 +457,6 @@ class ProgramInformation # === ProgramInformation::ProgramInformation
456
457
  end
457
458
  end; alias determine_name_and_program_version determine_the_three_main_variables # === determine_name_and_program_version
458
459
 
459
- # ========================================================================== #
460
- # === set_real_short_name
461
- #
462
- # The instance variable @real_short_name is not allowed to include any
463
- # '-' characters. It may also not include any '_' characters.
464
- #
465
- # The latter could be found as part of program names such as "SDL_image".
466
- # The @short_name variant may include these '_' tokens.
467
- #
468
- # Note that as of September 2017, we also disallow '.' tokens, such as
469
- # may occur accidentally in input like "sendmail.5.8.2".
470
- # ========================================================================== #
471
- def set_real_short_name(i = @short_name)
472
- i = i.to_s.dup.delete('-_.').rstrip
473
- @real_short_name = i
474
- end
475
-
476
460
  # ========================================================================== #
477
461
  # === set_short_name
478
462
  #
@@ -694,6 +678,25 @@ class ProgramInformation # === ProgramInformation::ProgramInformation
694
678
  @input = i
695
679
  end
696
680
 
681
+ # ========================================================================== #
682
+ # === set_real_short_name
683
+ #
684
+ # The instance variable @real_short_name is not allowed to include any
685
+ # '-' characters. It may also not include any '_' characters.
686
+ #
687
+ # The latter could be found as part of program names such as "SDL_image".
688
+ # The @short_name variant may include these '_' tokens.
689
+ #
690
+ # Note that as of September 2017, we also disallow '.' tokens, such as
691
+ # may occur accidentally in input like "sendmail.5.8.2".
692
+ # ========================================================================== #
693
+ def set_real_short_name(
694
+ i = @short_name
695
+ )
696
+ i = i.to_s.dup.delete('-_.').rstrip
697
+ @real_short_name = i
698
+ end
699
+
697
700
  # ========================================================================== #
698
701
  # === run (run tag)
699
702
  # ========================================================================== #
@@ -55,7 +55,9 @@ module ProgramInformation
55
55
  #
56
56
  # The above would return "isocodes".
57
57
  # ========================================================================= #
58
- def self.return_real_short_name(of_this_program = '')
58
+ def self.return_real_short_name(
59
+ of_this_program = ''
60
+ )
59
61
  if of_this_program.nil? or of_this_program.empty?
60
62
  opnn; e 'Please provide some input to the method '\
61
63
  'ProgramInformation.return_real_short_name.'
@@ -96,6 +98,18 @@ module ProgramInformation
96
98
  return array
97
99
  end; self.instance_eval { alias return_short_name_and_version return_short_name_and_program_version } # === ProgramInformation.return_short_name_and__version
98
100
 
101
+ # ========================================================================= #
102
+ # === ProgramInformation.long_program_name?
103
+ #
104
+ # Usage example:
105
+ #
106
+ # ProgramInformation.long_program_name?('man-pages-6.7')
107
+ #
108
+ # ========================================================================= #
109
+ def self.long_program_name?(i)
110
+ return_short_name_and_version(i).first
111
+ end
112
+
99
113
  # ========================================================================= #
100
114
  # === ProgramInformation.return_array_name_and_version
101
115
  #
@@ -11,7 +11,7 @@ class ProgramInformation
11
11
  # ========================================================================= #
12
12
  # === VERSION
13
13
  # ========================================================================= #
14
- VERSION = '1.2.7'
14
+ VERSION = '1.2.8'
15
15
  DEFAULT_VERSION = VERSION # Use an "alias" to the above constant.
16
16
 
17
17
  # ========================================================================= #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: program_information
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert A. Heiler