pantheios-ruby 0.20.2 → 0.20.3.1

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
  SHA1:
3
- metadata.gz: d0fed1c5c659ac8b8c76d7df86bfda5c2296ded7
4
- data.tar.gz: 5adbe87a9ba0beed3ba48556dbff1382f485aead
3
+ metadata.gz: 5f5bcc837f0b87b903fe88c0b5d1eb3f2c8193a3
4
+ data.tar.gz: 6e4acd4a1a86ae3df1f04d5ab506c1f0b0722666
5
5
  SHA512:
6
- metadata.gz: f4acddc3af6038ea0b35ae2ee5b452207e67ad38d58e7a7931b8698255ef61bdf9d0acbd4087faef6458776d785b9dab3ddfca3db8e8a12c6832f220f5014068
7
- data.tar.gz: 311db96480e2e007b6e848e41e1df4ff3d6ecd3670d3f022821d2baf145e7e9c0acffa8e3cf488fd4d77a356feac67d45addfff66268e994b67a16af37150cc5
6
+ metadata.gz: 5d7eff164a890518c3fabca3612d6f5810a554235831838e6a98c47562061924d37e09300e610de1cef8759c9c6ee582b695020b0fd6297c69e82802c9f814d2
7
+ data.tar.gz: 873c24a5b54e6711d498e06e0c20c335a81fc2f737c0fa1da634c8b5faa2767c6da49743611481ef6c9a446f39953255a500b3bb526854a2e02e1ef997fc285d
data/LICENSE ADDED
@@ -0,0 +1,31 @@
1
+ Pantheios.Ruby
2
+
3
+ Copyright (c) 2017-2019, Matthew Wilson and Synesis Software
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ * Neither the names of Pantheios or Pantheios.Ruby nor the names of the
17
+ copyright holder nor the names of its contributors may be used to endorse
18
+ or promote products derived from this software without specific prior written
19
+ permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+
@@ -0,0 +1,5 @@
1
+ # **Pantheios.Ruby**
2
+ Pantheios, for Ruby
3
+
4
+ T.B.C.
5
+
@@ -0,0 +1,65 @@
1
+ # Pantheios.Ruby Example - **simple_logging**
2
+
3
+ ## Summary
4
+
5
+ Simple example supporting ```--help``` and ```--version```.
6
+
7
+ ## Source
8
+
9
+ ```ruby
10
+ #!/usr/bin/env ruby
11
+
12
+ $:.unshift File.join(File.dirname(__FILE__), *([ '..' ] * 1), 'lib')
13
+
14
+ # requires (0)
15
+
16
+ require 'pantheios/globals'
17
+
18
+ # globals
19
+
20
+ Pantheios::Globals.MAIN_THREAD_NAME = [ Thread.current, 'main' ]
21
+ Pantheios::Globals.PROCESS_NAME = :script_stem
22
+
23
+ # requires (1)
24
+
25
+ require 'pantheios'
26
+
27
+ # includes
28
+
29
+ include ::Pantheios
30
+
31
+ # constants
32
+
33
+ LEVELS = %i{ violation alert critical failure warning notice informational debug0 debug1 debug2 debug3 debug4 }
34
+
35
+ # main
36
+
37
+ LEVELS.each do |level|
38
+
39
+ log(level, "logging level #{level}")
40
+ end
41
+
42
+ # ############################## end of file ############################# #
43
+ ```
44
+
45
+ ## Usage
46
+
47
+ ### No arguments
48
+
49
+ When executed gives the following output:
50
+
51
+ ```
52
+ [simple_logging, main, 2019-06-05 13:18:52.517479, Violation]: logging level violation
53
+ [simple_logging, main, 2019-06-05 13:18:52.517615, Alert]: logging level alert
54
+ [simple_logging, main, 2019-06-05 13:18:52.517653, Critical]: logging level critical
55
+ [simple_logging, main, 2019-06-05 13:18:52.517681, Failure]: logging level failure
56
+ [simple_logging, main, 2019-06-05 13:18:52.517709, Warning]: logging level warning
57
+ [simple_logging, main, 2019-06-05 13:18:52.517735, Notice]: logging level notice
58
+ [simple_logging, main, 2019-06-05 13:18:52.517763, Informational]: logging level informational
59
+ [simple_logging, main, 2019-06-05 13:18:52.517789, Debug-0]: logging level debug0
60
+ [simple_logging, main, 2019-06-05 13:18:52.517837, Debug-1]: logging level debug1
61
+ [simple_logging, main, 2019-06-05 13:18:52.517876, Debug-2]: logging level debug2
62
+ [simple_logging, main, 2019-06-05 13:18:52.517905, Debug-3]: logging level debug3
63
+ [simple_logging, main, 2019-06-05 13:18:52.517931, Debug-4]: logging level debug4
64
+ ```
65
+
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $:.unshift File.join(File.dirname(__FILE__), *([ '..' ] * 1), 'lib')
4
+
5
+ # requires (0)
6
+
7
+ require 'pantheios/globals'
8
+
9
+ # globals
10
+
11
+ Pantheios::Globals.MAIN_THREAD_NAME = [ Thread.current, 'main' ]
12
+ Pantheios::Globals.PROCESS_NAME = :script_stem
13
+
14
+ # requires (1)
15
+
16
+ require 'pantheios'
17
+
18
+ # includes
19
+
20
+ include ::Pantheios
21
+
22
+ # constants
23
+
24
+ LEVELS = %i{ violation alert critical failure warning notice informational debug0 debug1 debug2 debug3 debug4 }
25
+
26
+ # main
27
+
28
+ LEVELS.each do |level|
29
+
30
+ log(level, "logging level #{level}")
31
+ end
32
+
33
+ # ############################## end of file ############################# #
34
+
35
+
@@ -5,7 +5,7 @@
5
5
  # Purpose: The Pantheios.Ruby core (::Pantheios::Core)
