libpath-ruby 0.2.2.1 → 0.2.2.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: bb00e0cfae7c3f659f2b1db1a0d65491b8458be3d129861815427a00ca6b85a2
4
- data.tar.gz: '09132f8eb4d1adb3fea11cca8eb2d8beaa824e25861387f2939a3e348eb6555b'
3
+ metadata.gz: 8996094361fb92d0b95118bea46f4e1652000d3ed54e5008895df5a7260bbd00
4
+ data.tar.gz: 613922a5a2d51de42327585ce3f23a0ebcb6f3d19d1b1066e3c9a54832412af9
5
5
  SHA512:
6
- metadata.gz: e0642b21c266ce97a09b1cca3c4b5e79eefa197a95398ab57dc6022ec8c1262a40592b4a1a350255551402a49f8d2a7596de4a78131bb1e8600f443eadbb9439
7
- data.tar.gz: a5ff1452f28d8e78bfe6c01333e1f94af191734ef795fbf6d63d753dfb5af2dcfdf0f3f135b3cf776686c831bdc93be57584a04c5bacd71532531da194a34f72
6
+ metadata.gz: ab2efbb8ace8b969c0d2f79bc42058a512aa6633d710e8fa3108f3400fbffc8b5d10bd76e30cb64234815524c9d32b3e4dac50aa6702b8175803764da204efd4
7
+ data.tar.gz: 227a0622eab1ea0da0d0d27ee7913fc7114c4ae00fcbd2ffc872eafcfd6017759d9b97a9597f59029223d63610ace45205c240db4a0f9d59dc988653d3333421
data/README.md CHANGED
@@ -28,7 +28,7 @@
28
28
  Install via **gem** as in:
29
29
 
30
30
  ```
31
- gem install libpath-ruby
31
+ gem install libpath-ruby
32
32
  ```
33
33
 
34
34
  or add it to your `Gemfile`.
@@ -4,7 +4,7 @@
4
4
  # Purpose: LibPath::Constants::Unix module
5
5
  #
6
6
  # Created: 29th January 2019
7
- # Updated: 6th April 2024
7
+ # Updated: 7th April 2024
8
8
  #
9
9
  # Home: http://github.com/synesissoftware/libpath.Ruby
10
10
  #
@@ -47,95 +47,95 @@
47
47
  =begin
48
48
  =end
49
49
 
50
- module LibPath # :nodoc:
51
- module Constants # :nodoc:
52
- module Unix # :nodoc:
50
+ module LibPath
51
+ module Constants
52
+ module Unix
53
53
 
54
- # Module defining instance functions that will be included and extended into
55
- # any class or module including/extending module LibPath::Constants::Unix
56
- module LibPath_Constants_Unix_Methods
54
+ # Module defining instance functions that will be included and extended into
55
+ # any class or module including/extending module LibPath::Constants::Unix
56
+ module LibPath_Constants_Unix_Methods
57
57
 
58
- # Defines invalid characters
59
- module InvalidCharacters
58
+ # Defines invalid characters
59
+ module InvalidCharacters
60
60
 
61
- # Innately invalid characters
62
- module Innate
61
+ # Innately invalid characters
62
+ module Innate
63
63
 
64
- # The list of characters
65
- LIST = [
64
+ # The list of characters
65
+ LIST = [
66
66
 
67
- "\0",
68
- ]
69
- # The regular expression
70
- RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
71
- end # module Innate
67
+ "\0",
68
+ ]
69
+ # The regular expression
70
+ RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
71
+ end # module Innate
72
72
 
73
- # Valid path name separator characters
74
- module PathNameSeparators
73
+ # Valid path name separator characters
74
+ module PathNameSeparators
75
75
 
76
- # The list of characters
77
- LIST = [
76
+ # The list of characters
77
+ LIST = [
78
78
 
79
- '/',
80
- ]
81
- # The regular expression
82
- RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
83
- end # module PathNameSeparators
79
+ '/',
80
+ ]
81
+ # The regular expression
82
+ RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
83
+ end # module PathNameSeparators
84
84
 
85
- # Valid path separator characters
86
- module PathSeparators
85
+ # Valid path separator characters
86
+ module PathSeparators
87
87
 
