magent 0.4.2 → 0.5.0

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.
@@ -0,0 +1,55 @@
1
+ namespace :magent do
2
+ desc "start magent queue"
3
+ task :start do
4
+ if env = Rake::Task["environment"]
5
+ env.invoke
6
+ end
7
+ queue = ENV['QUEUE'] || 'default'
8
+ puts "Starting magent working on #{queue}. #{Magent.config.inspect}"
9
+ Magent::Processor.new(Magent::AsyncChannel.new(queue)).run!
10
+ end
11
+
12
+ desc "display all errors"
13
+ task :errors do
14
+ if env = Rake::Task["environment"]
15
+ env.invoke
16
+ end
17
+
18
+ channel = Magent::AsyncChannel.new(ENV['QUEUE'] || 'default')
19
+
20
+ page = 1
21
+
22
+ channel.error_collection.find({}).each do |error|
23
+ puts error.to_json
24
+ end
25
+ end
26
+
27
+ desc "remove all errors"
28
+ task :remove_errors do
29
+ if env = Rake::Task["environment"]
30
+ env.invoke
31
+ end
32
+
33
+ channel = Magent::AsyncChannel.new(ENV['QUEUE'] || 'default')
34
+
35
+ page = 1
36
+
37
+ collection = channel.error_collection
38
+ collection.remove({})
39
+ end
40
+
41
+ desc "retry all errors"
42
+ task :retry do
43
+ if env = Rake::Task["environment"]
44
+ env.invoke
45
+ end
46
+
47
+ channel = Magent::AsyncChannel.new(ENV['QUEUE'] || 'default')
48
+
49
+ page = 1
50
+
51
+ channel.error_collection.find({}).each do |error|
52
+ channel.retry_error(error)
53
+ end
54
+ end
55
+ end
@@ -1,46 +1,97 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
1
4
  # -*- encoding: utf-8 -*-
2
5
 
3
6
  Gem::Specification.new do |s|
4
7
  s.name = %q{magent}
5
- s.version = "0.4.2"
8
+ s.version = "0.5.0"
6
9
 
7
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["David Cuadrado"]
9
- s.date = %q{2010-09-06}
11
+ s.authors = ["David A. Cuadrado"]
12
+ s.date = %q{2010-10-15}
10
13
  s.default_executable = %q{magent}
11
14
  s.description = %q{Simple job queue system based on mongodb}
12
- s.email = ["krawek@gmail.com"]
15
+ s.email = %q{krawek@gmail.com}
13
16
  s.executables = ["magent"]
