pushr-core 1.0.2 → 1.0.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 +4 -4
- data/bin/pushr +4 -5
- data/lib/pushr/configuration.rb +4 -0
- data/lib/pushr/daemon/message_handler.rb +3 -3
- data/lib/pushr/version.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe8abdefd3d9c9d53cfa0c456c78e0f897a5d9e6
|
|
4
|
+
data.tar.gz: 120267550ff55c4b6d4915255d32e1fda6d2f2d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b27387fb15c20ae1a6cc5e8da094f8b08fc0bda0d504d83ed8ff07025ef92ed9bee5272ef93fddc97f8a4a2ed6be0ddff5edf445a63635c671e4bc0c2166f677
|
|
7
|
+
data.tar.gz: ef20aeddb2122159caf3019c38bbbb2554d151b1ade1f1618d305b562d377d9810d3d28439d207a7fa6b7c3b78c27ad8275984e0e4547a921d2dc82930384d79
|
data/bin/pushr
CHANGED
|
@@ -68,14 +68,13 @@ Pushr::Core.configure do |config|
|
|
|
68
68
|
config.redis = x
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
if ENV['AIRBRAKE_API_KEY']
|
|
71
|
+
if ENV['AIRBRAKE_API_KEY'] || ENV['AIRBRAKE_PROJECT_KEY']
|
|
72
72
|
require 'airbrake'
|
|
73
73
|
settings.error_notification = true
|
|
74
74
|
Airbrake.configure do |airbrake|
|
|
75
|
-
airbrake.
|
|
76
|
-
airbrake.
|
|
77
|
-
airbrake.
|
|
78
|
-
airbrake.secure = airbrake.port == 443
|
|
75
|
+
airbrake.host = ENV['AIRBRAKE_HOST']
|
|
76
|
+
airbrake.project_id = ENV['AIRBRAKE_PROJECT_ID'] || 1
|
|
77
|
+
airbrake.project_key = ENV['AIRBRAKE_API_KEY'] || ENV['AIRBRAKE_PROJECT_KEY']
|
|
79
78
|
end
|
|
80
79
|
end
|
|
81
80
|
|
data/lib/pushr/configuration.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Pushr
|
|
2
2
|
module Daemon
|
|
3
3
|
class MessageHandler
|
|
4
|
-
attr_reader :name
|
|
4
|
+
attr_reader :name, :connection
|
|
5
5
|
|
|
6
6
|
def initialize(queue_name, connection, name, i)
|
|
7
7
|
@queue_name = queue_name
|
|
@@ -30,8 +30,8 @@ module Pushr
|
|
|
30
30
|
return if message.nil?
|
|
31
31
|
|
|
32
32
|
Pushr::Core.instrument('message', app: message.app, type: message.type) do
|
|
33
|
-
|
|
34
|
-
Pushr::Daemon.logger.info("[#{
|
|
33
|
+
connection.write(message)
|
|
34
|
+
Pushr::Daemon.logger.info("[#{connection.name}] Message delivered to #{message.to_json}")
|
|
35
35
|
end
|
|
36
36
|
rescue => e
|
|
37
37
|
Pushr::Daemon.logger.error(e)
|
data/lib/pushr/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
require 'simplecov'
|
|
7
7
|
require 'coveralls'
|
|
8
8
|
|
|
9
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
|
9
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
|
|
10
10
|
SimpleCov::Formatter::HTMLFormatter,
|
|
11
11
|
Coveralls::SimpleCov::Formatter
|
|
12
|
-
]
|
|
12
|
+
])
|
|
13
13
|
SimpleCov.start
|
|
14
14
|
|
|
15
15
|
require 'pushr/core'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pushr-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom Pesman
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2017-07-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: redis
|
|
@@ -253,7 +253,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
253
253
|
requirements:
|
|
254
254
|
- - ">="
|
|
255
255
|
- !ruby/object:Gem::Version
|
|
256
|
-
version:
|
|
256
|
+
version: 2.2.0
|
|
257
257
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
258
258
|
requirements:
|
|
259
259
|
- - ">="
|
|
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
261
261
|
version: '0'
|
|
262
262
|
requirements: []
|
|
263
263
|
rubyforge_project:
|
|
264
|
-
rubygems_version: 2.
|
|
264
|
+
rubygems_version: 2.6.11
|
|
265
265
|
signing_key:
|
|
266
266
|
specification_version: 4
|
|
267
267
|
summary: Core of the pushr daemon.
|