88
- # The list of characters
89
- LIST = [
88
+ # The list of characters
89
+ LIST = [
90
90
 
91
- ':',
92
- ]
93
- # The regular expression
94
- RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
95
- end # module PathSeparators
91
+ ':',
92
+ ]
93
+ # The regular expression
94
+ RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
95
+ end # module PathSeparators
96
96
 
97
- # Invalid shell characters
98
- module Shell
97
+ # Invalid shell characters
98
+ module Shell
99
99
 
100
- # The list of characters
101
- LIST = [
100
+ # The list of characters
101
+ LIST = [
102
102
 
103
- '*',
104
- '<',
105
- '>',
106
- '?',
107
- '|',
108
- ]
109
- # The regular expression
110
- RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
111
- end # module Shell
112
- end # module InvalidCharacters
113
- end # module LibPath_Constants_Unix_Methods
103
+ '*',
104
+ '<',
105
+ '>',
106
+ '?',
107
+ '|',
108
+ ]
109
+ # The regular expression
110
+ RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
111
+ end # module Shell
112
+ end # module InvalidCharacters
113
+ end # module LibPath_Constants_Unix_Methods
114
114
 
115
- # @!visibility private
116
- def self.extended receiver # :nodoc:
115
+ # @!visibility private
116
+ def self.extended receiver # :nodoc:
117
117
 
118
- receiver.class_eval do
118
+ receiver.class_eval do
119
119
 
120
- extend LibPath_Constants_Unix_Methods
120
+ extend LibPath_Constants_Unix_Methods
121
+ end
122
+
123
+ $stderr.puts "#{receiver} extended by #{LibPath_Constants_Unix_Methods}" if $DEBUG
121
124
  end
122
125
 
123
- $stderr.puts "#{receiver} extended by #{LibPath_Constants_Unix_Methods}" if $DEBUG
124
- end
126
+ # @!visibility private
127
+ def self.included receiver # :nodoc:
125
128
 
126
- # @!visibility private
127
- def self.included receiver # :nodoc:
129
+ receiver.class_eval do
128
130
 
129
- receiver.class_eval do
131
+ include LibPath_Constants_Unix_Methods
132
+ end
130
133
 
131
- include LibPath_Constants_Unix_Methods
134
+ $stderr.puts "#{receiver} included #{LibPath_Constants_Unix_Methods}" if $DEBUG
132
135
  end
133
136
 
134
- $stderr.puts "#{receiver} included #{LibPath_Constants_Unix_Methods}" if $DEBUG
135
- end
136
-
137
- extend LibPath_Constants_Unix_Methods
138
- include LibPath_Constants_Unix_Methods
137
+ extend LibPath_Constants_Unix_Methods
138
+ include LibPath_Constants_Unix_Methods
139
139
 
140
140
  end # module Unix
141
141
  end # module Constants
@@ -4,7 +4,7 @@
4
4
  # Purpose: LibPath::Constants::Windows module
5
5
  #
6
6
  # Created: 29th January 2019
7
- # Updated: 6th April 2024
7
+ # Updated: 7th April 2024
8
8
  #
9
9
  # Home: http://github.com/synesissoftware/libpath.Ruby
10
10
  #
@@ -47,96 +47,96 @@
47
47
  =begin
48
48
  =end
49
49
 
50
- module LibPath # :nodoc:
51
- module Constants # :nodoc:
52
- module Windows # :nodoc:
50
+ module LibPath
51
+ module Constants
52
+ module Windows
53
53
 
54
- # Module defining instance functions that will be included and extended into
55
- # any class or module including/extending module LibPath::Constants::Windows
56
- module LibPath_Constants_Windows_Details
54
+ # Module defining instance functions that will be included and extended into
55
+ # any class or module including/extending module LibPath::Constants::Windows
56
+ module LibPath_Constants_Windows_Details
57
57
 
58
- # Defines invalid characters
59
- module InvalidCharacters
58
+ # Defines invalid characters
59
+ module InvalidCharacters
60
60
 
61
- # Innately invalid characters
62
- module Innate
61
+ # Innately invalid characters
62
+ module Innate
63
63
 
