Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 5 #45

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
queues
activemq-data
*.gem
*.rbc
.bundle
.config
.yardoc
Gemfile.lock
InstalledFiles
_yardoc
coverage
doc/
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
.DS_Store
*.gemfile.lock
Gemfile.lock
43 changes: 7 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,10 @@
language: ruby
gemfile:
- gemfiles/activesupport23.gemfile
- gemfiles/activesupport30.gemfile
- gemfiles/activesupport31.gemfile
- gemfiles/activesupport32.gemfile
branches:
only:
- feat/rails5
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- ruby-head
- ree
- jruby-18mode
- jruby-19mode
- jruby-head
- rbx-18mode
- rbx-19mode
matrix:
allow_failures:
- rvm: jruby-18mode
- rvm: jruby-19mode
- rvm: jruby-head
- rvm: rbx-18mode
- rvm: rbx-19mode
- rvm: ruby-head
exclude:
- rvm: 1.9.3
gemfile: gemfiles/activesupport23.gemfile
- rvm: ruby-head
gemfile: gemfiles/activesupport23.gemfile
- rvm: jruby-19mode
gemfile: gemfiles/activesupport23.gemfile
- rvm: jruby-head
gemfile: gemfiles/activesupport23.gemfile
- rvm: rbx-19mode
gemfile: gemfiles/activesupport23.gemfile
- 2.1.10
- 2.5.0
notifications:
recipients:
- kookster@gmail.com
email:
- andrew@beginsinwonder.com
10 changes: 10 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
guard 'bundler' do
watch('Gemfile')
watch(/^.+\.gemspec/)
end

