rock-queue-smpp 0.1.1 → 0.1.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.
@@ -1,6 +1,6 @@
1
1
  require 'active_record'
2
2
 
3
- module RockQueue
3
+ module RockQueueSmpp
4
4
  module ActiveRecordHelper
5
5
  def self.included(base)
6
6
  base.extend ClassMethods
@@ -18,8 +18,8 @@ module RockQueue
18
18
 
19
19
  module InstanceMethods
20
20
  def async(method, *args)
21
- config = RockQueue::Config.settings
22
- rq = RockQueue::Base.new config.adapter, {:server => config.host, :port => config.port}
21
+ config = RockQueueSmpp::Config.settings
22
+ rq = RockQueueSmpp::Base.new config.adapter, {:server => config.host, :port => config.port}
23
23
  rq.push self.class, id, method, *args
24
24
  end
25
25
  end
@@ -5,7 +5,7 @@ rescue
5
5
  exit
6
6
  end
7
7
 
8
- module RockQueue
8
+ module RockQueueSmpp
9
9
  class Beanstalkd
10
10
 
11
11
  attr_reader :obj
@@ -5,7 +5,7 @@ rescue
5
5
  exit
6
6
  end
7
7
 
8
- module RockQueue
8
+ module RockQueueSmpp
9
9
  class DelayedJob
10
10
 
11
11
  attr_reader :obj
@@ -5,7 +5,7 @@ rescue
5
5
  exit
6
6
  end
7
7
 
8
- module RockQueue
8
+ module RockQueueSmpp
9
9
  class ResqueQueue
10
10
 
11
11
  attr_reader :obj
@@ -1,4 +1,4 @@
1
- module RockQueue
1
+ module RockQueueSmpp
2
2
  class Config
3
3
 
4
4
  attr_accessor :adapter, :host, :port, :smpp_config
@@ -8,7 +8,7 @@ module RockQueue
8
8
  @__instance__ ||= new
9
9
  end
10
10
 
11
- # Yields a singleton instance of RockQueue::Config so you can specify config
11
+ # Yields a singleton instance of RockQueueSmpp::Config so you can specify config
12
12
  # information like server address, port etc.
13
13
  def self.settings
14
14
  if block_given?
@@ -1,4 +1,4 @@
1
- module RockQueue
1
+ module RockQueueSmpp
2
2
  class AdapterNotSupported < RuntimeError; end
3
3
  class NoClassError < RuntimeError; end
4
4
  class QueueingServerNotRunning < RuntimeError; end
@@ -1,4 +1,4 @@
1
- module RockQueue
1
+ module RockQueueSmpp
2
2
 
3
3
  class EmailNotifier < AbstractNotifier
4
4
 
@@ -1,6 +1,6 @@
1
1
  require "observer"
2
2
 
3
- module RockQueue
3
+ module RockQueueSmpp
4
4
  class Notifiers
5
5
  include Observable
6
6
 
@@ -1,4 +1,4 @@
1
- module RockQueue
1
+ module RockQueueSmpp
2
2
 
3
3
  # Queue object wrapper
4
4
  class QueueObject
@@ -20,7 +20,7 @@ module RockQueue
20
20
  if @fails.length < DEFAULT_FAIL_LIMIT
21
21
  return true
22
22
  else
23
- RockQueue::Notifiers.instance.notify(exception)
23
+ RockQueueSmpp::Notifiers.instance.notify(exception)
24
24
  end
25
25
  end
26
26
 
@@ -3,7 +3,7 @@ require 'rock-queue'
3
3
  namespace :rock_queue do
4
4
  desc "Start a Rock Queue worker"
5
5
  task :work do
6
- worker = RockQueue::Worker.new
6
+ worker = RockQueueSmpp::Worker.new
7
7
  worker.verbose = ENV['VERBOSE']
8
8
  puts "=> Rock-queue worker initialized (#{worker})"
9
9
  worker.work
@@ -0,0 +1 @@
1
+ RockQueueSmpp Web Interface
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'sinatra/base'
3
3
  require 'erb'
4
4
 