64
- # The list of characters
65
- LIST = [
64
+ # The list of characters
65
+ LIST = [
66
66
 
67
- "\0",
68
- ]
69
- # The regular expression
70
- RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
71
- end # module Innate
67
+ "\0",
68
+ ]
69
+ # The regular expression
70
+ RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
71
+ end # module Innate
72
72
 
73
- # Valid path name separator characters
74
- module PathNameSeparators
73
+ # Valid path name separator characters
74
+ module PathNameSeparators
75
75
 
76
- # The list of characters
77
- LIST = [
76
+ # The list of characters
77
+ LIST = [
78
78
 
79
- "\\",
80
- '/',
81
- ]
82
- # The regular expression
83
- RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
84
- end # module PathNameSeparators
79
+ "\\",
80
+ '/',
81
+ ]
82
+ # The regular expression
83
+ RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
84
+ end # module PathNameSeparators
85
85
 
86
- # Valid path separator characters
87
- module PathSeparators
86
+ # Valid path separator characters
87
+ module PathSeparators
88
88
 
89
- # The list of characters
90
- LIST = [
89
+ # The list of characters
90
+ LIST = [
91
91
 
92
- ';',
93
- ]
94
- # The regular expression
95
- RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
96
- end # module PathSeparators
92
+ ';',
93
+ ]
94
+ # The regular expression
95
+ RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
96
+ end # module PathSeparators
97
97
 
98
- # Invalid shell characters
99
- module Shell
98
+ # Invalid shell characters
99
+ module Shell
100
100
 
