Skip to content

Commit

Permalink
Merge pull request #28 from Sage/feature_decouple_dependencies
Browse files Browse the repository at this point in the history
Architecture updates
  • Loading branch information
vaughanbrittonsage authored Jun 27, 2017
2 parents 3bbcca2 + 149ca4d commit 67e1709
Show file tree
Hide file tree
Showing 47 changed files with 1,232 additions and 226 deletions.
1 change: 1 addition & 0 deletions eventq_aws/.rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
--color
--require spec_helper
--format progress
15 changes: 13 additions & 2 deletions eventq_aws/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in eventq_aws.gemspec
gemspec

gem 'oj', '2.15.0'

gem 'json', '1.8.3'
gem 'openssl', '2.0.4'
gem 'redlock'

platforms :ruby do
gem 'oj', '2.15.0'
gem 'pry'
gem 'openssl', '2.0.4'
end

platforms :jruby do
gem 'pry-debugger-jruby'
gem 'jruby-openssl'
end
14 changes: 8 additions & 6 deletions eventq_aws/eventq_aws.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.11"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec"
spec.add_development_dependency "pry"
spec.add_development_dependency 'bundler', '~> 1.11'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rspec'

spec.add_dependency 'aws-sdk-core'
spec.add_dependency 'eventq_base'
spec.add_dependency 'hash_kit'
spec.add_dependency 'eventq_base', '~> 1.15'

if RUBY_PLATFORM =~ /java/
spec.platform = 'java'
end
end
7 changes: 6 additions & 1 deletion eventq_aws/lib/eventq_aws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
require 'eventq_aws/aws_eventq_client'
require 'eventq_aws/aws_queue_client'
require 'eventq_aws/aws_queue_manager'
require 'eventq_aws/aws_queue_worker'
require 'eventq_aws/aws_subscription_manager'
require_relative 'eventq_aws/aws_status_checker'

if RUBY_PLATFORM =~ /java/
require 'eventq_aws/jruby/aws_queue_worker'
else
require 'eventq_aws/aws_queue_worker'
end

module EventQ
def self.namespace
@namespace
Expand Down
1 change: 1 addition & 0 deletions eventq_aws/lib/eventq_aws/aws_eventq_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def with_prepared_message(event_type, event, context)
qm.content = event
qm.type = event_type
qm.context = context
qm.content_type = event.class.to_s

if EventQ::Configuration.signature_secret != nil
provider = @signature_manager.get_provider(EventQ::Configuration.signature_provider)
Expand Down
5 changes: 4 additions & 1 deletion eventq_aws/lib/eventq_aws/aws_queue_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ def process_message(response, client, queue, q, block)
payload = JSON.load(msg.body)
message = deserialize_message(payload[MESSAGE])

message_args = EventQ::MessageArgs.new(message.type, retry_attempts, message.context)
message_args = EventQ::MessageArgs.new(type: message.type,
retry_attempts: retry_attempts,
context: message.context,
content_type: message.content_type)

EventQ.logger.info("[#{self.class}] - Message received. Retry Attempts: #{retry_attempts}")

Expand Down
Loading

0 comments on commit 67e1709

Please sign in to comment.