Commit bb82f689 authored by Marcel Hoppe's avatar Marcel Hoppe

Initial commit

parents
.bundle/
log/*.log
pkg/
test/dummy/db/*.sqlite3
test/dummy/db/*.sqlite3-journal
test/dummy/log/*.log
test/dummy/storage/
test/dummy/tmp/
<?xml version="1.0" encoding="UTF-8"?>
<Settings><!--This file was automatically generated by Ruby plugin.
You are allowed to:
1. Remove rake task
2. Add existing rake tasks
To add existing rake tasks automatically delete this file and reload the project.
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
<?xml version="1.0" encoding="UTF-8"?>
<module type="RUBY_MODULE" version="4">
<component name="ModuleRunConfigurationManager">
<shared />
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="rbenv: 2.6.3" jdkType="RUBY_SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="actioncable (v5.2.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v5.2.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionpack (v5.2.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionview (v5.2.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activejob (v5.2.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activemodel (v5.2.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activerecord (v5.2.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activestorage (v5.2.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activesupport (v6.0.0.rc1, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="amq-protocol (v2.3.0, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="arel (v9.0.0, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.17.2, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bunny (v2.14.2, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.5, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="crass (v1.0.4, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="erubi (v1.8.0, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="globalid (v0.4.2, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="i18n (v1.6.0, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="loofah (v2.2.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mail (v2.7.1, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="marcel (v0.3.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.9.2, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mimemagic (v0.3.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_mime (v1.0.1, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.4.0, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.11.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nio4r (v2.3.1, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.10.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack (v2.0.7, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack-test (v1.1.0, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails (v6.0.0.rc1, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.0.4, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="railties (v5.2.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rake (v12.3.2, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets (v3.7.2, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets-rails (v3.2.1, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sqlite3 (v1.4.1, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thor (v0.20.3, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.5, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.7.0, rbenv: 2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.3, rbenv: 2.6.3) [gem]" level="application" />
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Rubocop" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 2.6.0" project-jdk-type="RUBY_SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/activebunny.iml" filepath="$PROJECT_DIR$/.idea/activebunny.iml" />
</modules>
</component>
</project>
\ No newline at end of file
This diff is collapsed.
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
# Declare your gem's dependencies in activebunny.gemspec.
# Bundler will treat runtime dependencies like base dependencies, and
# development dependencies will be added by default to the :development group.
gemspec
# Declare any dependencies that are still in development here instead of in
# your gemspec. These might include edge Rails or gems from your path or
# Git. Remember to move these dependencies to your gemspec before releasing
# your gem to rubygems.org.
# To use a debugger
# gem 'byebug', group: [:development, :test]
gem 'bunny', "~> 2.14"
\ No newline at end of file
PATH
remote: .
specs:
activebunny (0.1.0)
activesupport (>= 5.0, < 7)
bunny (~> 2.14)
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.0.rc1)
actionpack (= 6.0.0.rc1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.0.rc1)
actionpack (= 6.0.0.rc1)
activejob (= 6.0.0.rc1)
activerecord (= 6.0.0.rc1)
activestorage (= 6.0.0.rc1)
activesupport (= 6.0.0.rc1)
mail (>= 2.7.1)
actionmailer (6.0.0.rc1)
actionpack (= 6.0.0.rc1)
actionview (= 6.0.0.rc1)
activejob (= 6.0.0.rc1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.0.rc1)
actionview (= 6.0.0.rc1)
activesupport (= 6.0.0.rc1)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actiontext (6.0.0.rc1)
actionpack (= 6.0.0.rc1)
activerecord (= 6.0.0.rc1)
activestorage (= 6.0.0.rc1)
activesupport (= 6.0.0.rc1)
nokogiri (>= 1.8.5)
actionview (6.0.0.rc1)
activesupport (= 6.0.0.rc1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (6.0.0.rc1)
activesupport (= 6.0.0.rc1)
globalid (>= 0.3.6)
activemodel (6.0.0.rc1)
activesupport (= 6.0.0.rc1)
activerecord (6.0.0.rc1)
activemodel (= 6.0.0.rc1)
activesupport (= 6.0.0.rc1)
activestorage (6.0.0.rc1)
actionpack (= 6.0.0.rc1)
activejob (= 6.0.0.rc1)
activerecord (= 6.0.0.rc1)
marcel (~> 0.3.1)
activesupport (6.0.0.rc1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.1, >= 2.1.4)
amq-protocol (2.3.0)
builder (3.2.3)
bunny (2.14.2)
amq-protocol (~> 2.3, >= 2.3.0)
concurrent-ruby (1.1.5)
crass (1.0.4)
erubi (1.8.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.2)
mimemagic (0.3.3)
mini_mime (1.0.1)
mini_portile2 (2.4.0)
minitest (5.11.3)
nio4r (2.3.1)
nokogiri (1.10.3)
mini_portile2 (~> 2.4.0)
rack (2.0.7)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.0.rc1)
actioncable (= 6.0.0.rc1)
actionmailbox (= 6.0.0.rc1)
actionmailer (= 6.0.0.rc1)
actionpack (= 6.0.0.rc1)
actiontext (= 6.0.0.rc1)
actionview (= 6.0.0.rc1)
activejob (= 6.0.0.rc1)
activemodel (= 6.0.0.rc1)
activerecord (= 6.0.0.rc1)
activestorage (= 6.0.0.rc1)
activesupport (= 6.0.0.rc1)
bundler (>= 1.3.0)
railties (= 6.0.0.rc1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (6.0.0.rc1)
actionpack (= 6.0.0.rc1)
activesupport (= 6.0.0.rc1)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (12.3.2)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.1)
thor (0.20.3)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
zeitwerk (2.1.6)
PLATFORMS
ruby
DEPENDENCIES
activebunny!
bunny (~> 2.14)
rails (~> 6.0.0.rc1)
sqlite3
BUNDLED WITH
1.17.2
Copyright 2019 Marcel Hoppe
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Activebunny
Short description and motivation.
## Usage
How to use my plugin.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'activebunny'
```
And then execute:
```bash
$ bundle
```
Or install it yourself as:
```bash
$ gem install activebunny
```
## Contributing
Contribution directions go here.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
require 'rdoc/task'
RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Activebunny'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.md')
rdoc.rdoc_files.include('lib/**/*.rb')
end
require 'bundler/gem_tasks'
require 'rake/testtask'
Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = false
end
task default: :test
$:.push File.expand_path("lib", __dir__)
# Maintain your gem's version:
require "active_bunny/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |spec|
spec.name = "activebunny"
spec.version = ActiveBunny::VERSION
spec.authors = ["Marcel Hoppe"]
spec.email = ["marcel.hoppe@mni.thm.de"]
spec.homepage = "http://TODO"
spec.summary = "An easy to use framework for RabbitMQ integration into Rails"
spec.description = "An easy to use framework for RabbitMQ integration into Rails"
spec.license = "MIT"
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
# to allow pushing to a single host or delete this section to allow pushing to any host.
if spec.respond_to?(:metadata)
spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
else
raise "RubyGems 2.0 or newer is required to protect against " \
"public gem pushes."
end
spec.files = Dir["{lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
spec.add_dependency("activesupport", ">= 5.0", "< 7")
spec.add_dependency "bunny", "~> 2.14"
spec.add_development_dependency "sqlite3"
spec.add_development_dependency "rails", "~> 6.0.0.rc1"
end
#!/usr/bin/env ruby
$: << File.expand_path("../test", __dir__)
require "bundler/setup"
require "rails/plugin/test"
require "active_support"
require 'bunny'
module ActiveBunny
extend ActiveSupport::Autoload
autoload :Publisher
autoload :Subscriber
@@conn = nil
@@config = {}
@@channel = {}
@@fanouts = {}
@@queues = {}
def self.config
@@config
end
def self.config= (config)
@@config = {
logger: Rails.logger,
auth_mechanism: "plain",
username: "guest",
password: "guest",
host: "127.0.0.1",
port: "5672",
virtual_host: "/"
}.merge(config)
@@config[:auth_mechanism] = @@config[:auth_mechanism].upcase
end
def self.connection
unless @@conn
c = self.config
@@conn = Bunny.new **c
@@conn.start
end
@@conn
end
def self.channel(name)
@@channel[name] ||= self.connection.create_channel
end
def self.create_queues(name, simple_name, method_list)
@@queues[name] ||= {}
queues = @@queues[name]
(queues.keys - method_list.map(&:to_sym)).each do |m|
queues.except!(m)
end
(method_list.map(&:to_sym) - queues.keys).each do |m|
queues[m] = channel(name).queue("#{Rails.application.class.name.deconstantize}.#{simple_name}.#{m}", durable: true, auto_delete: true)
queues[m].bind("#{simple_name}.#{m}")
queues[m].subscribe do |delivery_info, properties, payload|
name.constantize.new.send(m, payload)
end
end
end
def self.create_fanouts(name, simple_name, method_list)
method_list << "default"
@@fanouts[name] ||= {}
fanouts = @@fanouts[name]
(fanouts.keys - method_list.map(&:to_sym)).each do |m|
fanouts.except!(m)
end
(method_list.map(&:to_sym) - fanouts.keys).each do |m|
fanouts[m] = channel(name).fanout("#{simple_name}.#{m}", durable: true, auto_delete: true)
end
end
def self.fanouts(name)
@@fanouts[name]
end
def self.fanout(name, method)
self.fanouts(name)[method] || self.fanouts(name)[:default]
end
def self.publish(name, method, payload)
self.fanout(name, method).publish(payload)
end
at_exit do
@@conn.close
end
end
require "active_bunny/railtie" if defined?(Rails.application)
\ No newline at end of file
module ActiveBunny
module ActiveRecord
module Hooks
def create_model_hooks(except:[], only:nil)
hooks = (only || [:after_create, :after_update, :after_destroy]) - except
caller_class = self
model_name = self.send(:class_name)
model_class = model_name.constantize
hooks.each do |hook|
method_name = "#{hook}".sub("after_", '')
if model_class.respond_to? hook
caller_class.define_method("#{method_name}") do |record|
self.publish(record.to_json, method_name)
end
model_class.send(hook, Proc.new {|record| caller_class.new.send(method_name, record)})
end
end
end
end
end
end
\ No newline at end of file
module ActiveBunny
module Basics
def reload
if self < ActiveBunny::Subscriber
reload_subscriber
elsif self < ActiveBunny::Publisher
reload_publisher
end
end
private
def reload_subscriber
ActiveBunny.channel(self.name)
ActiveBunny.create_queues(self.name, class_name, method_list(ActiveBunny::Subscriber))
end
def reload_publisher
ActiveBunny.channel(self.name)
ActiveBunny.create_fanouts(self.name, class_name, method_list(ActiveBunny::Publisher))
end
def method_list(parent)
@method_list ||= (self.instance_methods - parent.instance_methods)
end
def class_name()
if @class_name.nil?
@class_name = self.name || ""
@class_name&.slice! "Subscriber"
@class_name&.slice! "Publisher"
@class_name.gsub("::", ".")
@class_name = "Default" if @class_name&.empty?
end
@class_name
end
end
end
\ No newline at end of file
require_relative 'basics'
require_relative 'active_record/hooks'
module ActiveBunny
class Publisher
extend ActiveSupport::DescendantsTracker
extend ::ActiveBunny::Basics
extend ::ActiveBunny::ActiveRecord::Hooks
def publish(obj, method=nil)
method ||= caller_locations(1,1)[0].label
ActiveBunny.publish(self.class.name, method.to_sym, obj)
end
end
end
require "rails"
require 'active_bunny/publisher'
require 'active_bunny/subscriber'
module Rails
module ActiveBunny
class Railtie < Rails::Railtie
config.active_bunny = ::ActiveBunny
initializer "activebunny.load-config" do
if File.exists?(File.join(Rails.root, 'config', 'rabbitmq.yml'))
config.active_bunny.config = YAML.load_file("#{Rails.root}/config/rabbitmq.yml").deep_symbolize_keys[Rails.env.to_sym]
end
end
initializer "activebunny.file_watcher" do |app|
if File.exists?(File.join(Rails.root, 'config', 'rabbitmq.yml'))
app.reloaders << ActiveSupport::FileUpdateChecker.new([], { "app/subscribers" => [".rb"], "app/publishers" => [".rb"] }) do
puts "Active Bunny reloading..."
end
end
end
initializer "activebunny.connect_to_rabbitmq" do |app|
if File.exists?(File.join(Rails.root, 'config', 'rabbitmq.yml'))
config.active_bunny.connection
end
end
ActiveSupport::Reloader.to_prepare do
Railtie.load_stuff
::ActiveBunny::Publisher.descendants.each do |child|
child.send(:reload)
end
::ActiveBunny::Subscriber.descendants.each do |child|
child.send(:reload)
end
end
def self.load_stuff
if File.exists?(File.join(Rails.root, 'config', 'rabbitmq.yml'))
Dir.glob(File.join(Rails.root, 'app', 'publishers', '**', '*.rb'), &method(:require_dependency))
Dir.glob(File.join(Rails.root, 'app', 'subscribers', '**', '*.rb'), &method(:require_dependency))
end
end
end
end
end
require_relative 'basics'
require_relative 'active_record/hooks'
module ActiveBunny
class Subscriber
extend ActiveSupport::DescendantsTracker
extend ::ActiveBunny::Basics
end
end
\ No newline at end of file
module ActiveBunny
VERSION = '0.1.0'
end
require 'active_bunny'
class ActiveBunny::InstallGenerator < Rails::Generators::Base
source_root File.expand_path('templates', __dir__)
def template_config_file
copy_file "config.yml", "config/rabbitmq.yml"
end
end
\ No newline at end of file
class ActiveBunny::PublisherGenerator < Rails::Generators::NamedBase
source_root File.expand_path('templates', __dir__)
def create_publisher_file
template "publisher.rb", File.join("app/publishers",class_path, "#{file_name}_publisher.rb")
end
def create_module_file
return if regular_class_path.empty?
template "module.rb", File.join("app/publishers", "#{class_path.join('/')}.rb") if behavior == :invoke
end
end
\ No newline at end of file
class ActiveBunny::SubscriberGenerator < Rails::Generators::NamedBase
source_root File.expand_path('templates', __dir__)
def create_subscriber_file
template "subscriber.rb", File.join("app/subscribers",class_path, "#{file_name}_subscriber.rb")
end
def create_module_file
return if regular_class_path.empty?
template "module.rb", File.join("app/subscribers", "#{class_path.join('/')}.rb") if behavior == :invoke
end
end
\ No newline at end of file
default: &default
host: 127.0.0.1
port: 5672
username: guest
password: guest
auth_mechanism: plain
development:
<<: *default
virtual_host: development
test:
<<: *default
virtual_host: test
production:
<<: *default
virtual_host: production
<% module_namespacing do -%>
module <%= class_path.map(&:camelize).join('::') %>
end
<% end -%>
\ No newline at end of file
class <%= class_name %>Publisher < ActiveBunny::Publisher
end
\ No newline at end of file
class <%= class_name %>Subscriber < ActiveBunny::Subscriber
end
\ No newline at end of file
# desc "Explaining what the task does"
# task :activebunny do
# # Task goes here
# end
require 'test_helper'
puts(Dir.pwd)