opn 1.0.59

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: '0391287178d37d13dcd9b1014f038e910b61e8ca6fa4cc7d5324e14455c47965'
4
+ data.tar.gz: 4baa2c6beb0407a1f288b135aeb175ca6c0b0247bed883d5b8af50b1d314fb07
5
+ SHA512:
6
+ metadata.gz: 308a505976d2b505ef1b341a34ab008331dcc5811bb4197fc5e40405491498f6a347031eb1bc5413b9f9ce61afdda8d95c14d933512294050b0ee99a5fbc3d14
7
+ data.tar.gz: 50d2494b020994e5718bf5040dbc066a01f5192c7ae7dff5ff009ec8462da1fe260aaa399a6e904ccd016411f1fde92246192c465da8c4ebfe81d37cfae83a21
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ module Opn
6
+
7
+ # ========================================================================= #
8
+ # === @use_colours
9
+ #
10
+ # Whether to use colours.
11
+ # ========================================================================= #
12
+ @use_colours = true
13
+
14
+ # ========================================================================= #
15
+ # === Opn.use_colours?
16
+ # ========================================================================= #
17
+ def self.use_colours?
18
+ @use_colours
19
+ end
20
+
21
+ # ========================================================================= #
22
+ # === Opn.disable_colours
23
+ #
24
+ # We can disable colours too.
25
+ # ========================================================================= #
26
+ def self.disable_colours
27
+ @use_colours = false
28
+ end
29
+
30
+ end
data/lib/opn/module.rb ADDED
@@ -0,0 +1,381 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ module Opn
6
+
7
+ require 'opn/version/version.rb'
8
+ require 'opn/colours.rb'
9
+
10
+ # ========================================================================= #
11
+ # === @be_verbose
12
+ #
13
+ # Whether we will be verbose or whether we will be not.
14
+ # ========================================================================= #
15
+ @be_verbose = true
16
+
17
+ # ========================================================================= #
18
+ # === Opn.be_verbose?
19
+ # ========================================================================= #
20
+ def self.be_verbose?
21
+ @be_verbose
22
+ end
23
+
24
+ # ========================================================================= #
25
+ # === Opn.namespace
26
+ #
27
+ # This is a simplified variant, if you just need the namespace.
28
+ #
29
+ # If you need more flexibility, then use Opn.opn() directly - it will
30
+ # support more arguments.
31
+ # ========================================================================= #
32
+ def self.namespace(
33
+ input, optional_extra_arguments = nil
34
+ )
35
+ Opn.opn(namespace: input) { optional_extra_arguments }
36
+ end
37
+
38
+ # ========================================================================= #
39
+ # === Opn.opn
40
+ #
41
+ # This is the main method of this project.
42
+ #
43
+ # If we wish to be silent or set other options, we can do this:
44
+ #
45
+ # Opn.opn :be_silent
46
+ # Opn.opn :no_newline
47
+ # Opn.opn :no_colours
48
+ # Opn.opn(namespace: 'YoThere')
49
+ # Opn.opn(namespace: '→')
50
+ # Opn.opn(namespace: 'YoThere', be_verbose: false)
51
+ #
52
+ # Since as of September 2017, we can also pad the output if a key called
53
+ # :padding is passed. The argument should be like this:
54
+ #
55
+ # padding: 18
56
+ #
57
+ # This means to use up to 18 characters, padding via ' '.
58
+ # ========================================================================= #
59
+ def self.opn(
60
+ use_colours = Opn.use_colours?,
61
+ be_verbose = be_verbose?,
62
+ use_this_as_namespace = ''
63
+ )
64
+ # ======================================================================= #
65
+ # === Default values
66
+ #
67
+ # First, some default variables for intrinsic behaviour of this method.
68
+ # ======================================================================= #
69
+ shall_we_append_a_colon_character = true # By default, we append ':'.
70
+ append_newline = false
71
+ use_padding = false
72
+ may_we_display_anything = true # If true then we will show output.
73
+ # ======================================================================= #
74
+ # Hardcoded colours follow next - grey and green are the current options.
75
+ # ======================================================================= #
76
+ grey = "\e[1;30m"
77
+ green = "\e[0;32m"
78
+ # ======================================================================= #
79
+ # Next keep a link towards the colour that we will use.
80
+ # ======================================================================= #
81
+ use_this_colour = grey
82
+ reset_terminal = "\e[0;37m"
83
+
84
+ # ======================================================================= #
85
+ # Work on the first argument given to this method next:
86
+ # ======================================================================= #
87
+ case use_colours
88
+ when :default
89
+ use_colours = Opn.use_colours?
90
+ when :use_colours
91
+ use_colours = true
92
+ when :no_colours
93
+ use_colours = false
94
+ be_verbose = be_verbose?
95
+ when :no_newline # This is the default anyway.
96
+ when :newline
97
+ append_newline = true
98
+ when :be_silent, :be_quiet
99
+ use_colours = @use_colours # This is the default. We restore it here.
100
+ be_verbose = false
101
+ when :be_verbose
102
+ use_colours = Opn.use_colours?
103
+ be_verbose = be_verbose?
104
+ end
105
+ case be_verbose
106
+ when nil
107
+ be_verbose = be_verbose?
108
+ when :be_quiet
109
+ be_verbose = false
110
+ end
111
+ # ======================================================================= #
112
+ # use_this_as_namespace = File.basename(__FILE__) # Could use this here.
113
+ # use_this_as_namespace = caller[0]
114
+ # ======================================================================= #
115
+ the_caller = caller
116
+ if use_this_as_namespace.empty? # This is the default case then.
117
+ if the_caller.size > 1
118
+ use_this_as_namespace = the_caller[1]
119
+ else
120
+ use_this_as_namespace = the_caller.first
121
+ end
122
+ end
123
+ # ======================================================================= #
124
+ # === use_colours
125
+ #
126
+ # Next, we will handle the case when use_colours is a Hash. This may
127
+ # quite often be the case, as a Hash is more flexible than most other
128
+ # "types" in Ruby.
129
+ #
130
+ # This can be used for e. g. namespace: 'RBT::Compile'
131
+ # ======================================================================= #
132
+ if use_colours.is_a? Hash
133
+ copy = use_colours.dup # Keep a reference copy here.
134
+ # =================================================================== #
135
+ # === :append_colon
136
+ # =================================================================== #
137
+ if use_colours.has_key? :append_colon
138
+ shall_we_append_a_colon_character = use_colours.delete(:append_colon)
139
+ end
140
+ # =================================================================== #
141
+ # === :use_this_as_namespace
142
+ # =================================================================== #
143
+ if use_colours.has_key? :use_this_as_namespace
144
+ use_this_as_namespace = use_colours.fetch(:use_this_as_namespace)
145
+ # =================================================================== #
146
+ # === :use_this_namespace
147
+ # =================================================================== #
148
+ elsif use_colours.has_key? :use_this_namespace
149
+ use_this_as_namespace = use_colours.fetch(:use_this_namespace)
150
+ # =================================================================== #
151
+ # === :namespace
152
+ # =================================================================== #
153
+ elsif use_colours.has_key? :namespace
154
+ use_this_as_namespace = use_colours.fetch(:namespace)
155
+ end
156
+ # =================================================================== #
157
+ # === :use_opn
158
+ # =================================================================== #
159
+ if use_colours.has_key? :use_opn
160
+ may_we_display_anything = use_colours.fetch(:use_opn)
161
+ end
162
+ # =================================================================== #
163
+ # === :be_verbose
164
+ # =================================================================== #
165
+ if use_colours.has_key? :be_verbose
166
+ be_verbose = use_colours.delete(:be_verbose)
167
+ end
168
+ use_colours = true # Restore the default again here, since it was a Hash before.
169
+ # ===================================================================== #
170
+ # === :use_colours
171
+ #
172
+ # Check for more keys though:
173
+ # ===================================================================== #
174
+ if copy.has_key? :use_colours
175
+ use_colours = copy.delete(:use_colours)
176
+ end
177
+ # ===================================================================== #
178
+ # === :trailing_colon
179
+ # ===================================================================== #
180
+ if copy.has_key? :trailing_colon
181
+ shall_we_append_a_colon_character = copy.delete(:trailing_colon)
182
+ # ===================================================================== #
183
+ # === :trailing_token
184
+ # ===================================================================== #
185
+ elsif copy.has_key? :trailing_token
186
+ shall_we_append_a_colon_character = copy.delete(:trailing_token)
187
+ # ===================================================================== #
188
+ # === :no_trailing
189
+ # ===================================================================== #
190
+ elsif copy.has_key? :no_trailing
191
+ shall_we_append_a_colon_character = copy.delete(:no_trailing)
192
+ end
193
+ # ===================================================================== #
194
+ # === Check for :padding value
195
+ # ===================================================================== #
196
+ if copy.has_key? :padding
197
+ use_padding = true
198
+ use_this_padding = copy.delete(:padding).to_i # Must be an Integer.
199
+ end
200
+ end
201
+ # ======================================================================= #
202
+ # Check for Hash as namespace.
203
+ # ======================================================================= #
204
+ if use_this_as_namespace.is_a?(Hash) and
205
+ use_this_as_namespace.has_key?(:namespace)
206
+ use_this_as_namespace = use_this_as_namespace.delete(:namespace)
207
+ end
208
+ # ======================================================================= #
209
+ # Next we split on the namespace, but this may be problematic when
210
+ # our input contains more than one ':' such as 'RBT::Compile'.
211
+ # In this case, we assume that the user is smarter than we are,
212
+ # and we will NOT split on such input provided.
213
+ # ======================================================================= #
214
+ if use_this_as_namespace.is_a? String
215
+ unless use_this_as_namespace.include? '::' # ^^^ See above for the explanation.
216
+ use_this_as_namespace = File.basename(use_this_as_namespace.split(':').first)
217
+ end
218
+ if use_this_as_namespace.include? '_' # Assume Camelcase provided here.
219
+ use_this_as_namespace = use_this_as_namespace.split('_').map(&:capitalize).join
220
+ else # Else upcase the first argument always.
221
+ if use_this_as_namespace.frozen?
222
+ use_this_as_namespace = use_this_as_namespace.dup
223
+ end
224
+ use_this_as_namespace[0,1] = use_this_as_namespace[0,1].upcase
225
+ end
226
+ # ======================================================================= #
227
+ # Do some sanitizing next, by getting rid of .rb entries.
228
+ # ======================================================================= #
229
+ use_this_as_namespace = use_this_as_namespace.sub(/\.rb/,'')
230
+ end
231
+ # ======================================================================= #
232
+ # === Handle blocks next.
233
+ # ======================================================================= #
234
+ if block_given?
235
+ yielded = yield
236
+ case yielded
237
+ when :no_trailing_colon,
238
+ :no_trailing_character,
239
+ :no_trailing_char,
240
+ :no_trailing,
241
+ :no_colon,
242
+ :no_semicolon,
243
+ :short
244
+ shall_we_append_a_colon_character = false
245
+ when :show_only_the_name_of_the_class,
246
+ :display_only_last_name
247
+ # =================================================================== #
248
+ # In this case, show only the name of the main class. But only
249
+ # if the namespace includes a '::'.
250
+ # =================================================================== #
251
+ if use_this_as_namespace.include? '::'
252
+ use_this_as_namespace = use_this_as_namespace.split('::').last
253
+ end
254
+ # ===================================================================== #
255
+ # === :no_colours
256
+ # ===================================================================== #
257
+ when :no_colours, :disable_colours
258
+ Opn.disable_colours
259
+ # ===================================================================== #
260
+ # Next, we ought to handle Hashes passed to this method via a block.
261
+ # ===================================================================== #
262
+ when Hash
263
+ # =================================================================== #
264
+ # === :append_colon
265
+ # =================================================================== #
266
+ if yielded.has_key? :append_colon
267
+ shall_we_append_a_colon_character = yielded.delete(:append_colon)
268
+ end
269
+ # =================================================================== #
270
+ # === :use_this_as_namespace
271
+ # =================================================================== #
272
+ if yielded.has_key?(:use_this_as_namespace)
273
+ use_this_as_namespace = yielded.delete :use_this_as_namespace
274
+ # =================================================================== #
275
+ # === :use_this_namespace
276
+ # =================================================================== #
277
+ elsif yielded.has_key?(:use_this_namespace)
278
+ use_this_as_namespace = yielded.delete :use_this_namespace
279
+ elsif yielded.has_key?(:namespace)
280
+ use_this_as_namespace = yielded.delete :namespace
281
+ elsif yielded.has_key?(:trailing_colon)
282
+ shall_we_append_a_colon_character = yielded.delete(:trailing_colon)
283
+ elsif yielded.has_key?(:use_colours)
284
+ use_colours = yielded.delete(:use_colours)
285
+ end
286
+ # =================================================================== #
287
+ # === :use_this_colour
288
+ #
289
+ # The user can override the colour here.
290
+ # =================================================================== #
291
+ if yielded.has_key? :use_this_colour
292
+ use_this_colour = return_escape_sequence_for_this_colour(
293
+ yielded[:use_this_colour]
294
+ )
295
+ end
296
+ end
297
+ end
298
+ _ = ''.dup
299
+ if use_colours
300
+ if use_this_colour.is_a? Symbol
301
+ # In this case we need to query the colour-code.
302
+ use_this_colour = Colours.remove_trailing_end_from(Colours.send(use_this_colour))
303
+ end
304
+ _ << use_this_colour
305
+ end
306
+ # ======================================================================= #
307
+ # Determine whether we shall append a colon character next:
308
+ # ======================================================================= #
309
+ if shall_we_append_a_colon_character and use_this_as_namespace.respond_to?(:end_with?)
310
+ unless use_this_as_namespace.end_with? '→' # The → is a general exception.
311
+ use_this_as_namespace << ':'
312
+ end
313
+ end
314
+ if use_this_as_namespace.is_a?(Hash) and use_this_as_namespace.empty?
315
+ use_this_as_namespace = ''.dup
316
+ end
317
+ if use_this_as_namespace
318
+ use_this_as_namespace << ' ' if use_this_as_namespace.end_with? ':'
319
+ end
320
+ # ======================================================================= #
321
+ # Honour padding-operations onto the main Namespace next.
322
+ # ======================================================================= #
323
+ if use_padding
324
+ use_this_as_namespace = use_this_as_namespace.ljust(use_this_padding)
325
+ end
326
+ # ======================================================================= #
327
+ # Add the separator here.
328
+ # ======================================================================= #
329
+ _ << use_this_as_namespace.to_s
330
+ _ << green+reset_terminal if use_colours
331
+ _ << "\n" if append_newline
332
+ if may_we_display_anything
333
+ print _ if be_verbose
334
+ end
335
+ return _
336
+ end
337
+
338
+ # ========================================================================= #
339
+ # === Opn.opne
340
+ #
341
+ # To test this, do:
342
+ # Opn.opne 'Hello world!'
343
+ # ========================================================================= #
344
+ def self.opne(i = '')
345
+ Opn.opn
346
+ puts i
347
+ end
348
+
349
+ # ========================================================================= #
350
+ # === opne
351
+ # ========================================================================= #
352
+ def opne(i = '')
353
+ Opn.opne(i)
354
+ end
355
+
356
+ # ========================================================================= #
357
+ # === Opn.return_escape_sequence_for_this_colour
358
+ #
359
+ # This method can return the proper colour code.
360
+ # ========================================================================= #
361
+ def self.return_escape_sequence_for_this_colour(
362
+ i = :green
363
+ )
364
+ i = i.to_sym
365
+ case i
366
+ when :grey
367
+ i = "\e[0;30m"
368
+ when :green
369
+ i = "\e[0;32m"
370
+ end
371
+ i
372
+ end
373
+
374
+ # ========================================================================= #
375
+ # === Opn.cadetblue
376
+ # ========================================================================= #
377
+ def self.cadetblue(i)
378
+ "\e[38;2;70;130;180m#{i}\e[0;37m"
379
+ end
380
+
381
+ end
data/lib/opn/opn.rb ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ require 'opn/module.rb'
6
+
7
+ # =========================================================================== #
8
+ # === opn (opn tag)
9
+ #
10
+ # This method will give the name of this script, with (optionally)
11
+ # colours.
12
+ # =========================================================================== #
13
+ def opn(
14
+ use_colours = :default,
15
+ be_verbose = true,
16
+ namespace = ''
17
+ )
18
+ Opn.opn(use_colours, be_verbose, namespace)
19
+ end; alias output_program_name opn # === output_program_name
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ module Opn
6
+
7
+ # ========================================================================= #
8
+ # === VERSION
9
+ # ========================================================================= #
10
+ VERSION = '1.0.59'
11
+
12
+ # ========================================================================= #
13
+ # === LAST_UPDATE
14
+ # ========================================================================= #
15
+ LAST_UPDATE = '07.02.2023'
16
+
17
+ end
data/lib/opn.rb ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ require 'opn/opn.rb'
data/opn.gemspec ADDED
@@ -0,0 +1,71 @@
1
+ # =========================================================================== #
2
+ # Gemspec for Project Opn.
3
+ # =========================================================================== #
4
+ require 'opn/version/version.rb'
5
+ require 'roebe/toplevel_methods/misc.rb'
6
+ require 'roebe'
7
+
8
+ Gem::Specification.new { |s|
9
+
10
+ s.name = 'opn'
11
+ s.version = Opn::VERSION
12
+ s.date = Time.now.strftime('%Y-%m-%d')
13
+
14
+ s.summary = <<-EOF
15
+
16
+ This library is called opn. It will simply output the
17
+ name of the class. Optionally, you can assign another
18
+ namespace to report with. For an explanation, just
19
+ look at the few examples under the test/ directory.
20
+
21
+ Why did I write it?
22
+
23
+ I wrote many different ruby classes, and sometimes they will
24
+ report information to me, but I don't know which file wrote
25
+ this. So I wanted to simply have output prefaced with the
26
+ name of the class in question, optionally to be colourized
27
+ as well, since that helps me on the commandline.
28
+
29
+ The name "opn" stands for "output program name".
30
+
31
+ Version 1.0.2 now has a proper module, called Opn,
32
+ and Opn has only one method called opn().
33
+
34
+
35
+ EOF
36
+
37
+ s.description = <<-EOF
38
+
39
+ This library is called opn. It will simply output the
40
+ name of the class. Optionally, you can assign another
41
+ namespace to report with. For an explanation, just
42
+ look at the few examples under the test/ directory.
43
+
44
+ Why did I write it?
45
+
46
+ I wrote many different ruby classes, and sometimes they will
47
+ report information to me, but I don't know which file wrote
48
+ this. So I wanted to simply have output prefaced with the
49
+ name of the class in question, optionally to be colourized
50
+ as well, since that helps me on the commandline.
51
+
52
+ The name "opn" stands for "output program name".
53
+
54
+ Version 1.0.2 now has a proper module, called Opn,
55
+ and Opn has only one method called opn().
56
+
57
+ EOF
58
+ require 'roebe'
59
+ s.extra_rdoc_files = %w()
60
+
61
+ s.authors = ['Robert A. Heiler']
62
+ s.email = Roebe.email?
63
+ s.files = Dir['**/*']
64
+ s.license = 'MIT'
65
+ s.homepage = 'https://rubygems.org/gems/opn'
66
+
67
+ s.required_ruby_version = '>= '+Roebe.third_most_stable_version_of_ruby
68
+ s.required_rubygems_version = '>= '+Gem::VERSION
69
+ s.rubygems_version = '>= '+Gem::VERSION
70
+
71
+ }
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # =========================================================================== #
4
+ require 'colours/autoinclude'
5
+ require 'opn/module'
6
+ require 'cliner'
7
+
8
+ NAMESPACE = inspect
9
+
10
+ # =========================================================================== #
11
+ # === palegoldenrod
12
+ # =========================================================================== #
13
+ def palegoldenrod(i)
14
+ ::Colours.palegoldenrod(i)
15
+ end
16
+ MAIN_NAMESPACE = { namespace: 'RBT::Compile' }
17
+ e ::Colours.slateblue('Seven (7)')+' examples for Opn.opn will come next -'
18
+ e 'and one example for Opn.namespace():'
19
+ cliner
20
+ e "(1) First, we test "+palegoldenrod("Opn.opn(namespace: 'YoThere')")
21
+ Opn.opn(namespace: 'YoThere'); e
22
+ cliner
23
+ e '(2) Next, we test '+palegoldenrod('Opn.opn(:no_colours)')
24
+ Opn.opn(:no_colours); e
25
+ cliner
26
+ e '(3) Next, we test '+palegoldenrod('Opn.opn')
27
+ Opn.opn; e
28
+ cliner
29
+ e '(4) Next, we test '+palegoldenrod('Opn.opn(use_colours: false)')
30
+ Opn.opn(use_colours: false); e
31
+ cliner
32
+ e '(5) Next, we test '+palegoldenrod('Opn.opn(MAIN_NAMESPACE)')+' - 4 times in total'
33
+ Opn.opn(MAIN_NAMESPACE); e
34
+ cliner
35
+ Opn.opn(MAIN_NAMESPACE); e
36
+ Opn.opn(MAIN_NAMESPACE); e
37
+ Opn.opn(MAIN_NAMESPACE); e
38
+ cliner
39
+ e '(6) Next, we will use the main namespace again but without '\
40
+ 'colours.'
41
+ e ' So: '+palegoldenrod('Opn.opn(namespace: MAIN_NAMESPACE, use_colours: false)')
42
+ Opn.opn(namespace: MAIN_NAMESPACE, use_colours: false); e
43
+ cliner
44
+ e '(7) Next, testing '+palegoldenrod('Opn.namespace NAMESPACE')
45
+ Opn.namespace NAMESPACE; e
46
+ cliner
47
+ e '(8) Next, testing '+palegoldenrod('Opn.namespace("→")')
48
+ Opn.namespace('→'); e 'Hello there!'
49
+ cliner
50
+ e '(9) Next, testing '+palegoldenrod('Opn.namespace("John→Doe")')
51
+ Opn.namespace('John→Doe'); e 'Hello there!'
52
+ cliner
53
+ e '(10) Next, testing '+palegoldenrod('Opn.opn(padding: 18)')
54
+ Opn.opn(padding: 18); e 'Hello there!'
55
+ Opn.opn(padding: 12); e 'Hello there!'
56
+ Opn.opn(padding: 22); e 'Hello there!'
57
+ cliner
58
+ e '(11) Next, testing '+palegoldenrod('Opn.opn({:namespace=>"RBT::CreateAppDirSkeleton", :use_colours=>true, :use_opn=>false})')
59
+ Opn.opn(
60
+ {:namespace=>"RBT::CreateProgram", :use_colours=>true, :use_opn=>false}
61
+ )
62
+ cliner
63
+ e '(12) Next testing '+palegoldenrod('Opn.opn {{ use_this_colour: :green }}')+':'
64
+ Opn.opn {{ use_this_colour: :green }}; e
65
+ cliner
66
+ e '(13) Next testing '+whitesmoke('Opn.opn {{ use_this_colour: :whitesmoke }}')+':'
67
+ Opn.opn {{ use_this_colour: :whitesmoke }}; e
68
+ cliner
69
+ e '(14) Next testing '+palegoldenrod('Opn.opn {{ use_this_colour: :palegoldenrod }}')+':'
70
+ Opn.opn {{ use_this_colour: :palegoldenrod }}; e
71
+ cliner
72
+ e '(15) Next testing '+mediumpurple('Opn.opn {{ use_this_colour: :mediumpurple }}')+':'
73
+ Opn.opn {{ use_this_colour: :mediumpurple }}; e
74
+
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: opn
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.59
5
+ platform: ruby
6
+ authors:
7
+ - Robert A. Heiler
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-02-07 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: |2+
14
+
15
+ This library is called opn. It will simply output the
16
+ name of the class. Optionally, you can assign another
17
+ namespace to report with. For an explanation, just
18
+ look at the few examples under the test/ directory.
19
+
20
+ Why did I write it?
21
+
22
+ I wrote many different ruby classes, and sometimes they will
23
+ report information to me, but I don't know which file wrote
24
+ this. So I wanted to simply have output prefaced with the
25
+ name of the class in question, optionally to be colourized
26
+ as well, since that helps me on the commandline.
27
+
28
+ The name "opn" stands for "output program name".
29
+
30
+ Version 1.0.2 now has a proper module, called Opn,
31
+ and Opn has only one method called opn().
32
+
33
+ email: shevy@inbox.lt
34
+ executables: []
35
+ extensions: []
36
+ extra_rdoc_files: []
37
+ files:
38
+ - lib/opn.rb
39
+ - lib/opn/colours.rb
40
+ - lib/opn/module.rb
41
+ - lib/opn/opn.rb
42
+ - lib/opn/version/version.rb
43
+ - opn.gemspec
44
+ - test/testing_opn.rb
45
+ homepage: https://rubygems.org/gems/opn
46
+ licenses:
47
+ - MIT
48
+ metadata: {}
49
+ post_install_message:
50
+ rdoc_options: []
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: 2.7.6
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 3.4.5
63
+ requirements: []
64
+ rubygems_version: 3.4.5
65
+ signing_key:
66
+ specification_version: 4
67
+ summary: This library is called opn. It will simply output the name of the class.
68
+ Optionally, you can assign another namespace to report with. For an explanation,
69
+ just look at the few examples under the test/ directory. Why did I write it? I
70
+ wrote many different ruby classes, and sometimes they will report information to
71
+ me, but I don't know which file wrote this. So I wanted to simply have output prefaced
72
+ with the name of the class in question, optionally to be colourized as well, since
73
+ that helps me on the commandline. The name "opn" stands for "output program name". Version
74
+ 1.0.2 now has a proper module, called Opn, and Opn has only one method called opn().
75
+ test_files: []
76
+ ...