5
- module RockQueue
5
+ module RockQueueSmpp
6
6
  class Web < Sinatra::Base
7
7
 
8
8
  configure do
@@ -1,4 +1,4 @@
1
- module RockQueue
1
+ module RockQueueSmpp
2
2
  class Worker
3
3
  # Whether the worker should log basic info to STDOUT
4
4
  attr_accessor :verbose
@@ -6,8 +6,8 @@ module RockQueue
6
6
  # Initialize connection to queue server
7
7
  def initialize
8
8
  puts "=> Initializing..."
9
- config = RockQueue::Config.settings
10
- @queue = RockQueue::Base.new config.adapter, {
9
+ config = RockQueueSmpp::Config.settings
10
+ @queue = RockQueueSmpp::Base.new config.adapter, {
11
11
  :server => config.host,
12
12
  :port => config.port
13
13
  }
@@ -16,7 +16,7 @@ module RockQueue
16
16
  # Main worker loop where all jobs are beeing pulled of the queue.
17
17
  # This is also a place where every job starts and ends it's lifecycle.
18
18
  def work
19
- config = RockQueue::Config.settings
19
+ config = RockQueueSmpp::Config.settings
20
20
  puts "=> Worker ready. Hold your horses!"
21
21
  loop do
22
22
  EventMachine::run do
@@ -1,7 +1,7 @@
1
1
  $:.unshift File.expand_path(File.dirname(__FILE__))
2
2
  require 'logger'
3
3
 
4
- module RockQueue
4
+ module RockQueueSmpp
5
5
 
6
6
  autoload :Config, 'rock-queue/config'
7
7
 
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rock-queue-smpp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grzegorz Kazulak, Matt Van Veenendaal
8
- autorequire: rock-queue
8
+ autorequire: rock-queue-smpp
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
@@ -24,23 +24,23 @@ extra_rdoc_files:
24
24
  files:
25
25
  - LICENSE
26
26
  - Rakefile
27
- - lib/rock-queue/active_record_helper.rb
28
- - lib/rock-queue/adapters/beanstalkd.rb
29
- - lib/rock-queue/adapters/delayed_job.rb
30
- - lib/rock-queue/adapters/resque.rb
31
- - lib/rock-queue/config.rb
32
- - lib/rock-queue/errors.rb
33
- - lib/rock-queue/notifiers/abstract_notifier.rb
34
- - lib/rock-queue/notifiers/email_notifier.rb
35
- - lib/rock-queue/notifiers.rb
36
- - lib/rock-queue/queue_object.rb
37
- - lib/rock-queue/tasks.rb
38
- - lib/rock-queue/web/views/dashboard.erb
39
- - lib/rock-queue/web.rb
40
- - lib/rock-queue/worker.rb
41
- - lib/rock-queue.rb
27
+ - lib/rock-queue-smpp/active_record_helper.rb
28
+ - lib/rock-queue-smpp/adapters/beanstalkd.rb
29
+ - lib/rock-queue-smpp/adapters/delayed_job.rb
30
+ - lib/rock-queue-smpp/adapters/resque.rb
31
+ - lib/rock-queue-smpp/config.rb
32
+ - lib/rock-queue-smpp/errors.rb
33
+ - lib/rock-queue-smpp/notifiers/abstract_notifier.rb
34
+ - lib/rock-queue-smpp/notifiers/email_notifier.rb
35
+ - lib/rock-queue-smpp/notifiers.rb
36
+ - lib/rock-queue-smpp/queue_object.rb
37
+ - lib/rock-queue-smpp/tasks.rb
38
+ - lib/rock-queue-smpp/web/views/dashboard.erb
39
+ - lib/rock-queue-smpp/web.rb
40
+ - lib/rock-queue-smpp/worker.rb
41
+ - lib/rock-queue-smpp.rb
42
42
  has_rdoc: true
43
- homepage: http://github.com/mattvv/rock-queue-rmpp
43
+ homepage: http://github.com/mattvv/rock-queue-smpp
44
44
  licenses: []
45
45
 
46
46
  post_install_message:
@@ -1 +0,0 @@
1
- RockQueue Web Interface