daemon-kit 0.1.7.10 → 0.1.7.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/.gitignore +5 -0
  2. data/Configuration.txt +8 -0
  3. data/History.txt +13 -1
  4. data/Logging.txt +4 -0
  5. data/Manifest.txt +7 -1
  6. data/PostInstall.txt +1 -1
  7. data/README.rdoc +9 -13
  8. data/Rakefile +22 -30
  9. data/TODO.txt +1 -10
  10. data/app_generators/daemon_kit/daemon_kit_generator.rb +18 -1
  11. data/app_generators/daemon_kit/templates/config/boot.rb +6 -15
  12. data/app_generators/daemon_kit/templates/config/environments/production.rb +3 -0
  13. data/bin/{daemon_kit → daemon-kit} +0 -0
  14. data/config/website.yml +2 -0
  15. data/daemon-kit.gemspec +264 -0
  16. data/daemon_generators/nanite_agent/templates/config/nanite.yml +2 -2
  17. data/daemon_generators/rspec/templates/spec/spec_helper.rb +3 -1
  18. data/daemon_generators/rspec/templates/tasks/rspec.rake +8 -10
  19. data/daemon_generators/test_unit/USAGE +5 -0
  20. data/daemon_generators/test_unit/templates/tasks/test_unit.rake +7 -0
  21. data/daemon_generators/test_unit/templates/test/test.rb +9 -0
  22. data/daemon_generators/test_unit/templates/test/test_helper.rb +6 -0
  23. data/daemon_generators/test_unit/test_unit_generator.rb +51 -0
  24. data/lib/daemon_kit.rb +9 -1
  25. data/lib/daemon_kit/abstract_logger.rb +6 -0
  26. data/lib/daemon_kit/application.rb +1 -0
  27. data/lib/daemon_kit/arguments.rb +5 -0
  28. data/lib/daemon_kit/error_handlers/hoptoad.rb +4 -4
  29. data/lib/daemon_kit/exceptions.rb +7 -0
  30. data/lib/daemon_kit/initializer.rb +25 -11
  31. data/lib/daemon_kit/nanite/agent.rb +26 -5
  32. data/lib/daemon_kit/ruote_workitem.rb +9 -1
  33. data/lib/daemon_kit/tasks/god.rake +1 -1
  34. data/lib/daemon_kit/xmpp.rb +31 -0
  35. data/tasks/cucumber.rake +13 -0
  36. data/tasks/tests.rake +6 -0
  37. data/templates/god/god.erb +2 -2
  38. data/test/test_ruote_generator.rb +8 -2
  39. data/test/test_test_unit_generator.rb +46 -0
  40. metadata +45 -36
@@ -0,0 +1,13 @@
1
+ begin
2
+ require 'cucumber/rake/task'
3
+
4
+ Cucumber::Rake::Task.new(:features) do |t|
5
+ t.fork = true
6
+ t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
7
+ end
8
+ rescue LoadError
9
+ desc 'Cucumber rake task not available'
10
+ task :features do
11
+ abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
12
+ end
13
+ end
@@ -0,0 +1,6 @@
1
+ require 'rake/testtask'
2
+ Rake::TestTask.new do |t|
3
+ t.libs << "test"
4
+ t.test_files = FileList['test/test_*.rb']
5
+ t.verbose = true
6
+ end
@@ -9,8 +9,8 @@ DAEMON_ROOT = "<%= DaemonKit.root %>"
9
9
  God.watch do |w|
10
10
  w.name = '<%= DaemonKit.configuration.daemon_name %>'
11
11
  w.interval = 30.seconds
12
- w.start = "/usr/bin/env DAEMON_ENV=<%= DaemonKit.env %> <%= DaemonKit.root %>/bin/<%= DaemonKit.configuration.daemon_name %> start"
13
- w.stop = "/usr/bin/env DAEMON_ENV=<%= DaemonKit.env %> <%= DaemonKit.root %>/bin/<%= DaemonKit.configuration.daemon_name %> stop"
12
+ w.start = "/usr/bin/env DAEMON_ENV=<%= DaemonKit.env %> #{DAEMON_ROOT}/bin/<%= DaemonKit.configuration.daemon_name %> start"
13
+ w.stop = "/usr/bin/env DAEMON_ENV=<%= DaemonKit.env %> #{DAEMON_ROOT}/bin/<%= DaemonKit.configuration.daemon_name %> stop"
14
14
  w.start_grace = 10.seconds
15
15
  w.stop_grace = 10.seconds
16
16
  w.pid_file = "<%= DaemonKit.configuration.pid_file %>"
@@ -29,8 +29,14 @@ class TestRuoteGenerator < Test::Unit::TestCase
29
29
  def test_generator_without_options
30
30
  name = "myapp"
31
31
  run_generator('ruote', [name], sources)