101
- # The list of characters
102
- LIST = [
101
+ # The list of characters
102
+ LIST = [
103
103
 
104
- '*',
105
- '<',
106
- '>',
107
- '?',
108
- '|',
109
- ]
110
- # The regular expression
111
- RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
112
- end # module Shell
113
- end # module InvalidCharacters
114
- end # module LibPath_Constants_Windows_Details
104
+ '*',
105
+ '<',
106
+ '>',
107
+ '?',
108
+ '|',
109
+ ]
110
+ # The regular expression
111
+ RE = /[#{LIST.map { |m| Regexp.escape m }.join}]/
112
+ end # module Shell
113
+ end # module InvalidCharacters
114
+ end # module LibPath_Constants_Windows_Details
115
115
 
116
- # @!visibility private
117
- def self.extended receiver # :nodoc:
116
+ # @!visibility private
117
+ def self.extended receiver # :nodoc:
118
118
 
119
- receiver.class_eval do
119
+ receiver.class_eval do
120
120
 
121
- extend LibPath_Constants_Windows_Details
121
+ extend LibPath_Constants_Windows_Details
122
+ end
123
+
124
+ $stderr.puts "#{receiver} extended by #{LibPath_Constants_Windows_Details}" if $DEBUG
122
125
  end
123
126
 
124
- $stderr.puts "#{receiver} extended by #{LibPath_Constants_Windows_Details}" if $DEBUG
125
- end
127
+ # @!visibility private
128
+ def self.included receiver # :nodoc:
126
129
 
127
- # @!visibility private
128
- def self.included receiver # :nodoc:
130
+ receiver.class_eval do
129
131
 
130
- receiver.class_eval do
132
+ include LibPath_Constants_Windows_Details
133
+ end
131
134
 
132
- include LibPath_Constants_Windows_Details
135
+ $stderr.puts "#{receiver} included #{LibPath_Constants_Windows_Details}" if $DEBUG
133
136
  end
134
137
 
135
- $stderr.puts "#{receiver} included #{LibPath_Constants_Windows_Details}" if $DEBUG
136
- end
137
-
138
- extend LibPath_Constants_Windows_Details
139
- include LibPath_Constants_Windows_Details
138
+ extend LibPath_Constants_Windows_Details
139
+ include LibPath_Constants_Windows_Details
140
140
 
141
141
  end # module Windows
142
142
  end # module Constants
@@ -9,8 +9,9 @@ else
9
9
  require 'libpath/constants/unix'
10
10
  end
11
11
 
12
- module LibPath # :nodoc:
13
- module Constants # :nodoc:
12
+
13
+ module LibPath
14
+ module Constants
14
15
 
15
16
  if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
16
17
 
@@ -1,5 +1,6 @@
1
1
 
2
- module LibPath # :nodoc:
2
+ module LibPath
3
+ # @!visibility private
3
4
  module Diagnostics # :nodoc:
4
5
 
5
6
  # @!visibility private
@@ -5,7 +5,7 @@
5
5
  # Purpose: LibPathBaseException class
6
6
  #
7
7
  # Created: 30th January 2019
8
- # Updated: 6th April 2024
8
+ # Updated: 7th April 2024
9
9
  #
10
10
  # Home: http://github.com/synesissoftware/libpath.Ruby
11
11
  #
@@ -48,27 +48,26 @@
48
48
  =begin
49
49
  =end
50
50
 
51
- module LibPath # :nodoc:
52
- module Exceptions # :nodoc:
51
+ module LibPath
52
+ module Exceptions
53
53
 
54
- # Root exception for all LibPath exceptions
55
- #
56
- # NOTE: this class is abstract
57
- class LibPathBaseException < StandardError
54
+ # Root exception for all LibPath exceptions
55
+ #
56
+ # NOTE: this class is abstract
57
+ class LibPathBaseException < StandardError
58
58
 
59
59
  =begin
60
60
 
61
- # TODO include Xqsr3's WithCause
61
+ # TODO include Xqsr3's WithCause
62
62
  =end
63
63
 
64
- def self.new *args
64
+ def self.new *args
65
65
 
66
- raise NoMethodError, "private method `new' called for #{self}:Class" if self == LibPathBaseException
66
+ raise NoMethodError, "private method `new' called for #{self}:Class" if self == LibPathBaseException
67
67
 
68
- super
68
+ super
69
+ end
69
70
  end
70
- end
71
-
72
71
  end # module Exceptions
73
72
  end # module LibPath
74
73
 
@@ -5,7 +5,7 @@
5
5
  # Purpose: MalformedNameException class
6
6
  #
7
7
  # Created: 30th January 2019
8
- # Updated: 6th April 2024
8
+ # Updated: 13th April 2024
9
9
  #
10
10
  # Home: http://github.com/synesissoftware/libpath.Ruby
11
11
  #
@@ -45,39 +45,38 @@
45
45
  # ######################################################################## #
46
46
 
47
47
 
48
+ require 'libpath/exceptions/libpath_base_exception'
49
+
50
+
48
51
  =begin
49
52
  =end
50
53
 
51
- require 'libpath/exceptions/libpath_base_exception'
54
+ module LibPath
55
+ module Exceptions
52
56
 
57
+ # Exception thrown when a malformed name is encountered
58
+ class MalformedNameException < LibPathBaseException
53
59
 
54
- module LibPath # :nodoc:
55
- module Exceptions # :nodoc:
60
+ # Initialises an instance from the given +name+ and optional +message+
61
+ #
62
+ # * *Parameters:*
63
+ # - +name+ (String) The name that is malformed
64
+ # - +message+ (String) {optional} The message. If +nil+ the message "malformed name '#{name}'" is used
65
+ def initialize name, message = nil
56
66
 
57
- # Exception thrown when a malformed name is encountered
58
- class MalformedNameException < LibPathBaseException
67
+ unless message
59
68
 
60
- # Initialises an instance from the given +name+ and optional +message+
61
- #
62
- # * *Parameters:*
63
- # - +name+ (String) The name that is malformed
64
- # - +message+ (String) {optional} The message. If +nil+ the message "malformed name '#{name}'" is used
65
- def initialize name, message = nil
69
+ message = "malformed name '#{name}'"
70
+ end
66
71
 
67
- unless message
72
+ super message
68
73
 
69
- message = "malformed name '#{name}'"
74
+ @name = name
70
75
  end
71
76
 
72
- super message
73
-
74
- @name = name
77
+ # (String) The name that is malformed
78
+ attr_reader :name
75
79
  end
76
-
77
- # (String) The name that is malformed
78
- attr_reader :name
79
- end
80
-
81
80
  end # module Exceptions
82
81
  end # module LibPath
83
82