14
- s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt"]
15
- s.files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "bin/magent", "examples/comm/run.rb", "examples/comm/worker.rb", "examples/error/error.rb", "examples/simple/bot.rb", "examples/stats/stats.rb", "lib/magent.rb", "lib/magent/actor.rb", "lib/magent/channel.rb", "lib/magent/generic_channel.rb", "lib/magent/processor.rb", "lib/magent/push.rb", "lib/magent/utils.rb", "magent.gemspec", "script/console", "test/test_helper.rb", "test/test_magent.rb"]
17
+ s.extra_rdoc_files = [
18
+ "LICENSE",
19
+ "README.rdoc"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ ".gitignore",
24
+ "Gemfile",
25
+ "Gemfile.lock",
26
+ "History.txt",
27
+ "LICENSE",
28
+ "Manifest.txt",
29
+ "PostInstall.txt",
30
+ "README.rdoc",
31
+ "Rakefile",
32
+ "VERSION",
33
+ "bin/magent",
34
+ "examples/comm/run.rb",
35
+ "examples/comm/worker.rb",
36
+ "examples/error/error.rb",
37
+ "examples/mongomapper/async.rb",
38
+ "examples/simple/bot.rb",
39
+ "examples/stats/stats.rb",
40
+ "lib/magent.rb",
41
+ "lib/magent/actor.rb",
42
+ "lib/magent/actor_channel.rb",
43
+ "lib/magent/async.rb",
44
+ "lib/magent/async_channel.rb",
45
+ "lib/magent/failure.rb",
46
+ "lib/magent/generic_channel.rb",
47
+ "lib/magent/processor.rb",
48
+ "lib/magent/push.rb",
49
+ "lib/magent/railtie.rb",
50
+ "lib/magent/utils.rb",
51
+ "lib/magent/web_socket_channel.rb",
52
+ "lib/magent/web_socket_server.rb",
53
+ "lib/tasks/magent.rake",
54
+ "magent.gemspec",
55
+ "script/console",
56
+ "test/test_helper.rb",
57
+ "test/test_magent.rb"
58
+ ]
16
59
  s.homepage = %q{http://github.com/dcu/magent}
17
- s.post_install_message = %q{}
18
- s.rdoc_options = ["--main", "README.rdoc"]
60
+ s.rdoc_options = ["--charset=UTF-8"]
19
61
  s.require_paths = ["lib"]
20
- s.rubyforge_project = %q{magent}
21
62
  s.rubygems_version = %q{1.3.7}
22
63
  s.summary = %q{Simple job queue system based on mongodb}
23
- s.test_files = ["test/test_helper.rb", "test/test_magent.rb"]
64
+ s.test_files = [
65
+ "test/test_helper.rb",
66
+ "test/test_magent.rb",
67
+ "examples/simple/bot.rb",
68
+ "examples/error/error.rb",
69
+ "examples/comm/run.rb",
70
+ "examples/comm/worker.rb",
71
+ "examples/mongomapper/async.rb",
72
+ "examples/stats/stats.rb"
73
+ ]
24
74
 
25
75
  if s.respond_to? :specification_version then
26
76
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
27
77
  s.specification_version = 3
28
78
 
29
79
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
30
- s.add_runtime_dependency(%q<mongo>, [">= 0.1.0"])
31
- s.add_runtime_dependency(%q<uuidtools>, [">= 2.0.0"])
32
- s.add_development_dependency(%q<rubyforge>, [">= 2.0.4"])
33
- s.add_development_dependency(%q<hoe>, [">= 2.6.2"])
80
+ s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
81
+ s.add_runtime_dependency(%q<mongo>, [">= 0"])
82
+ s.add_runtime_dependency(%q<em-websocket>, [">= 0"])
83
+ s.add_runtime_dependency(%q<uuidtools>, [">= 0"])
34
84
  else
35
- s.add_dependency(%q<mongo>, [">= 0.1.0"])
36
- s.add_dependency(%q<uuidtools>, [">= 2.0.0"])
37
- s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
38
- s.add_dependency(%q<hoe>, [">= 2.6.2"])
85
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
86
+ s.add_dependency(%q<mongo>, [">= 0"])
87
+ s.add_dependency(%q<em-websocket>, [">= 0"])
88
+ s.add_dependency(%q<uuidtools>, [">= 0"])
39
89
  end
40
90
  else
41
- s.add_dependency(%q<mongo>, [">= 0.1.0"])
42
- s.add_dependency(%q<uuidtools>, [">= 2.0.0"])
43
- s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
44
- s.add_dependency(%q<hoe>, [">= 2.6.2"])
91
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
92
+ s.add_dependency(%q<mongo>, [">= 0"])
93
+ s.add_dependency(%q<em-websocket>, [">= 0"])
94
+ s.add_dependency(%q<uuidtools>, [">= 0"])
45
95
  end
46
96
  end
97
+
metadata CHANGED
@@ -5,113 +5,117 @@ version: !ruby/object:Gem::Version
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 4
9
- - 2
10
- version: 0.4.2
8
+ - 5
9
+ - 0
10
+ version: 0.5.0
11
11
  platform: ruby
12
12
  authors:
13
- - David Cuadrado
13
+ - David A. Cuadrado
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-06 00:00:00 -05:00
19
- default_executable:
18
+ date: 2010-10-15 00:00:00 -05:00
19
+ default_executable: magent
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: mongo
22
+ name: thoughtbot-shoulda
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- hash: 27
29
+ hash: 3
30
30
  segments:
31
31
  - 0
32
- - 1
33
- - 0
34
- version: 0.1.0
35
- type: :runtime
32
+ version: "0"
33
+ type: :development
36
34
  version_requirements: *id001
37
35
  - !ruby/object:Gem::Dependency
38
- name: uuidtools
36
+ name: mongo
39
37
  prerelease: false
40
38
  requirement: &id002 !ruby/object:Gem::Requirement
41
39
  none: false
42
40
  requirements:
43
41
  - - ">="
44
42
  - !ruby/object:Gem::Version
45
- hash: 15
43
+ hash: 3
46
44
  segments:
47
- - 2
48
- - 0
49
45
  - 0
50
- version: 2.0.0
46
+ version: "0"
51
47
  type: :runtime
52
48
  version_requirements: *id002
53
49
  - !ruby/object:Gem::Dependency
54
- name: rubyforge
50
+ name: em-websocket
55
51
  prerelease: false
56
52
  requirement: &id003 !ruby/object:Gem::Requirement
57
53
  none: false
58
54
  requirements:
59
55
  - - ">="
60
56
  - !ruby/object:Gem::Version
61
- hash: 7
57
+ hash: 3
62
58
  segments:
63
- - 2
64
59
  - 0
65
- - 4
66
- version: 2.0.4
67
- type: :development
60
+ version: "0"
61
+ type: :runtime
68
62
  version_requirements: *id003
69
63
  - !ruby/object:Gem::Dependency
70
- name: hoe
64
+ name: uuidtools
71
65
  prerelease: false
72
66
  requirement: &id004 !ruby/object:Gem::Requirement
73
67
  none: false
74
68
  requirements:
75
69
  - - ">="
76
70
  - !ruby/object:Gem::Version
77
- hash: 19
71
+ hash: 3
78
72
  segments:
79
- - 2
80
- - 6
81
- - 2
82
- version: 2.6.2
83
- type: :development
73
+ - 0
74
+ version: "0"
75
+ type: :runtime
84
76
  version_requirements: *id004
85
77
  description: Simple job queue system based on mongodb
86
- email:
87
- - krawek@gmail.com
78
+ email: krawek@gmail.com
88
79
  executables:
89
80
  - magent
90
81
  extensions: []
91
82
 
92
83
  extra_rdoc_files:
93
- - History.txt
94
- - Manifest.txt
95
- - PostInstall.txt
84
+ - LICENSE
85
+ - README.rdoc
96
86
  files:
87
+ - .document
88
+ - .gitignore
89
+ - Gemfile
90
+ - Gemfile.lock
97
91
  - History.txt
92
+ - LICENSE
98
93
  - Manifest.txt
99
94
  - PostInstall.txt
100
95
  - README.rdoc
101
96
  - Rakefile
97
+ - VERSION
102
98
  - bin/magent
103
99
  - examples/comm/run.rb
104
100
  - examples/comm/worker.rb
105
101
  - examples/error/error.rb
102
+ - examples/mongomapper/async.rb
106
103
  - examples/simple/bot.rb
107
104
  - examples/stats/stats.rb
108
105
  - lib/magent.rb
109
106
  - lib/magent/actor.rb
110
- - lib/magent/channel.rb
107
+ - lib/magent/actor_channel.rb
108
+ - lib/magent/async.rb
109
+ - lib/magent/async_channel.rb
110
+ - lib/magent/failure.rb
111
111
  - lib/magent/generic_channel.rb
112
112
  - lib/magent/processor.rb
113
113
  - lib/magent/push.rb
114
+ - lib/magent/railtie.rb
114
115
  - lib/magent/utils.rb
116
+ - lib/magent/web_socket_channel.rb
117
+ - lib/magent/web_socket_server.rb
118
+ - lib/tasks/magent.rake
115
119
  - magent.gemspec
116
120
  - script/console
117
121
  - test/test_helper.rb
@@ -120,10 +124,9 @@ has_rdoc: true
120
124
  homepage: http://github.com/dcu/magent
121
125
  licenses: []
122
126
 
123
- post_install_message: ""
127
+ post_install_message:
124
128
  rdoc_options:
125
- - --main
126
- - README.rdoc
129
+ - --charset=UTF-8
127
130
  require_paths:
128
131
  - lib
129
132
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -146,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
149
  version: "0"
147
150
  requirements: []
148
151
 
149
- rubyforge_project: magent
152
+ rubyforge_project:
150
153
  rubygems_version: 1.3.7
151
154
  signing_key:
152
155
  specification_version: 3
@@ -154,3 +157,9 @@ summary: Simple job queue system based on mongodb
154
157
  test_files:
155
158
  - test/test_helper.rb
156
159
  - test/test_magent.rb
160
+ - examples/simple/bot.rb
161
+ - examples/error/error.rb
162
+ - examples/comm/run.rb
163
+ - examples/comm/worker.rb
164
+ - examples/mongomapper/async.rb
165
+ - examples/stats/stats.rb