32
- assert_directory_exists "some/directory"
33
- assert_generated_file "some_file"
32
+ assert_directory_exists "config"
33
+ assert_generated_file "config/amqp.yml"
34
+ assert_generated_file "config/ruote.yml"
35
+ assert_directory_exists "config/initializers"
36
+ assert_generated_file "config/initializers/myapp.rb"
37
+
38
+ assert_generated_file "lib/myapp.rb"
39
+ assert_generated_file "lib/sample.rb"
34
40
  end
35
41
 
36
42
  private
@@ -0,0 +1,46 @@
1
+ require File.join(File.dirname(__FILE__), "test_generator_helper.rb")
2
+
3
+
4
+ class TestTestUnitGenerator < Test::Unit::TestCase
5
+ include RubiGen::GeneratorTestHelper
6
+
7
+ def setup
8
+ bare_setup
9
+ end
10
+
11
+ def teardown
12
+ bare_teardown
13
+ end
14
+
15
+ # Some generator-related assertions:
16
+ # assert_generated_file(name, &block) # block passed the file contents
17
+ # assert_directory_exists(name)
18
+ # assert_generated_class(name, &block)
19
+ # assert_generated_module(name, &block)
20
+ # assert_generated_test_for(name, &block)
21
+ # The assert_generated_(class|module|test_for) &block is passed the body of the class/module within the file
22
+ # assert_has_method(body, *methods) # check that the body has a list of methods (methods with parentheses not supported yet)
23
+ #
24
+ # Other helper methods are:
25
+ # app_root_files - put this in teardown to show files generated by the test method (e.g. p app_root_files)
26
+ # bare_setup - place this in setup method to create the APP_ROOT folder for each test
27
+ # bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
28
+
29
+ def test_generator_without_options
30
+ name = "myapp"
31
+ run_generator('test_unit', [name], sources)
32
+ assert_directory_exists "test"
33
+ assert_generated_file "test/test_helper.rb"
34
+ assert_generated_file "test/myproject_test.rb"
35
+ end
36
+
37
+ private
38
+ def sources
39
+ [RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", generator_path))
40
+ ]
41
+ end
42
+
43
+ def generator_path
44
+ "daemon_generators"
45
+ end
46
+ end
metadata CHANGED
@@ -1,73 +1,61 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daemon-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7.10
4
+ version: 0.1.7.11
5
5
  platform: ruby
6
6
  authors:
7
- - Kenneth Kalmer
7
+ - kenneth.kalmer@gmail.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-12 00:00:00 +02:00
13
- default_executable:
12
+ date: 2009-11-30 00:00:00 +02:00
13
+ default_executable: daemon-kit
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: rubigen
16
+ name: eventmachine
17
17
  type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.5.2
23
+ version: 0.12.8
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
- name: eventmachine
26
+ name: rubigen
27
27
  type: :runtime
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.12.8
33
+ version: 1.5.2
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
- name: newgem
36
+ name: rspec
37
37
  type: :development
38
38
  version_requirement:
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 1.5.1
43
+ version: "0"
44
44
  version:
45
45
  - !ruby/object:Gem::Dependency
46
- name: hoe
46
+ name: cucumber
47
47
  type: :development
48
48
  version_requirement:
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 2.3.2
53
+ version: "0"
54
54
  version:
55
- description: |-
56
- Daemon Kit aims to simplify creating Ruby daemons by providing a sound application skeleton (through a generator), task specific generators (jabber bot, etc) and robust environment management code.
57
-
58
- Using simple built-in generators it is easy to created evented and non-evented daemons that perform a multitude of different tasks.
59
-
60
- Supported generators:
61
-
62
- * XMPP bot (non-evented)
63
- * AMQP consumer (evented)
64
- * Nanite agent
65
- * Cron-style daemon
66
- * ruote remote participants
67
- email:
68
- - kenneth.kalmer@gmail.com
55
+ description: daemon-kit aims to simplify creating Ruby daemons by providing a sound application skeleton (through a generator), task specific generators (jabber bot, etc) and robust environment management code.
56
+ email: kenneth.kalmer@gmail.com
69
57
  executables:
70
- - daemon_kit
58
+ - daemon-kit
71
59
  extensions: []
72
60
 
73
61
  extra_rdoc_files:
@@ -77,9 +65,11 @@ extra_rdoc_files:
77
65
  - Logging.txt
78
66
  - Manifest.txt
79
67
  - PostInstall.txt
68
+ - README.rdoc
80
69
  - RuoteParticipants.txt
81
70
  - TODO.txt
82
71
  files:
72
+ - .gitignore
83
73
  - Configuration.txt
84
74
  - Deployment.txt
85
75
  - History.txt
@@ -108,7 +98,9 @@ files:
108
98
  - app_generators/daemon_kit/templates/script/console
109
99
  - app_generators/daemon_kit/templates/script/destroy
110
100
  - app_generators/daemon_kit/templates/script/generate
