relp 0.1.1 → 0.1.2

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: 3eaa64b5ba959489b5de376c827a734f5f1dd142
4
- data.tar.gz: 036e76d78d26324c4674790b3c34b9b268a212d6
3
+ metadata.gz: f7f83efde74951f5183dc18758bd7d92de7f0d47
4
+ data.tar.gz: b582704d3e53d7dce8712d78809e1798680bbebf
5
5
  SHA512:
6
- metadata.gz: 8b06ef90ab452ef19b097a32d6daebbab869f2959d8abe105f90171e9cf629fca8270bfeba067bfa96b0d1237fd1b814383cd50ceb2b492494e00e954b3d7844
7
- data.tar.gz: ad9640ec56949caa9313bdf6e00a3d6f3d67dec308e1d98cc9c3cba2dd7891ec8c432e2458993efd41d6f11b506901669eb87987d27d4e2c08fc69575b0664fe
6
+ metadata.gz: cbf9e4b9037041a69397d9dd57fe742e2c7af1e76ec062633110f47e393fd8634182026b4e636f2c9a86da86a843e5b470519f3ff83ef21fecbe6df806fc0e71
7
+ data.tar.gz: 6353f83c40e2cae9ccd5fc6da7660f220dbd9fea6a3ac7746a16fb9ffd90cf3ac45390cc01d63dd525ad4a7483a0ac59abfa62689a2fde632aaa22dce7df3d8c
data/CHANGELOG.md ADDED
@@ -0,0 +1,24 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+ ### Added
10
+ - Started writing this changelog
11
+ - This repo transferred to ViaQ org
12
+
13
+ ## [0.1.1] - 2017-06-23
14
+ ### Changed
15
+ - Version number started to follow Semantic versioning
16
+ - Renamed server_shut_down to sever_shutdown
17
+
18
+ ## [0.1] - 2017-06-19
19
+ ### Added
20
+ - Very first version released as Ruby gem
21
+ - Basic server-side implementation of RELP protocol, based mainly on
22
+ reverse-engineering tcp-dums of rsyslog imrelp-omrelp communication.
23
+ This is, considering state of librelp documentation, basically only
24
+ reliable way to achieve anything.
data/README.md CHANGED
@@ -50,9 +50,9 @@ and than call method run on instance of server e.g. `server.run`
50
50
 
51
51
  `callback`
52
52
  * This is a required setting.
53
- * Method you want to be executed upon successfully accepted message, it has only one :string parameter, which is message itself.
53
+ * Method you want to be executed upon successfully accepted message, it has only one :Hash parameter, which is message itself.
54
54
 
55
- ####Important Methods
55
+ #### Important Methods
56
56
  * `run` Start connceting clients
57
57
  * `server_shutdown` Close connection to all clients and shutdown server
58
58
 
@@ -68,7 +68,7 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
68
68
  To install this gem onto your local machine, run `bundle exec rake install`.
69
69
  ## Contributing
70
70
 
71
- Bug reports and pull requests are welcome on GitHub at https://github.com/dhlavac/RELP.
71
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ViaQ/Relp.
72
72
 
73
73
 
74
74
  ## License
data/lib/relp/server.rb CHANGED
@@ -22,7 +22,8 @@ module Relp
22
22
 
23
23
  def run
24
24
  loop do
25
- Thread.start(@server.accept) do |client_socket|
25
+ client_socket = @server.accept
26
+ Thread.start(client_socket) do |client_socket|
26
27
  begin
27
28
  @socket_list.push client_socket
28
29
  remote_ip = client_socket.peeraddr[3]
@@ -41,6 +42,8 @@ module Relp
41
42
  @logger.info "Connection closed"
42
43
  rescue Relp::RelpProtocolError => err
43
44
  @logger.warn 'Relp error: ' + err.class.to_s + ' ' + err.message
45
+ rescue Exception => e
46
+ @logger.debug e
44
47
  ensure
45
48
  server_close_message(client_socket) rescue nil
46
49
  @logger.debug "Closing client socket=#{client_socket.object_id}"
data/lib/relp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Relp
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
+ - Jiří Vymazal
7
8
  - Dominik Hlaváč Ďurán
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2017-06-22 00:00:00.000000000 Z
12
+ date: 2017-08-18 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
@@ -55,11 +56,13 @@ dependencies:
55
56
  description: If you want to receive or send message via RELP protocol you can use
56
57
  this gem
57
58
  email:
59
+ - jvymazal@redhat.com
58
60
  - dhlavacd@redhat.com
59
61
  executables: []
60
62
  extensions: []
61
63
  extra_rdoc_files: []
62
64
  files:
65
+ - CHANGELOG.md
63
66
  - LICENSE.txt
64
67
  - README.md
65
68
  - Rakefile
@@ -73,7 +76,7 @@ files:
73
76
  - lib/relp/version.rb
74
77
  - test/RELP_test.rb
75
78
  - test/test_helper.rb
76
- homepage: https://github.com/dhlavac/Relp
79
+ homepage: https://github.com/ViaQ/Relp
77
80
  licenses:
78
81
  - MIT
79
82
  metadata: {}
@@ -93,10 +96,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
96
  version: '0'
94
97
  requirements: []
95
98
  rubyforge_project:
96
- rubygems_version: 2.5.2
99
+ rubygems_version: 2.6.6
97
100
  signing_key:
98
101
  specification_version: 4
99
102
  summary: Ruby implementation of RELP (Reliable Event Logging Protocol) protocol.
100
103
  test_files:
101
- - test/RELP_test.rb
102
104
  - test/test_helper.rb
105
+ - test/RELP_test.rb