propono 1.1.1 → 1.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,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZGQ0ZmZhODMxNGNmOWFjMTBmY2VjYjU4MmFhNzg5MWY4ZTVlYTAxMg==
5
- data.tar.gz: !binary |-
6
- MDE3Y2I1ZmVkYjMxNzJlZTgwYmEwZWI2YmIzZWFkZWNkYWJiNDZmMA==
2
+ SHA1:
3
+ metadata.gz: 1917ef51173b438968c6c9a9453d710a48158312
4
+ data.tar.gz: fe799f2582f1b5180e21d0567e0d9657f3322a02
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZTk2YjgxYmYzOGVhYmY1YWMxYzM3NzI4OTYxNzFiNDQ3ZTUzNmY5MTU2NDEy
10
- ZDdiMTFkODJiYWU2ODI3YTY4NzM1NWVhNTBiZGNmNWMyOTM0ZjYwODBlZTE2
11
- ODRmOGUxYzMxYmIwNzRjMjAyYmViYjQxZGNhNTkxZWRkMjhlYTU=
12
- data.tar.gz: !binary |-
13
- MWIwMTk3NjEzODI0YWIxZTZkOGJkMTZiMzFmMjdmODg4NWMxOTg2ZTM3MTk0
14
- NmI4ZWYwM2M0ODNjY2E5NDE3NGJjY2I1YTlmZjVhNWNiYjlmNmNhNzQzM2Uz
15
- YzZlMmQ1NjFiZmI4MTE0Zjk5YjAzZjY2MzhmYmQ2NGI4ODc3ZmE=
6
+ metadata.gz: 526f52cb4a183d3a1dbed6048e12899abcd20eace75f017a80ea26d2753c5f1d061b222bf57b0a0c631ad81d6b78229c6b812e9fb652f3b390bedf34330631d2
7
+ data.tar.gz: f8060edb37e58dddd21b23778a111229dc5f84c3ccea43f286c93aaf32c475a0f426b28582ef5098cf6732845fa2f18aad2334772963871a28933b7fb87f494a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 1.1.2 / 2014-03-31
2
+ * [BUGFIX] Move topic lookup into publishing thread.
3
+
1
4
  # 1.1.1 / 2014-02-22
2
5
  * [BUGFIX] Logger.error only takes (0..1) arguments.
3
6
 
@@ -34,12 +34,19 @@ module Propono
34
34
  private
35
35
 
36
36
  def publish_via_sns
37
- topic = TopicCreator.find_or_create(topic_id)
38
37
  Thread.new do
38
+ begin
39
+ topic = TopicCreator.find_or_create(topic_id)
40
+ rescue => e
41
+ Propono.config.logger.error "Propono [#{id}]: Failed to create topic #{topic_id}: #{e}"
42
+ raise
43
+ end
44
+
39
45
  begin
40
46
  sns.publish(topic.arn, body.to_json)
41
47
  rescue => e
42
- Propono.config.logger.error "Propono [#{id}]: Failed to send via sns : #{e}"
48
+ Propono.config.logger.error "Propono [#{id}]: Failed to send via sns: #{e}"
49
+ raise
43
50
  end
44
51
  end
45
52
  end
@@ -1,3 +1,3 @@
1
1
  module Propono
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
@@ -112,7 +112,8 @@ module Propono
112
112
 
113
113
  assert_raises(TopicCreatorError) do
114
114
  publisher = Publisher.new("topic", "message")
115
- publisher.send(:publish_via_sns)
115
+ thread = publisher.send(:publish_via_sns)
116
+ thread.join
116
117
  end
117
118
  end
118
119
 
@@ -126,8 +127,10 @@ module Propono
126
127
  sns = mock()
127
128
  sns.stubs(:publish)
128
129
  publisher = Publisher.new(topic_id, "Foobar")
130
+ publisher.stubs(sns: sns)
129
131
 
130
- publisher.send(:publish_via_sns)
132
+ thread = publisher.send(:publish_via_sns)
133
+ thread.join
131
134
  end
132
135
 
133
136
  def test_udp_uses_correct_message_host_and_port
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: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - MalcyL
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-24 00:00:00.000000000 Z
12
+ date: 2014-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog
@@ -43,42 +43,42 @@ dependencies:
43
43
  name: rake
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ! '>='
46
+ - - '>='
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ! '>='
53
+ - - '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: mocha
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ! '>='
60
+ - - '>='
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ! '>='
67
+ - - '>='
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: yard
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ! '>='
74
+ - - '>='
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ! '>='
81
+ - - '>='
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
@@ -169,12 +169,12 @@ require_paths:
169
169
  - lib
170
170
  required_ruby_version: !ruby/object:Gem::Requirement
171
171
  requirements:
172
- - - ! '>='
172
+ - - '>='
173
173
  - !ruby/object:Gem::Version
174
174
  version: '0'
175
175
  required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  requirements:
177
- - - ! '>='
177
+ - - '>='
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  requirements: []