111
- - bin/daemon_kit
101
+ - bin/daemon-kit
102
+ - config/website.yml
103
+ - daemon-kit.gemspec
112
104
  - daemon_generators/amqp/USAGE
113
105
  - daemon_generators/amqp/amqp_generator.rb
114
106
  - daemon_generators/amqp/templates/config/amqp.yml
@@ -156,6 +148,11 @@ files:
156
148
  - daemon_generators/ruote/templates/lib/daemon.rb
157
149
  - daemon_generators/ruote/templates/lib/sample.rb
158
150
  - daemon_generators/ruote/templates/libexec/daemon.rb
151
+ - daemon_generators/test_unit/USAGE
152
+ - daemon_generators/test_unit/templates/tasks/test_unit.rake
153
+ - daemon_generators/test_unit/templates/test/test.rb
154
+ - daemon_generators/test_unit/templates/test/test_helper.rb
155
+ - daemon_generators/test_unit/test_unit_generator.rb
159
156
  - lib/daemon_kit.rb
160
157
  - lib/daemon_kit/abstract_logger.rb
161
158
  - lib/daemon_kit/amqp.rb
@@ -190,6 +187,7 @@ files:
190
187
  - lib/daemon_kit/tasks/god.rake
191
188
  - lib/daemon_kit/tasks/log.rake
192
189
  - lib/daemon_kit/tasks/monit.rake
190
+ - lib/daemon_kit/xmpp.rb
193
191
  - script/console
194
192
  - script/destroy
195
193
  - script/generate
@@ -205,7 +203,9 @@ files:
205
203
  - spec/initializer_spec.rb
206
204
  - spec/spec.opts
207
205
  - spec/spec_helper.rb
206
+ - tasks/cucumber.rake
208
207
  - tasks/rspec.rake
208
+ - tasks/tests.rake
209
209
  - templates/god/god.erb
210
210
  - templates/monit/monit.erb
211
211
  - test/test_amqp_generator.rb
@@ -218,6 +218,7 @@ files:
218
218
  - test/test_jabber_generator.rb
219
219
  - test/test_nanite_agent_generator.rb
220
220
  - test/test_ruote_generator.rb
221
+ - test/test_test_unit_generator.rb
221
222
  - vendor/tmail-1.2.3/tmail.rb
222
223
  - vendor/tmail-1.2.3/tmail/address.rb
223
224
  - vendor/tmail-1.2.3/tmail/attachments.rb
@@ -247,19 +248,18 @@ files:
247
248
  - vendor/tmail-1.2.3/tmail/version.rb
248
249
  - vendor/tmail.rb
249
250
  has_rdoc: true
250
- homepage: http://kit.rubyforge.org/daemon-kit/rdoc/
251
+ homepage: http://github.com/kennethkalmer/daemon-kit
251
252
  licenses: []
252
253
 
253
254
  post_install_message: |+
254
255
 
255
256
  For more information on daemon-kit, see http://kit.rubyforge.org/daemon-kit
256
257
 
257
- To get started quickly run 'daemon_kit' without any arguments
258
+ To get started quickly run 'daemon-kit' without any arguments
258
259
 
259
260
 
260
261
  rdoc_options:
261
- - --main
262
- - README.rdoc
262
+ - --charset=UTF-8
263
263
  require_paths:
264
264
  - lib
265
265
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -276,19 +276,28 @@ required_rubygems_version: !ruby/object:Gem::Requirement
276
276
  version:
277
277
  requirements: []
278
278
 
279
- rubyforge_project: kit
280
- rubygems_version: 1.3.4
279
+ rubyforge_project:
280
+ rubygems_version: 1.3.5
281
281
  signing_key:
282
282
  specification_version: 3
283
- summary: Daemon Kit aims to simplify creating Ruby daemons by providing a sound application skeleton (through a generator), task specific generators (jabber bot, etc) and robust environment management code.
283
+ summary: Opinionated framework for Ruby daemons
284
284
  test_files:
285
- - test/test_generator_helper.rb
285
+ - spec/abstract_logger_spec.rb
286
+ - spec/argument_spec.rb
287
+ - spec/config_spec.rb
288
+ - spec/configurable_spec.rb
289
+ - spec/daemon_kit_spec.rb
290
+ - spec/error_handlers_spec.rb
291
+ - spec/initializer_spec.rb
292
+ - spec/spec_helper.rb
286
293
  - test/test_amqp_generator.rb
287
294
  - test/test_cron_generator.rb
288
295
  - test/test_daemon-kit_generator.rb
289
296
  - test/test_daemon_kit_config.rb
290
297
  - test/test_deploy_capistrano_generator.rb
298
+ - test/test_generator_helper.rb
291
299
  - test/test_helper.rb
292
300
  - test/test_jabber_generator.rb
293
301
  - test/test_nanite_agent_generator.rb
294
302
  - test/test_ruote_generator.rb
303
+ - test/test_test_unit_generator.rb