opn 1.0.58

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of opn might be problematic. Click here for more details.

checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bea77df7a2e5347a902f29e48388d7c966bfe96e6d246674d41a41d92d276abb
4
+ data.tar.gz: 21b8bbe0b84149188b1137d7eba15d4fb3a53ecf31d7d130f7f7225baa3a4c59
5
+ SHA512:
6
+ metadata.gz: 2c80c751ecb38be57491ded0c162adc7726e8de80ee0799d29bd835455de995a72a213c81570b987c251dabdbf5755c1d893714103caaef83def050cba3ba90a
7
+ data.tar.gz: e8796364c792d85fb47070e88596505cbd2de2c361506f64bd7b942f106940e774b20cc23e914d1e93071c1962e1634d5bbbbdc3b26238acf6d118e40096282c
@@ -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,371 @@
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.
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, :display_only_last_name
246
+ # =================================================================== #
247
+ # In this case, show only the name of the main class. But only
248
+ # if the namespace includes a '::'.
249
+ # =================================================================== #
250
+ if use_this_as_namespace.include? '::'
251
+ use_this_as_namespace = use_this_as_namespace.split('::').last
252
+ end
253
+ # ===================================================================== #
254
+ # === :no_colours
255
+ # ===================================================================== #
256
+ when :no_colours, :disable_colours
257
+ Opn.disable_colours
258
+ # ===================================================================== #
259
+ # Next, we ought to handle Hashes passed to this method via a block.
260
+ # ===================================================================== #
261
+ when Hash
262
+ # =================================================================== #
263
+ # === :append_colon
264
+ # =================================================================== #
265
+ if yielded.has_key? :append_colon
266
+ shall_we_append_a_colon_character = yielded.delete(:append_colon)
267
+ end
268
+ # =================================================================== #
269
+ # === :use_this_as_namespace
270
+ # =================================================================== #
271
+ if yielded.has_key?(:use_this_as_namespace)
272
+ use_this_as_namespace = yielded.delete :use_this_as_namespace
273
+ # =================================================================== #
274
+ # === :use_this_namespace
275
+ # =================================================================== #
276
+ elsif yielded.has_key?(:use_this_namespace)
277
+ use_this_as_namespace = yielded.delete :use_this_namespace
278
+ elsif yielded.has_key?(:namespace)
279
+ use_this_as_namespace = yielded.delete :namespace
280
+ elsif yielded.has_key?(:trailing_colon)
281
+ shall_we_append_a_colon_character = yielded.delete(:trailing_colon)
282
+ elsif yielded.has_key?(:use_colours)
283
+ use_colours = yielded.delete(:use_colours)
284
+ end
285
+ if yielded.has_key? :use_this_colour
286
+ use_this_colour = return_escape_sequence_for_this_colour(
287
+ yielded[:use_this_colour]
288
+ )
289
+ end
290
+ end
291
+ end
292
+ _ = ''.dup
293
+ if use_colours
294
+ _ << use_this_colour
295
+ end
296
+ # ======================================================================= #
297
+ # Determine whether we shall append a colon character next:
298
+ # ======================================================================= #
299
+ if shall_we_append_a_colon_character and use_this_as_namespace.respond_to?(:end_with?)
300
+ unless use_this_as_namespace.end_with? '→' # The → is a general exception.
301
+ use_this_as_namespace << ':'
302
+ end
303
+ end
304
+ if use_this_as_namespace.is_a?(Hash) and use_this_as_namespace.empty?
305
+ use_this_as_namespace = ''.dup
306
+ end
307
+ if use_this_as_namespace
308
+ use_this_as_namespace << ' ' if use_this_as_namespace.end_with? ':'
309
+ end
310
+ # ======================================================================= #
311
+ # Honour padding-operations onto the main Namespace next.
312
+ # ======================================================================= #
313
+ if use_padding
314
+ use_this_as_namespace = use_this_as_namespace.ljust(use_this_padding)
315
+ end
316
+ # ======================================================================= #
317
+ # Add the separator here.
318
+ # ======================================================================= #
319
+ _ << use_this_as_namespace
320
+ _ << green+reset_terminal if use_colours
321
+ _ << "\n" if append_newline
322
+ if may_we_display_anything
323
+ print _ if be_verbose
324
+ end
325
+ return _
326
+ end
327
+
328
+ # ========================================================================= #
329
+ # === Opn.opne
330
+ #
331
+ # To test this, do:
332
+ # Opn.opne 'Hello world!'
333
+ # ========================================================================= #
334
+ def self.opne(i = '')
335
+ Opn.opn
336
+ puts i
337
+ end
338
+
339
+ # ========================================================================= #
340
+ # === opne
341
+ # ========================================================================= #
342
+ def opne(i = '')
343
+ Opn.opne(i)
344
+ end
345
+
346
+ # ========================================================================= #
347
+ # === Opn.return_escape_sequence_for_this_colour
348
+ #
349
+ # This method can return the proper colour code.
350
+ # ========================================================================= #
351
+ def self.return_escape_sequence_for_this_colour(
352
+ i = :green
353
+ )
354
+ i = i.to_sym
355
+ case i
356
+ when :grey
357
+ i = "\e[0;30m"
358
+ when :green
359
+ i = "\e[0;32m"
360
+ end
361
+ i
362
+ end
363
+
364
+ # ========================================================================= #
365
+ # === Opn.cadetblue
366
+ # ========================================================================= #
367
+ def self.cadetblue(i)
368
+ "\e[38;2;70;130;180m#{i}\e[0;37m"
369
+ end
370
+
371
+ 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.58'
11
+
12
+ # ========================================================================= #
13
+ # === LAST_UPDATE
14
+ # ========================================================================= #
15
+ LAST_UPDATE = '07.09.2022'
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,64 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # =========================================================================== #
4
+ require 'colour_e/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
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: opn
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.58
5
+ platform: ruby
6
+ authors:
7
+ - Robert A. Heiler
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-09-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.5.8
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 3.3.22
63
+ requirements: []
64
+ rubygems_version: 3.3.22
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
+ ...