6
6
  #
7
7
  # Created: 2nd April 2011
8
- # Updated: 5th February 2018
8
+ # Updated: 5th September 2018
9
9
  #
10
10
  # Home: http://github.com/synesissoftware/Pantheios-Ruby
11
11
  #
@@ -527,20 +527,21 @@ module Core
527
527
  end
528
528
  end
529
529
 
530
+ fl = nil
531
+ rx = nil
532
+ fn = caller(call_depth + 1, 1)[0]
533
+
530
534
  case param_list
531
535
  when nil
532
536
  ;
533
537
  when ApplicationLayer::ParamNameList
534
- ;
538
+
539
+ warn "#{fn}: param_list must contain only strings or symbols" unless param_list.all? { |p| p.kind_of?(::String) || p.kind_of?(::Symbol) }
535
540
  else
536
541
 
537
- warn "param_list (#{param_list.class}) must be nil or an instance of #{ApplicationLayer::ParamNameList}" unless param_list
542
+ warn "#{fn}: param_list (#{param_list.class}) must be nil or an instance of #{ApplicationLayer::ParamNameList}" unless param_list
538
543
  end
539
544
 
540
- fl = nil
541
- rx = nil
542
- fn = caller(call_depth + 1, 1)[0]
543
-
544
545
  if ::Class === prefix_provider
545
546
 
546
547
  rx = "#{prefix_provider}::"
@@ -5,7 +5,7 @@
5
5
  # Purpose: Version for Pantheios.Ruby library
6
6
  #
7
7
  # Created: 2nd April 2011
8
- # Updated: 11th April 2019
8
+ # Updated: 5th June 2019
9
9
  #
10
10
  # Home: http://github.com/synesissoftware/Pantheios-Ruby
11
11
  #
@@ -50,7 +50,7 @@
50
50
  module Pantheios
51
51
 
52
52
  # Current version of the Pantheios.Ruby library
53
- VERSION = '0.20.2'
53
+ VERSION = '0.20.3.1'
54
54
 
55
55
  private
56
56
  VERSION_PARTS_ = VERSION.split(/[.]/).collect { |n| n.to_i } # :nodoc:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pantheios-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.2
4
+ version: 0.20.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Wilson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-11 00:00:00.000000000 Z
11
+ date: 2020-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xqsr3
@@ -24,13 +24,18 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.31'
27
- description: |
28
- A Ruby version of the popular C++ (and .NET) logging API library
27
+ description: 'A Ruby version of the popular C++ (and .NET) logging API library
28
+
29
+ '
29
30
  email: matthew@synesis.com.au
30
31
  executables: []
31
32
  extensions: []
32
33
  extra_rdoc_files: []
33
34
  files:
35
+ - LICENSE
36
+ - README.md
37
+ - examples/simple_logging.md
38
+ - examples/simple_logging.rb
34
39
  - lib/pantheios.rb
35
40
  - lib/pantheios/api.rb
36
41
  - lib/pantheios/application_layer.rb
@@ -94,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
99
  version: '0'
95
100
  requirements: []
96
101
  rubyforge_project:
97
- rubygems_version: 2.2.5
102
+ rubygems_version: 2.5.2.3
98
103
  signing_key:
99
104
  specification_version: 4
100
105
  summary: Pantheios.Ruby