guard :minitest do
watch(%r{^test/(.*)\/?test_(.*)\.rb})
watch(%r{^lib/(.*/)?([^/]+)\.rb}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
watch(%r{^test/test_helper\.rb}) { 'test' }
end
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ActiveMessaging is an attempt to bring the simplicity and elegance of rails development to the world of messaging. Messaging, (or event-driven architecture) is widely used for enterprise integration, with frameworks such as Java's JMS, and products such as ActiveMQ, Tibco, IBM MQSeries, etc.

ActiveMessaging is a generic framework to ease using messaging, but is not tied to any particular messaging system - in fact, it now has support for Stomp, AMQP, beanstalk, Amazon Simple Queue Service (SQS), JMS (using StompConnect or direct on JRuby), WebSphere MQ, the all-Ruby ReliableMessaging, a mock 'test' adapter, and a 'synch' adapter for use in development that processes calls synchronously (of course) and so requires no broker or additional processes to be running.
ActiveMessaging is a generic framework to ease using messaging, but is not tied to any particular messaging system - in fact, it now has support for Stomp, AMQP, beanstalk, Amazon Simple Queue Service (SQS), JMS (using StompConnect or direct on JRuby), WebSphere MQ, a mock 'test' adapter, and a 'synch' adapter for use in development that processes calls synchronously (of course) and so requires no broker or additional processes to be running.

Here's a sample of a processor class that handles incoming messages:

Expand Down
25 changes: 6 additions & 19 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
require "rubygems"
require "bundler/gem_tasks"
require "bundler/setup"

require 'rake'
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rdoc/rdoc'

require 'appraisal'

desc 'Default: run unit tests.'
task :default => :test

desc 'Test the ActiveMessaging plugin.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
Rake::TestTask.new do |t|
t.libs.push 'lib'
t.libs.push 'test'
t.test_files = FileList['test/**/*_test.rb']
t.verbose = true
end

desc 'Generate documentation for the ActiveMessaging plugin.'
task :rdoc do
rm_rf 'doc'
RDoc::RDoc.new.document(%w(--line-numbers --inline-source --title ActiveMessaging README lib))
end
task :default => :test
43 changes: 26 additions & 17 deletions activemessaging.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,35 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'activemessaging/version'

Gem::Specification.new do |spec|
spec.name = "activemessaging"
spec.version = ActiveMessaging::VERSION
spec.authors = ["Jon Tirsen", "Andrew Kuklewicz", "Olle Jonsson", "Sylvain Perez", "Cliff Moon", "Uwe Kubosch", "Lance Cooper", "Matt Campbell"]
spec.email = ["[email protected]"]

spec.summary = "Official activemessaging gem, now hosted on github.com/kookster. (kookster prefix temporary)"
spec.description = "ActiveMessaging is an attempt to bring the simplicity and elegance of rails development to the world of messaging. Messaging, (or event-driven architecture) is widely used for enterprise integration, with frameworks such as Java's JMS, and products such as ActiveMQ, Tibco, IBM MQSeries, etc. Now supporting Rails 3 as of version 0.8.0."
spec.homepage = "http://github.com/kookster/activemessaging"
spec.name = "activemessaging"
spec.version = ActiveMessaging::VERSION
spec.authors = ["Andrew Kuklewicz", "Jon Tirsen", "Olle Jonsson", "Sylvain Perez", "Cliff Moon", "Uwe Kubosch", "Lance Cooper", "Matt Campbell"]
spec.email = ["[email protected]"]
spec.description = "ActiveMessaging is an attempt to bring the simplicity and elegance of Rails development to the world of messaging. Messaging, (or event-driven architecture) is widely used for enterprise integration, with frameworks such as Java's JMS, and products such as ActiveMQ, Tibco, IBM MQSeries, etc."
spec.summary = "ActiveMessaging is an attempt to bring the simplicity and elegance of Rails development to the world of messaging."
spec.homepage = "http://github.com/kookster/activemessaging"
spec.license = "MIT"

spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.files = `git ls-files`.split($/)
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler"
spec.add_development_dependency "test-unit"
spec.add_development_dependency "stomp"
spec.add_development_dependency "appraisal"
spec.add_runtime_dependency 'activesupport'
spec.add_runtime_dependency 'celluloid'

spec.add_development_dependency 'bundler', '~> 1.3'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'appraisal'

spec.add_development_dependency 'minitest'
spec.add_development_dependency 'webmock'
spec.add_development_dependency 'pry'

spec.add_development_dependency 'guard'
spec.add_development_dependency 'guard-bundler'
spec.add_development_dependency 'guard-minitest'

spec.add_runtime_dependency "activesupport"
spec.add_runtime_dependency "rake"
spec.add_development_dependency 'simplecov'
spec.add_development_dependency 'coveralls'
end
2 changes: 1 addition & 1 deletion generators/filter/templates/filter_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + '/../test_helper'
require File.dirname(__FILE__) + '/../../vendor/plugins/activemessaging/lib/activemessaging/test_helper'

class <%= class_name %>FilterTest < Test::Unit::TestCase
class <%= class_name %>FilterTest < Minitest::Test
include ActiveMessaging::TestHelper

def setup
Expand Down
2 changes: 1 addition & 1 deletion generators/processor/templates/processor_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'activemessaging/test_helper'
require File.dirname(__FILE__) + '/../../app/processors/application'

class <%= class_name %>ProcessorTest < Test::Unit::TestCase
class <%= class_name %>ProcessorTest < Minitest::Test
include ActiveMessaging::TestHelper

def setup
Expand Down
8 changes: 4 additions & 4 deletions lib/activemessaging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ def self.load_extensions
end

def self.load_config
# Skip loading config if there are no custom processors as the generator
# Skip loading config if there are no custom processors as the generator
# is likely running since application_processor.rb and another processor
# should exist when running rails.
# should exist when running rails.
if Dir["#{app_root}/app/processors/*.rb"].size() <= 1
return
return
end
path = File.expand_path("#{app_root}/config/messaging.rb")
begin
load path
load path
rescue
raise $!, " ActiveMessaging: problems trying to load '#{path}': \n\t#{$!.message}"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/activemessaging/adapters/asqs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def make_request(action, url=nil, params = {})
# Sign the string
sorted_params = params.sort_by { |key,value| key.downcase }
string_to_sign = sorted_params.collect { |key, value| key.to_s + value.to_s }.join()
digest = OpenSSL::Digest::Digest.new('sha1')
digest = OpenSSL::Digest.new('sha1')
hmac = OpenSSL::HMAC.digest(digest, @secret_access_key, string_to_sign)
params['Signature'] = Base64.encode64(hmac).chomp

Expand Down
Loading