ap4r 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,10 @@
1
+ == 0.3.x
2
+
3
+ === 0.3.0 (April 6th, 2007)
4
+
5
+ * Changed: Name space from "AP4R" to "Ap4r"
6
+ * Added: Support the latest version for Rails(1.8.6) and RubyGems(0.9.2) and Rails(1.2.3)
7
+
1
8
  == 0.2.x
2
9
 
3
10
  === 0.2.0 (October 17th, 2006)
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ require 'rbconfig'
14
14
 
15
15
  require File.join(File.dirname(__FILE__), 'lib/ap4r', 'version')
16
16
 
17
- PKG_VERSION = AP4R::VERSION::STRING
17
+ PKG_VERSION = Ap4r::VERSION::STRING
18
18
 
19
19
  TEMP_DIR = './temp'
20
20
  PKG_DIR = './pkg'
@@ -3,4 +3,4 @@ Signal.trap("INT") { puts; exit }
3
3
  require File.dirname(__FILE__) + '/../lib/ap4r/script/setup'
4
4
 
5
5
  require 'ap4r/script/workspace_generator'
6
- AP4R::Script::WorkspaceGenerator.new.run(ARGV, :generator => 'app')
6
+ Ap4r::Script::WorkspaceGenerator.new.run(ARGV, :generator => 'app')
@@ -1,4 +1,4 @@
1
- AP4R::Configuration.setup {|services|
1
+ Ap4r::Configuration.setup {|services|
2
2
  services.add 'queues_disk.cfg', :host => 'localhost', :name => :rm1
3
3
  # services.add 'queues.cfg', :name => :rm2
4
4
  }
@@ -4,7 +4,7 @@ store:
4
4
  drb:
5
5
  host:
6
6
  port: 6438
7
- acl: allow 127.0.0.1 allow 10.0.0.0/8
7
+ acl: allow 127.0.0.1 allow ::1 allow 10.0.0.0/8
8
8
  dispatchers:
9
9
  -
10
10
  targets: queue.*
@@ -3,7 +3,8 @@
3
3
  # Licence:: MIT Licence
4
4
 
5
5
  require 'rubygems'
6
- require_gem 'reliable-msg'
6
+ gem 'reliable-msg'
7
+ require 'reliable-msg'
7
8
 
8
9
  hack = true
9
10
  debug_hack = true
@@ -2,7 +2,7 @@
2
2
  # Copyright:: Copyright (c) 2006 Future System Consulting Corp.
3
3
  # Licence:: MIT Licence
4
4
 
5
- module AP4R
5
+ module Ap4r
6
6
  module Script #:nodoc:
7
7
  class Base
8
8
  cattr_accessor :logger, :ap4r_base
@@ -5,7 +5,7 @@
5
5
  require 'rubygems'
6
6
  require 'ap4r'
7
7
 
8
- module AP4R
8
+ module Ap4r
9
9
  module Script
10
10
  class QueueManagerControl < Base
11
11
  def start argv, options = {}
@@ -9,9 +9,10 @@ begin
9
9
  require 'active_support'
10
10
  rescue LoadError
11
11
  require 'rubygems'
12
- require_gem 'active_support'
12
+ gem 'active_support'
13
+ require 'active_support'
13
14
  end
14
15
 
15
16
  require 'ap4r/script/base'
16
- AP4R::Script::Base.logger = Logger.new(STDOUT)
17
- AP4R::Script::Base.ap4r_base = File.join(File.dirname(__FILE__) , '../../../')
17
+ Ap4r::Script::Base.logger = Logger.new(STDOUT)
18
+ Ap4r::Script::Base.ap4r_base = File.join(File.dirname(__FILE__) , '../../../')
@@ -5,7 +5,7 @@
5
5
  require 'fileutils'
6
6
  require 'optparse'
7
7
 
8
- module AP4R
8
+ module Ap4r
9
9
  module Script
10
10
  class WorkspaceGenerator < Base
11
11
  AP4R_Directories = %w(config log script tmp)
@@ -7,7 +7,7 @@ begin require 'rubygems'; rescue LoadError; end
7
7
  require 'reliable-msg'
8
8
  require 'ap4r/stored_message'
9
9
 
10
- module AP4R
10
+ module Ap4r
11
11
 
12
12
  # This +StoreAndForward+ provides at-least-once QoS level which
13
13
  # guarantees not to lose any message.
@@ -86,7 +86,7 @@ if __FILE__ == $0
86
86
 
87
87
  class TestSaf
88
88
 
89
- include ::AP4R::StoreAndForward
89
+ include ::Ap4r::StoreAndForward
90
90
 
91
91
  def connect
92
92
  unless ActiveRecord::Base.connected?
@@ -101,7 +101,7 @@ if __FILE__ == $0
101
101
  def async_dispatch_with_saf(queue_name, queue_message, rm_options = {})
102
102
 
103
103
  connect()
104
- stored_message_id = ::AP4R::StoredMessage.store(queue_name, queue_message, rm_options)
104
+ stored_message_id = ::Ap4r::StoredMessage.store(queue_name, queue_message, rm_options)
105
105
  forward_by_queue_info(
106
106
  stored_message_id,
107
107
  {
@@ -7,11 +7,13 @@ begin
7
7
  require 'uuid'
8
8
  rescue LoadError
9
9
  require 'rubygems'
10
- require_gem 'activerecord'
11
- require_gem 'uuid'
10
+ gem 'activerecord'
11
+ require 'activerecord'
12
+ gem 'uuid'
13
+ require 'uuid'
12
14
  end
13
15
 
14
- module AP4R
16
+ module Ap4r
15
17
 
16
18
  # This class is the model class for SAF(store and foward).
17
19
  # The migration file is located at following path,
@@ -26,14 +28,6 @@ module AP4R
26
28
  PHYSICAL = :physical
27
29
  LOGICAL = :logical
28
30
 
29
- #--
30
- # TODO: modify directory structure and be reloadable, 2006/10/17 kato-k
31
- #++
32
- # Temporarily, exclude this class from auto-reload targets of rails.
33
- def self.reloadable?
34
- false
35
- end
36
-
37
31
  # Insert queue information, such as queue name and message, for next logic.
38
32
  #
39
33
  # duplication_check_id is generated from UUID and should be unique
@@ -9,7 +9,7 @@ require 'rubygems'
9
9
  require 'ap4r'
10
10
  require 'ap4r/util/queue_client'
11
11
 
12
- class AP4R::Configuration #:nodoc:
12
+ class Ap4r::Configuration #:nodoc:
13
13
  SETTINGS_FILES_DEFAULT = %w( config/ap4r_settings.rb )
14
14
 
15
15
  class Services #:nodoc:
@@ -21,7 +21,7 @@ class AP4R::Configuration #:nodoc:
21
21
  end
22
22
 
23
23
  def add(*args)
24
- client = AP4R::Util::QueueClient.new(*args)
24
+ client = Ap4r::Util::QueueClient.new(*args)
25
25
  @list << (client)
26
26
  end
27
27
 
@@ -55,7 +55,7 @@ class IRM
55
55
  class << self
56
56
  def [](name)
57
57
  sym_name = name.to_sym
58
- AP4R::Configuration.services.find{|service| service.name == sym_name }
58
+ Ap4r::Configuration.services.find{|service| service.name == sym_name }
59
59
  end
60
60
  end
61
61
  end
@@ -63,16 +63,16 @@ end
63
63
  #--
64
64
 
65
65
  def each(&block)
66
- AP4R::Configuration.services.each(&block)
66
+ Ap4r::Configuration.services.each(&block)
67
67
  end
68
68
  extend Enumerable
69
69
 
70
- AP4R::Configuration.load_setting_files
70
+ Ap4r::Configuration.load_setting_files
71
71
 
72
72
  $original_main = self
73
73
 
74
74
  class Object
75
- AP4R::Configuration.services.each {|s|
75
+ Ap4r::Configuration.services.each {|s|
76
76
  module_eval <<-EOS
77
77
  def #{s.name.to_s}
78
78
  irb_change_workspace(IRM[:#{s.name.to_s}])
@@ -2,7 +2,7 @@
2
2
  # Copyright:: Copyright (c) 2006 Future System Consulting Corp.
3
3
  # Licence:: MIT Licence
4
4
 
5
- module AP4R::Util #:nodoc:
5
+ module Ap4r::Util #:nodoc:
6
6
  # This class is TOO EXPERIMENTAL
7
7
  #
8
8
  # Client class for +QueueManager+.
@@ -2,12 +2,12 @@
2
2
  # Copyright:: Copyright (c) 2006 Future System Consulting Corp.
3
3
  # Licence:: MIT Licence
4
4
 
5
- module AP4R
5
+ module Ap4r
6
6
  # Defines version number contants, and provides
7
7
  # its string expression.
8
8
  module VERSION #:nodoc:
9
9
  MAJOR = 0
10
- MINOR = 2
10
+ MINOR = 3
11
11
  TINY = 0
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY].join('.')
@@ -2,9 +2,9 @@
2
2
  # Copyright:: Copyright (c) 2006 Future System Consulting Corp.
3
3
  # Licence:: MIT Licence
4
4
 
5
- require_dependency 'async_controller'
6
- require_dependency 'ap4r/stored_message'
5
+ require 'async_controller'
6
+ require 'ap4r/stored_message'
7
7
 
8
8
  class ActionController::Base
9
- include AP4R::AsyncController::Base
9
+ include Ap4r::AsyncController::Base
10
10
  end
@@ -5,7 +5,7 @@
5
5
  require 'reliable-msg'
6
6
  #require 'ap4r/stored_message'
7
7
 
8
- module AP4R
8
+ module Ap4r
9
9
  # This +asyncController+ is the Rails plugin for asynchronous processing.
10
10
  # Asynchronous logics are called via various protocols, such as XML-RPC,
11
11
  # SOAP, HTTP PUT, and more. Now implemented jsut as XML-RPC.
@@ -81,7 +81,7 @@ module AP4R
81
81
  StoredMessage.transaction do
82
82
  options = {:delete_mode => @delete_mode || :physical}
83
83
  forwarded_messages.keys.each {|id|
84
- ::AP4R::StoredMessage.destroy_if_exists(id, options)
84
+ ::Ap4r::StoredMessage.destroy_if_exists(id, options)
85
85
  }
86
86
  end
87
87
  rescue Exception => err
@@ -140,7 +140,7 @@ module AP4R
140
140
  queue_headers = converter.make_rm_options
141
141
 
142
142
  if Thread.current[:use_saf]
143
- stored_message = ::AP4R::StoredMessage.store(queue_name, queue_message, queue_headers)
143
+ stored_message = ::Ap4r::StoredMessage.store(queue_name, queue_message, queue_headers)
144
144
 
145
145
  Thread.current[:stored_messages].store(
146
146
  stored_message.id,
@@ -181,7 +181,7 @@ module AP4R
181
181
  # add self to a Converters list.
182
182
  def self.dispatch_mode(mode_symbol)
183
183
  self.const_set(:DISPATCH_MODE, mode_symbol)
184
- ::AP4R::AsyncController::Base::Converters[mode_symbol] = self
184
+ ::Ap4r::AsyncController::Base::Converters[mode_symbol] = self
185
185
  end
186
186
 
187
187
  def initialize(controller, async_params, options, rm_options)
@@ -2,4 +2,4 @@ require 'rubygems'
2
2
  require 'ap4r/script/setup'
3
3
 
4
4
  require 'ap4r/script/queue_manager_control'
5
- AP4R::Script::QueueManagerControl.new.start(ARGV)
5
+ Ap4r::Script::QueueManagerControl.new.start(ARGV)
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
2
+ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: ap4r
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.0
7
- date: 2006-10-17 00:00:00 +09:00
6
+ version: 0.3.0
7
+ date: 2007-04-06 00:00:00 +09:00
8
8
  summary: Asynchronous Processing for Ruby.
9
9
  require_paths:
10
10
  - lib
@@ -25,54 +25,56 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
25
25
  platform: ruby
26
26
  signing_key:
27
27
  cert_chain:
28
+ post_install_message:
28
29
  authors:
29
30
  - Shunichi Shinohara
30
31
  - Kiwamu Kato
31
32
  files:
32
- - CHANGELOG
33
- - Rakefile
34
33
  - bin
35
- - README
34
+ - CHANGELOG
35
+ - config
36
+ - doc
36
37
  - lib
37
38
  - MIT-LICENSE
38
- - config
39
- - script
40
39
  - rails_plugin
40
+ - Rakefile
41
+ - README
42
+ - script
41
43
  - bin/ap4r_setup
42
- - config/queues_disk.cfg
43
- - config/queues_mysql.cfg
44
- - config/log4r.yaml
45
44
  - config/ap4r_settings.rb
45
+ - config/log4r.yaml
46
46
  - config/queues.cfg
47
+ - config/queues_disk.cfg
48
+ - config/queues_mysql.cfg
47
49
  - rails_plugin/ap4r
48
50
  - rails_plugin/ap4r/init.rb
49
51
  - rails_plugin/ap4r/lib
50
52
  - rails_plugin/ap4r/lib/async_controller.rb
51
53
  - script/irm
52
- - script/stop
54
+ - script/loop.cmd
53
55
  - script/loop.rb
54
56
  - script/start
55
- - script/loop.cmd
56
- - lib/ap4r.rb
57
+ - script/stop
57
58
  - lib/ap4r
59
+ - lib/ap4r/message_store_ext.rb
60
+ - lib/ap4r/multi_queue.rb
58
61
  - lib/ap4r/queue_manager_ext.rb
59
62
  - lib/ap4r/queue_manager_ext_debug.rb
60
- - lib/ap4r/stored_message.rb
61
- - lib/ap4r/store_and_forward.rb
62
63
  - lib/ap4r/retention_history.rb
63
- - lib/ap4r/util
64
- - lib/ap4r/start_with_log4r.rb
65
- - lib/ap4r/multi_queue.rb
66
- - lib/ap4r/message_store_ext.rb
67
64
  - lib/ap4r/script
68
- - lib/ap4r/version.rb
69
- - lib/ap4r/util/loc.rb
70
- - lib/ap4r/util/queue_client.rb
71
- - lib/ap4r/util/irm.rb
72
65
  - lib/ap4r/script/base.rb
73
- - lib/ap4r/script/workspace_generator.rb
74
66
  - lib/ap4r/script/queue_manager_control.rb
75
67
  - lib/ap4r/script/setup.rb
68
+ - lib/ap4r/script/workspace_generator.rb
69
+ - lib/ap4r/start_with_log4r.rb
70
+ - lib/ap4r/store_and_forward.rb
71
+ - lib/ap4r/stored_message.rb
72
+ - lib/ap4r/util
73
+ - lib/ap4r/util/irm.rb
74
+ - lib/ap4r/util/loc.rb
75
+ - lib/ap4r/util/queue_client.rb
76
+ - lib/ap4r/version.rb
77
+ - lib/ap4r.rb
76
78
  test_files: []
77
79
 
78
80
  rdoc_options: