propono 0.6.1 → 0.6.3

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: 52e0fe1a099ef8b01227b6e9c0a8483367e3957d
4
- data.tar.gz: 5860f2bc8e5cbfa026c95ac1fd77ee72b66eff5a
3
+ metadata.gz: 299526d5c3416f58858496b984ec04ff96a74a69
4
+ data.tar.gz: 8ab281343f74f9c5bfc233891311f1f21ebbf9e7
5
5
  SHA512:
6
- metadata.gz: 6ad96bb16a02e9c5d35d7b092395d1bb2f4fd214c13a1b0c2d4b32ce50d5434590b51c59207712d98e67a38958ea337f1c947e6ac86eba597bfa6a0699a11e1b
7
- data.tar.gz: 4e1e7463ac5644e6bfd4f5e96e20994df9a7c687cc6651d266b4e2b2dbe9c006e6d852179eb8db52311b2c7f2a4fe0be4d3f917a443c831a9f05196b90166fcb
6
+ metadata.gz: 9b3f4bbc2284bf4fad16d8c57dff469d94522b46948a5d1c882d0994b03a4c1d699680615dd653a0325671f512d84f47c165314d0e4d7cc914a8eda7871b318a
7
+ data.tar.gz: 16609ea0f80a7cb985b84d4b2015bdbedd2aa83441f6dbcab2263db623bc17d412c2f0a191b0aab7d7b178ca781c98baa181a7aaba18291260a333725333c479
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # 0.6.3 / 2013-10-20
2
+
3
+ * [FEATURE] Catch all StandardError exceptions for UDP publishes.
4
+
5
+ # 0.6.2 / 2013-10-20
6
+
7
+ * [BUGFIX] Fixed integration tests that sometimes failed due to shared UDP ports or slow SQS subscriptions.
8
+
9
+ # 0.6.1 / 2013-10-20
10
+
11
+ * [BUGFIX] Added `require 'json'` to udp_listener.rb
@@ -35,7 +35,7 @@ module Propono
35
35
  def publish_via_udp
36
36
  payload = {topic: topic_id, message: message}.to_json
37
37
  UDPSocket.new.send(payload, 0, Propono.config.udp_host, Propono.config.udp_port)
38
- rescue SocketError => e
38
+ rescue => e
39
39
  Propono.config.logger.error "Propono failed to send : #{e}"
40
40
  end
41
41
  end
@@ -1,3 +1,3 @@
1
1
  module Propono
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.3"
3
3
  end
@@ -13,7 +13,6 @@ module Propono
13
13
  config.queue_region = config_file['queue_region']
14
14
  config.application_name = config_file['application_name']
15
15
  config.udp_host = "localhost"
16
- config.udp_port = 12543
17
16
  end
18
17
  end
19
18
 
@@ -6,6 +6,8 @@ module Propono
6
6
  topic = "test-topic"
7
7
  text = "This is my message"
8
8
 
9
+ Propono.subscribe_by_queue(topic)
10
+
9
11
  thread = Thread.new do
10
12
  Propono.listen_to_queue(topic) do |message|
11
13
  assert_equal text, message
@@ -13,7 +15,7 @@ module Propono
13
15
  end
14
16
  end
15
17
  Propono.publish(topic, text)
16
- flunk unless wait_for_thread(thread)
18
+ flunk("Test Timeout") unless wait_for_thread(thread)
17
19
  ensure
18
20
  thread.terminate
19
21
  end
@@ -5,6 +5,9 @@ module Propono
5
5
  def test_the_message_gets_there
6
6
  topic = "test-topic"
7
7
  message = "This is my message"
8
+ Propono.config.udp_port = 20001
9
+
10
+ Propono.subscribe_by_queue(topic)
8
11
 
9
12
  udp_thread = Thread.new do
10
13
  Propono.proxy_udp
@@ -18,7 +21,7 @@ module Propono
18
21
  end
19
22
 
20
23
  Propono.publish(topic, message, protocol: :udp)
21
- flunk unless wait_for_thread(sqs_thread)
24
+ flunk("Test timeout") unless wait_for_thread(sqs_thread)
22
25
  ensure
23
26
  udp_thread.terminate
24
27
  sqs_thread.terminate
@@ -5,6 +5,9 @@ module Propono
5
5
  def test_the_message_gets_there
6
6
  topic = "test-topic"
7
7
  message = "This is my message"
8
+ Propono.config.udp_port = 20002
9
+
10
+ Propono.subscribe_by_queue(topic)
8
11
 
9
12
  udp_thread = Thread.new do
10
13
  Propono.listen_to_udp do |udp_topic, udp_message|
@@ -21,7 +24,7 @@ module Propono
21
24
  end
22
25
 
23
26
  Propono.publish(topic, message, protocol: :udp)
24
- flunk unless wait_for_thread(udp_thread) && wait_for_thread(sqs_thread)
27
+ flunk("Test Timeout") unless wait_for_thread(udp_thread) && wait_for_thread(sqs_thread)
25
28
  ensure
26
29
  udp_thread.terminate
27
30
  sqs_thread.terminate
@@ -105,7 +105,7 @@ module Propono
105
105
  publisher.send(:publish_via_udp)
106
106
  end
107
107
 
108
- def test_client_with_bad_host_logs_error
108
+ def test_exception_from_udpsocket_caught_and_logged
109
109
  host = "http://meducation.net"
110
110
  port = 1234
111
111
  Propono.config.udp_host = host
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: propono
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - MalcyL
@@ -105,6 +105,7 @@ extra_rdoc_files: []
105
105
  files:
106
106
  - .gitignore
107
107
  - .travis.yml
108
+ - CHANGELOG.md
108
109
  - CONTRIBUTING.md
109
110
  - Gemfile
110
111
  - LICENCE.md