spspub_log 0.1.0

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
+ SHA1:
3
+ metadata.gz: eb9c942d776b3b651d7eafba3db0fd106d44224e
4
+ data.tar.gz: 309254e67e7120efabd51ddf28eaa891638faf10
5
+ SHA512:
6
+ metadata.gz: bd1a58baeff20e3bc0ae90ff666a2b23a34498ba51ac3f4b873ca4eaef899cbad008d9a76d62084ceb0c7e884033db3e600acd77691ab1113d0e002bad0e7f04
7
+ data.tar.gz: ddae12db0710aa3c9def8a551534e6dc9d337b80b68d1a6b692c906dd78e26ead85c35dbb5f54f8ae33f0fb7e1665d2a292f05b99815bb449e691d8a01361a36
checksums.yaml.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ �L�o����S C��5�\D�A,��r��"B��
2
+ 4F��HK�n��ג�
data/lib/spspub_log.rb ADDED
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: spspub_log.rb
4
+
5
+ require 'sps-pub'
6
+
7
+
8
+ class SPSPubLog < SPSPub
9
+
10
+ def initialize(host: 'sps', address: host, port: '59000', topic: 'log')
11
+ super(host: host, address: host, port: port)
12
+ @topic = topic
13
+ sleep 0.05
14
+ end
15
+
16
+ def debug(raw_msg)
17
+ pub_msg raw_msg
18
+ end
19
+
20
+ def info(raw_msg)
21
+ pub_msg raw_msg, :info
22
+ end
23
+
24
+ private
25
+
26
+ def pub_msg(s, label=:debug)
27
+ msg, topic = s.split(/ *: */,2).reverse
28
+ fqm = [@topic, topic, label.to_s].compact.join('/') + ': ' + msg
29
+ notice(fqm)
30
+ end
31
+
32
+ end
data.tar.gz.sig ADDED
Binary file
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spspub_log
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11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/
28
+ FD1UWzHay1AxKPk7TMhj8uF2GfOZH11xvr4KorzS9rWl7DS29daenREee+3oHVMo
29
+ Mih6g68Zls4O7XJyiwI0tfys1YmacsNX74kzelo4lmyMplQ6GDOlkwBzJv5N9fRK
30
+ p52TfKJORRNmoXB21Xu74/s5l4wEljO3yqm1aY+qJawdC7S17GzNchxkMtOxurFk
31
+ Y7QyQpxzDAWo8PFZicWLLbbZMAwe8ypaAG5dF0RMa1ewIx2RYehGGBve/Bo3nyKs
32
+ OX0Ard9yjlGKhg==
33
+ -----END CERTIFICATE-----
34
+ date: 2017-10-27 00:00:00.000000000 Z
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: sps-pub
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '0.5'
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 0.5.5
46
+ type: :runtime
47
+ prerelease: false
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '0.5'
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 0.5.5
56
+ description:
57
+ email: james@jamesrobertson.eu
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - lib/spspub_log.rb
63
+ homepage: https://github.com/jrobertson/spspub_log
64
+ licenses:
65
+ - MIT
66
+ metadata: {}
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubyforge_project:
83
+ rubygems_version: 2.6.13
84
+ signing_key:
85
+ specification_version: 4
86
+ summary: 'Publishes log messages instead of logging them to file. #debug #debugging
87
+ #trace'
88
+ test_files: []
metadata.gz.sig ADDED
Binary file