apphunkd 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. data/.document +5 -0
  2. data/.gitignore +22 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +18 -0
  5. data/Rakefile +78 -0
  6. data/TODO +1 -0
  7. data/VERSION +1 -0
  8. data/apphunkd.gemspec +258 -0
  9. data/bin/apphunkd +4 -0
  10. data/config/arguments.rb +12 -0
  11. data/config/boot.rb +68 -0
  12. data/config/environment.rb +23 -0
  13. data/config/environments/development.rb +2 -0
  14. data/config/environments/production.rb +2 -0
  15. data/config/environments/test.rb +2 -0
  16. data/config/post-daemonize/readme +5 -0
  17. data/config/pre-daemonize/readme +12 -0
  18. data/config/pre-daemonize/requires.rb +2 -0
  19. data/lib/apphunkd.rb +25 -0
  20. data/lib/apphunkd/api.rb +5 -0
  21. data/lib/apphunkd/api/service.rb +27 -0
  22. data/lib/apphunkd/queue.rb +96 -0
  23. data/lib/apphunkd/remote.rb +29 -0
  24. data/lib/apphunkd/remote/result.rb +15 -0
  25. data/libexec/apphunkd-daemon.rb +13 -0
  26. data/script/console +3 -0
  27. data/script/destroy +14 -0
  28. data/script/generate +14 -0
  29. data/spec/lib/apphunkd/api/service_spec.rb +47 -0
  30. data/spec/lib/apphunkd/queue_spec.rb +129 -0
  31. data/spec/lib/apphunkd/remote_spec.rb +61 -0
  32. data/spec/lib/apphunkd_spec.rb +50 -0
  33. data/spec/spec.opts +1 -0
  34. data/spec/spec_helper.rb +13 -0
  35. data/support/apphunkd.initd +47 -0
  36. data/support/apphunkd.monitrc +3 -0
  37. data/tasks/rspec.rake +21 -0
  38. data/vendor/daemon-kit/Configuration.txt +102 -0
  39. data/vendor/daemon-kit/Deployment.txt +113 -0
  40. data/vendor/daemon-kit/History.txt +97 -0
  41. data/vendor/daemon-kit/Logging.txt +92 -0
  42. data/vendor/daemon-kit/Manifest.txt +166 -0
  43. data/vendor/daemon-kit/PostInstall.txt +6 -0
  44. data/vendor/daemon-kit/README.rdoc +130 -0
  45. data/vendor/daemon-kit/Rakefile +37 -0
  46. data/vendor/daemon-kit/RuoteParticipants.txt +113 -0
  47. data/vendor/daemon-kit/TODO.txt +37 -0
  48. data/vendor/daemon-kit/app_generators/daemon_kit/USAGE +7 -0
  49. data/vendor/daemon-kit/app_generators/daemon_kit/daemon_kit_generator.rb +161 -0
  50. data/vendor/daemon-kit/app_generators/daemon_kit/templates/README +48 -0
  51. data/vendor/daemon-kit/app_generators/daemon_kit/templates/Rakefile +6 -0
  52. data/vendor/daemon-kit/app_generators/daemon_kit/templates/bin/daemon.erb +7 -0
  53. data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/arguments.rb +12 -0
  54. data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/boot.rb +68 -0
  55. data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/environment.rb +23 -0
  56. data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/environments/development.rb +2 -0
  57. data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/environments/production.rb +2 -0
  58. data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/environments/test.rb +2 -0
  59. data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/post-daemonize/readme +5 -0
  60. data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/pre-daemonize/readme +12 -0
  61. data/vendor/daemon-kit/app_generators/daemon_kit/templates/lib/daemon.rb +2 -0
  62. data/vendor/daemon-kit/app_generators/daemon_kit/templates/libexec/daemon.erb +18 -0
  63. data/vendor/daemon-kit/app_generators/daemon_kit/templates/script/console +3 -0
  64. data/vendor/daemon-kit/app_generators/daemon_kit/templates/script/destroy +14 -0
  65. data/vendor/daemon-kit/app_generators/daemon_kit/templates/script/generate +14 -0
  66. data/vendor/daemon-kit/bin/daemon_kit +18 -0
  67. data/vendor/daemon-kit/daemon_generators/amqp/USAGE +5 -0
  68. data/vendor/daemon-kit/daemon_generators/amqp/amqp_generator.rb +65 -0
  69. data/vendor/daemon-kit/daemon_generators/amqp/templates/config/amqp.yml +28 -0
  70. data/vendor/daemon-kit/daemon_generators/amqp/templates/config/initializers/amqp.rb +7 -0
  71. data/vendor/daemon-kit/daemon_generators/amqp/templates/libexec/daemon.rb +37 -0
  72. data/vendor/daemon-kit/daemon_generators/cron/USAGE +5 -0
  73. data/vendor/daemon-kit/daemon_generators/cron/cron_generator.rb +64 -0
  74. data/vendor/daemon-kit/daemon_generators/cron/templates/config/initializers/cron.rb +11 -0
  75. data/vendor/daemon-kit/daemon_generators/cron/templates/libexec/daemon.rb +43 -0
  76. data/vendor/daemon-kit/daemon_generators/cucumber/USAGE +11 -0
  77. data/vendor/daemon-kit/daemon_generators/cucumber/cucumber_generator.rb +38 -0
  78. data/vendor/daemon-kit/daemon_generators/cucumber/templates/cucumber +8 -0
  79. data/vendor/daemon-kit/daemon_generators/cucumber/templates/cucumber.rake +13 -0
  80. data/vendor/daemon-kit/daemon_generators/cucumber/templates/cucumber_environment.rb +2 -0
  81. data/vendor/daemon-kit/daemon_generators/cucumber/templates/env.rb +7 -0
  82. data/vendor/daemon-kit/daemon_generators/deploy_capistrano/deploy_capistrano_generator.rb +35 -0
  83. data/vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/Capfile +10 -0
  84. data/vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/USAGE +10 -0
  85. data/vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/config/deploy.rb +53 -0
  86. data/vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/config/deploy/production.rb +6 -0
  87. data/vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/config/deploy/staging.rb +6 -0
  88. data/vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/config/environments/staging.rb +0 -0
  89. data/vendor/daemon-kit/daemon_generators/jabber/USAGE +5 -0
  90. data/vendor/daemon-kit/daemon_generators/jabber/jabber_generator.rb +65 -0
  91. data/vendor/daemon-kit/daemon_generators/jabber/templates/config/initializers/jabber.rb +7 -0
  92. data/vendor/daemon-kit/daemon_generators/jabber/templates/config/jabber.yml +26 -0
  93. data/vendor/daemon-kit/daemon_generators/jabber/templates/libexec/daemon.rb +27 -0
  94. data/vendor/daemon-kit/daemon_generators/nanite_agent/USAGE +5 -0
  95. data/vendor/daemon-kit/daemon_generators/nanite_agent/nanite_agent_generator.rb +68 -0
  96. data/vendor/daemon-kit/daemon_generators/nanite_agent/templates/config/initializers/nanite_agent.rb +6 -0
  97. data/vendor/daemon-kit/daemon_generators/nanite_agent/templates/config/nanite.yml +35 -0
  98. data/vendor/daemon-kit/daemon_generators/nanite_agent/templates/lib/actors/sample.rb +11 -0
  99. data/vendor/daemon-kit/daemon_generators/nanite_agent/templates/libexec/daemon.rb +31 -0
  100. data/vendor/daemon-kit/daemon_generators/rspec/USAGE +5 -0
  101. data/vendor/daemon-kit/daemon_generators/rspec/rspec_generator.rb +55 -0
  102. data/vendor/daemon-kit/daemon_generators/rspec/templates/spec.rb +11 -0
  103. data/vendor/daemon-kit/daemon_generators/rspec/templates/spec/spec.opts +1 -0
  104. data/vendor/daemon-kit/daemon_generators/rspec/templates/spec/spec_helper.rb +21 -0
  105. data/vendor/daemon-kit/daemon_generators/rspec/templates/tasks/rspec.rake +21 -0
  106. data/vendor/daemon-kit/daemon_generators/ruote/USAGE +5 -0
  107. data/vendor/daemon-kit/daemon_generators/ruote/ruote_generator.rb +67 -0
  108. data/vendor/daemon-kit/daemon_generators/ruote/templates/config/amqp.yml +30 -0
  109. data/vendor/daemon-kit/daemon_generators/ruote/templates/config/initializers/ruote.rb +13 -0
  110. data/vendor/daemon-kit/daemon_generators/ruote/templates/config/ruote.yml +23 -0
  111. data/vendor/daemon-kit/daemon_generators/ruote/templates/lib/daemon.rb +4 -0
  112. data/vendor/daemon-kit/daemon_generators/ruote/templates/lib/sample.rb +26 -0
  113. data/vendor/daemon-kit/daemon_generators/ruote/templates/libexec/daemon.rb +33 -0
  114. data/vendor/daemon-kit/lib/daemon_kit.rb +54 -0
  115. data/vendor/daemon-kit/lib/daemon_kit/abstract_logger.rb +235 -0
  116. data/vendor/daemon-kit/lib/daemon_kit/amqp.rb +38 -0
  117. data/vendor/daemon-kit/lib/daemon_kit/application.rb +187 -0
  118. data/vendor/daemon-kit/lib/daemon_kit/arguments.rb +165 -0
  119. data/vendor/daemon-kit/lib/daemon_kit/commands/console.rb +38 -0
  120. data/vendor/daemon-kit/lib/daemon_kit/config.rb +108 -0
  121. data/vendor/daemon-kit/lib/daemon_kit/console_daemon.rb +2 -0
  122. data/vendor/daemon-kit/lib/daemon_kit/core_ext.rb +1 -0
  123. data/vendor/daemon-kit/lib/daemon_kit/core_ext/configurable.rb +96 -0
  124. data/vendor/daemon-kit/lib/daemon_kit/core_ext/string.rb +22 -0
  125. data/vendor/daemon-kit/lib/daemon_kit/cron.rb +48 -0
  126. data/vendor/daemon-kit/lib/daemon_kit/cucumber/world.rb +38 -0
  127. data/vendor/daemon-kit/lib/daemon_kit/deployment/capistrano.rb +482 -0
  128. data/vendor/daemon-kit/lib/daemon_kit/em.rb +43 -0
  129. data/vendor/daemon-kit/lib/daemon_kit/error_handlers/base.rb +32 -0
  130. data/vendor/daemon-kit/lib/daemon_kit/error_handlers/hoptoad.rb +61 -0
  131. data/vendor/daemon-kit/lib/daemon_kit/error_handlers/mail.rb +85 -0
  132. data/vendor/daemon-kit/lib/daemon_kit/exceptions.rb +8 -0
  133. data/vendor/daemon-kit/lib/daemon_kit/initializer.rb +438 -0
  134. data/vendor/daemon-kit/lib/daemon_kit/jabber.rb +170 -0
  135. data/vendor/daemon-kit/lib/daemon_kit/nanite.rb +7 -0
  136. data/vendor/daemon-kit/lib/daemon_kit/nanite/agent.rb +56 -0
  137. data/vendor/daemon-kit/lib/daemon_kit/pid_file.rb +61 -0
  138. data/vendor/daemon-kit/lib/daemon_kit/ruote_participants.rb +119 -0
  139. data/vendor/daemon-kit/lib/daemon_kit/ruote_pseudo_participant.rb +68 -0
  140. data/vendor/daemon-kit/lib/daemon_kit/ruote_workitem.rb +169 -0
  141. data/vendor/daemon-kit/lib/daemon_kit/safety.rb +85 -0
  142. data/vendor/daemon-kit/lib/daemon_kit/tasks.rb +2 -0
  143. data/vendor/daemon-kit/lib/daemon_kit/tasks/environment.rake +10 -0
  144. data/vendor/daemon-kit/lib/daemon_kit/tasks/framework.rake +120 -0
  145. data/vendor/daemon-kit/lib/daemon_kit/tasks/god.rake +62 -0
  146. data/vendor/daemon-kit/lib/daemon_kit/tasks/log.rake +8 -0
  147. data/vendor/daemon-kit/lib/daemon_kit/tasks/monit.rake +29 -0
  148. data/vendor/daemon-kit/script/console +10 -0
  149. data/vendor/daemon-kit/script/destroy +14 -0
  150. data/vendor/daemon-kit/script/generate +14 -0
  151. data/vendor/daemon-kit/script/txt2html +71 -0
  152. data/vendor/daemon-kit/spec/abstract_logger_spec.rb +126 -0
  153. data/vendor/daemon-kit/spec/argument_spec.rb +70 -0
  154. data/vendor/daemon-kit/spec/config_spec.rb +79 -0
  155. data/vendor/daemon-kit/spec/configurable_spec.rb +56 -0
  156. data/vendor/daemon-kit/spec/daemon_kit_spec.rb +7 -0
  157. data/vendor/daemon-kit/spec/error_handlers_spec.rb +23 -0
  158. data/vendor/daemon-kit/spec/fixtures/env.yml +15 -0
  159. data/vendor/daemon-kit/spec/fixtures/noenv.yml +4 -0
  160. data/vendor/daemon-kit/spec/initializer_spec.rb +26 -0
  161. data/vendor/daemon-kit/spec/spec.opts +1 -0
  162. data/vendor/daemon-kit/spec/spec_helper.rb +27 -0
  163. data/vendor/daemon-kit/tasks/rspec.rake +21 -0
  164. data/vendor/daemon-kit/templates/god/god.erb +69 -0
  165. data/vendor/daemon-kit/templates/monit/monit.erb +14 -0
  166. data/vendor/daemon-kit/test/test_amqp_generator.rb +48 -0
  167. data/vendor/daemon-kit/test/test_cron_generator.rb +45 -0
  168. data/vendor/daemon-kit/test/test_daemon-kit_generator.rb +84 -0
  169. data/vendor/daemon-kit/test/test_daemon_kit_config.rb +28 -0
  170. data/vendor/daemon-kit/test/test_deploy_capistrano_generator.rb +48 -0
  171. data/vendor/daemon-kit/test/test_generator_helper.rb +29 -0
  172. data/vendor/daemon-kit/test/test_helper.rb +7 -0
  173. data/vendor/daemon-kit/test/test_jabber_generator.rb +49 -0
  174. data/vendor/daemon-kit/test/test_nanite_agent_generator.rb +49 -0
  175. data/vendor/daemon-kit/test/test_ruote_generator.rb +45 -0
  176. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail.rb +5 -0
  177. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/address.rb +426 -0
  178. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/attachments.rb +46 -0
  179. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/base64.rb +46 -0
  180. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/compat.rb +41 -0
  181. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/config.rb +67 -0
  182. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/core_extensions.rb +63 -0
  183. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/encode.rb +581 -0
  184. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/header.rb +960 -0
  185. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/index.rb +9 -0
  186. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/interface.rb +1130 -0
  187. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/loader.rb +3 -0
  188. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/mail.rb +578 -0
  189. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/mailbox.rb +495 -0
  190. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/main.rb +6 -0
  191. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/mbox.rb +3 -0
  192. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/net.rb +248 -0
  193. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/obsolete.rb +132 -0
  194. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/parser.rb +1476 -0
  195. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/port.rb +379 -0
  196. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/quoting.rb +118 -0
  197. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/require_arch.rb +58 -0
  198. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/scanner.rb +49 -0
  199. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/scanner_r.rb +261 -0
  200. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/stringio.rb +280 -0
  201. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/utils.rb +337 -0
  202. data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/version.rb +39 -0
  203. data/vendor/daemon-kit/vendor/tmail.rb +13 -0
  204. metadata +281 -0
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
22
+ *.log
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 rubyphunk
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,18 @@
1
+ = apphunkd
2
+
3
+ Description goes here.
4
+
5
+ == Note on Patches/Pull Requests
6
+
7
+ * Fork the project.
8
+ * Make your feature addition or bug fix.
9
+ * Add tests for it. This is important so I don't break it in a
10
+ future version unintentionally.
11
+ * Commit, do not mess with rakefile, version, or history.
12
+ (if you want to have your own version, that is fine but
13
+ bump version in a commit by itself I can ignore when I pull)
14
+ * Send me a pull request. Bonus points for topic branches.
15
+
16
+ == Copyright
17
+
18
+ Copyright (c) 2009 rubyphunk. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,78 @@
1
+ require File.dirname(__FILE__) + '/config/boot'
2
+
3
+ require 'rubygems'
4
+ require 'rake'
5
+ require 'daemon_kit/tasks'
6
+
7
+ Dir[File.join(File.dirname(__FILE__), 'tasks/*.rake')].each { |rake| load rake }
8
+
9
+ begin
10
+ require 'jeweler'
11
+ Jeweler::Tasks.new do |gem|
12
+ gem.name = "apphunkd"
13
+ gem.summary = %Q{A daemon that acts as local proxy between your applications and the apphunk.com remote logging service.}
14
+ gem.description = %Q{
15
+ Apphunkd is a ruby based daemon that runs on your application-servers and acts as local proxy between your apps and apphunk.com.
16
+ It collects, queues and delivers message to the Apphunk remote-logging-service.
17
+ }
18
+ gem.email = "andreas@apphunk.com"
19
+ gem.homepage = "http://apphunk.com"
20
+ gem.authors = ["Andreas Wolff"]
21
+ gem.add_development_dependency "rspec", ">= 1.2.9"
22
+ gem.add_development_dependency "yard", ">= 0"
23
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
24
+ end
25
+ Jeweler::GemcutterTasks.new
26
+ rescue LoadError
27
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
28
+ end
29
+
30
+ require 'spec/rake/spectask'
31
+ Spec::Rake::SpecTask.new(:spec) do |spec|
32
+ spec.libs << 'lib' << 'spec'
33
+ spec.spec_files = FileList['spec/**/*_spec.rb']
34
+ end
35
+
36
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
37
+ spec.libs << 'lib' << 'spec'
38
+ spec.pattern = 'spec/**/*_spec.rb'
39
+ spec.rcov = true
40
+ end
41
+
42
+ task :spec => :check_dependencies
43
+
44
+ begin
45
+ require 'reek/rake_task'
46
+ Reek::RakeTask.new do |t|
47
+ t.fail_on_error = true
48
+ t.verbose = false
49
+ t.source_files = 'lib/**/*.rb'
50
+ end
51
+ rescue LoadError
52
+ task :reek do
53
+ abort "Reek is not available. In order to run reek, you must: sudo gem install reek"
54
+ end
55
+ end
56
+
57
+ begin
58
+ require 'roodi'
59
+ require 'roodi_task'
60
+ RoodiTask.new do |t|
61
+ t.verbose = false
62
+ end
63
+ rescue LoadError
64
+ task :roodi do
65
+ abort "Roodi is not available. In order to run roodi, you must: sudo gem install roodi"
66
+ end
67
+ end
68
+
69
+ task :default => :spec
70
+
71
+ begin
72
+ require 'yard'
73
+ YARD::Rake::YardocTask.new
74
+ rescue LoadError
75
+ task :yardoc do
76
+ abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
77
+ end
78
+ end
data/TODO ADDED
@@ -0,0 +1 @@
1
+ + Jeweler support
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.9.0
data/apphunkd.gemspec ADDED
@@ -0,0 +1,258 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{apphunkd}
8
+ s.version = "0.9.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Andreas Wolff"]
12
+ s.date = %q{2009-11-17}
13
+ s.default_executable = %q{apphunkd}
14
+ s.description = %q{
15
+ Apphunkd is a ruby based daemon that runs on your application-servers and acts as local proxy between your apps and apphunk.com.
16
+ It collects, queues and delivers message to the Apphunk remote-logging-service.
17
+ }
18
+ s.email = %q{andreas@apphunk.com}
19
+ s.executables = ["apphunkd"]
20
+ s.extra_rdoc_files = [
21
+ "LICENSE",
22
+ "README.rdoc"
23
+ ]
24
+ s.files = [
25
+ ".document",
26
+ ".gitignore",
27
+ "LICENSE",
28
+ "README.rdoc",
29
+ "Rakefile",
30
+ "TODO",
31
+ "VERSION",
32
+ "apphunkd.gemspec",
33
+ "bin/apphunkd",
34
+ "config/arguments.rb",
35
+ "config/boot.rb",
36
+ "config/environment.rb",
37
+ "config/environments/development.rb",
38
+ "config/environments/production.rb",
39
+ "config/environments/test.rb",
40
+ "config/post-daemonize/readme",
41
+ "config/pre-daemonize/readme",
42
+ "config/pre-daemonize/requires.rb",
43
+ "lib/apphunkd.rb",
44
+ "lib/apphunkd/api.rb",
45
+ "lib/apphunkd/api/service.rb",
46
+ "lib/apphunkd/queue.rb",
47
+ "lib/apphunkd/remote.rb",
48
+ "lib/apphunkd/remote/result.rb",
49
+ "libexec/apphunkd-daemon.rb",
50
+ "script/console",
51
+ "script/destroy",
52
+ "script/generate",
53
+ "spec/lib/apphunkd/api/service_spec.rb",
54
+ "spec/lib/apphunkd/queue_spec.rb",
55
+ "spec/lib/apphunkd/remote_spec.rb",
56
+ "spec/lib/apphunkd_spec.rb",
57
+ "spec/spec.opts",
58
+ "spec/spec_helper.rb",
59
+ "support/apphunkd.initd",
60
+ "support/apphunkd.monitrc",
61
+ "tasks/rspec.rake",
62
+ "vendor/daemon-kit/Configuration.txt",
63
+ "vendor/daemon-kit/Deployment.txt",
64
+ "vendor/daemon-kit/History.txt",
65
+ "vendor/daemon-kit/Logging.txt",
66
+ "vendor/daemon-kit/Manifest.txt",
67
+ "vendor/daemon-kit/PostInstall.txt",
68
+ "vendor/daemon-kit/README.rdoc",
69
+ "vendor/daemon-kit/Rakefile",
70
+ "vendor/daemon-kit/RuoteParticipants.txt",
71
+ "vendor/daemon-kit/TODO.txt",
72
+ "vendor/daemon-kit/app_generators/daemon_kit/USAGE",
73
+ "vendor/daemon-kit/app_generators/daemon_kit/daemon_kit_generator.rb",
74
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/README",
75
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/Rakefile",
76
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/bin/daemon.erb",
77
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/config/arguments.rb",
78
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/config/boot.rb",
79
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/config/environment.rb",
80
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/config/environments/development.rb",
81
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/config/environments/production.rb",
82
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/config/environments/test.rb",
83
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/config/post-daemonize/readme",
84
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/config/pre-daemonize/readme",
85
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/lib/daemon.rb",
86
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/libexec/daemon.erb",
87
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/script/console",
88
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/script/destroy",
89
+ "vendor/daemon-kit/app_generators/daemon_kit/templates/script/generate",
90
+ "vendor/daemon-kit/bin/daemon_kit",
91
+ "vendor/daemon-kit/daemon_generators/amqp/USAGE",
92
+ "vendor/daemon-kit/daemon_generators/amqp/amqp_generator.rb",
93
+ "vendor/daemon-kit/daemon_generators/amqp/templates/config/amqp.yml",
94
+ "vendor/daemon-kit/daemon_generators/amqp/templates/config/initializers/amqp.rb",
95
+ "vendor/daemon-kit/daemon_generators/amqp/templates/libexec/daemon.rb",
96
+ "vendor/daemon-kit/daemon_generators/cron/USAGE",
97
+ "vendor/daemon-kit/daemon_generators/cron/cron_generator.rb",
98
+ "vendor/daemon-kit/daemon_generators/cron/templates/config/initializers/cron.rb",
99
+ "vendor/daemon-kit/daemon_generators/cron/templates/libexec/daemon.rb",
100
+ "vendor/daemon-kit/daemon_generators/cucumber/USAGE",
101
+ "vendor/daemon-kit/daemon_generators/cucumber/cucumber_generator.rb",
102
+ "vendor/daemon-kit/daemon_generators/cucumber/templates/cucumber",
103
+ "vendor/daemon-kit/daemon_generators/cucumber/templates/cucumber.rake",
104
+ "vendor/daemon-kit/daemon_generators/cucumber/templates/cucumber_environment.rb",
105
+ "vendor/daemon-kit/daemon_generators/cucumber/templates/env.rb",
106
+ "vendor/daemon-kit/daemon_generators/deploy_capistrano/deploy_capistrano_generator.rb",
107
+ "vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/Capfile",
108
+ "vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/USAGE",
109
+ "vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/config/deploy.rb",
110
+ "vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/config/deploy/production.rb",
111
+ "vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/config/deploy/staging.rb",
112
+ "vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/config/environments/staging.rb",
113
+ "vendor/daemon-kit/daemon_generators/jabber/USAGE",
114
+ "vendor/daemon-kit/daemon_generators/jabber/jabber_generator.rb",
115
+ "vendor/daemon-kit/daemon_generators/jabber/templates/config/initializers/jabber.rb",
116
+ "vendor/daemon-kit/daemon_generators/jabber/templates/config/jabber.yml",
117
+ "vendor/daemon-kit/daemon_generators/jabber/templates/libexec/daemon.rb",
118
+ "vendor/daemon-kit/daemon_generators/nanite_agent/USAGE",
119
+ "vendor/daemon-kit/daemon_generators/nanite_agent/nanite_agent_generator.rb",
120
+ "vendor/daemon-kit/daemon_generators/nanite_agent/templates/config/initializers/nanite_agent.rb",
121
+ "vendor/daemon-kit/daemon_generators/nanite_agent/templates/config/nanite.yml",
122
+ "vendor/daemon-kit/daemon_generators/nanite_agent/templates/lib/actors/sample.rb",
123
+ "vendor/daemon-kit/daemon_generators/nanite_agent/templates/libexec/daemon.rb",
124
+ "vendor/daemon-kit/daemon_generators/rspec/USAGE",
125
+ "vendor/daemon-kit/daemon_generators/rspec/rspec_generator.rb",
126
+ "vendor/daemon-kit/daemon_generators/rspec/templates/spec.rb",
127
+ "vendor/daemon-kit/daemon_generators/rspec/templates/spec/spec.opts",
128
+ "vendor/daemon-kit/daemon_generators/rspec/templates/spec/spec_helper.rb",
129
+ "vendor/daemon-kit/daemon_generators/rspec/templates/tasks/rspec.rake",
130
+ "vendor/daemon-kit/daemon_generators/ruote/USAGE",
131
+ "vendor/daemon-kit/daemon_generators/ruote/ruote_generator.rb",
132
+ "vendor/daemon-kit/daemon_generators/ruote/templates/config/amqp.yml",
133
+ "vendor/daemon-kit/daemon_generators/ruote/templates/config/initializers/ruote.rb",
134
+ "vendor/daemon-kit/daemon_generators/ruote/templates/config/ruote.yml",
135
+ "vendor/daemon-kit/daemon_generators/ruote/templates/lib/daemon.rb",
136
+ "vendor/daemon-kit/daemon_generators/ruote/templates/lib/sample.rb",
137
+ "vendor/daemon-kit/daemon_generators/ruote/templates/libexec/daemon.rb",
138
+ "vendor/daemon-kit/lib/daemon_kit.rb",
139
+ "vendor/daemon-kit/lib/daemon_kit/abstract_logger.rb",
140
+ "vendor/daemon-kit/lib/daemon_kit/amqp.rb",
141
+ "vendor/daemon-kit/lib/daemon_kit/application.rb",
142
+ "vendor/daemon-kit/lib/daemon_kit/arguments.rb",
143
+ "vendor/daemon-kit/lib/daemon_kit/commands/console.rb",
144
+ "vendor/daemon-kit/lib/daemon_kit/config.rb",
145
+ "vendor/daemon-kit/lib/daemon_kit/console_daemon.rb",
146
+ "vendor/daemon-kit/lib/daemon_kit/core_ext.rb",
147
+ "vendor/daemon-kit/lib/daemon_kit/core_ext/configurable.rb",
148
+ "vendor/daemon-kit/lib/daemon_kit/core_ext/string.rb",
149
+ "vendor/daemon-kit/lib/daemon_kit/cron.rb",
150
+ "vendor/daemon-kit/lib/daemon_kit/cucumber/world.rb",
151
+ "vendor/daemon-kit/lib/daemon_kit/deployment/capistrano.rb",
152
+ "vendor/daemon-kit/lib/daemon_kit/em.rb",
153
+ "vendor/daemon-kit/lib/daemon_kit/error_handlers/base.rb",
154
+ "vendor/daemon-kit/lib/daemon_kit/error_handlers/hoptoad.rb",
155
+ "vendor/daemon-kit/lib/daemon_kit/error_handlers/mail.rb",
156
+ "vendor/daemon-kit/lib/daemon_kit/exceptions.rb",
157
+ "vendor/daemon-kit/lib/daemon_kit/initializer.rb",
158
+ "vendor/daemon-kit/lib/daemon_kit/jabber.rb",
159
+ "vendor/daemon-kit/lib/daemon_kit/nanite.rb",
160
+ "vendor/daemon-kit/lib/daemon_kit/nanite/agent.rb",
161
+ "vendor/daemon-kit/lib/daemon_kit/pid_file.rb",
162
+ "vendor/daemon-kit/lib/daemon_kit/ruote_participants.rb",
163
+ "vendor/daemon-kit/lib/daemon_kit/ruote_pseudo_participant.rb",
164
+ "vendor/daemon-kit/lib/daemon_kit/ruote_workitem.rb",
165
+ "vendor/daemon-kit/lib/daemon_kit/safety.rb",
166
+ "vendor/daemon-kit/lib/daemon_kit/tasks.rb",
167
+ "vendor/daemon-kit/lib/daemon_kit/tasks/environment.rake",
168
+ "vendor/daemon-kit/lib/daemon_kit/tasks/framework.rake",
169
+ "vendor/daemon-kit/lib/daemon_kit/tasks/god.rake",
170
+ "vendor/daemon-kit/lib/daemon_kit/tasks/log.rake",
171
+ "vendor/daemon-kit/lib/daemon_kit/tasks/monit.rake",
172
+ "vendor/daemon-kit/script/console",
173
+ "vendor/daemon-kit/script/destroy",
174
+ "vendor/daemon-kit/script/generate",
175
+ "vendor/daemon-kit/script/txt2html",
176
+ "vendor/daemon-kit/spec/abstract_logger_spec.rb",
177
+ "vendor/daemon-kit/spec/argument_spec.rb",
178
+ "vendor/daemon-kit/spec/config_spec.rb",
179
+ "vendor/daemon-kit/spec/configurable_spec.rb",
180
+ "vendor/daemon-kit/spec/daemon_kit_spec.rb",
181
+ "vendor/daemon-kit/spec/error_handlers_spec.rb",
182
+ "vendor/daemon-kit/spec/fixtures/env.yml",
183
+ "vendor/daemon-kit/spec/fixtures/noenv.yml",
184
+ "vendor/daemon-kit/spec/initializer_spec.rb",
185
+ "vendor/daemon-kit/spec/spec.opts",
186
+ "vendor/daemon-kit/spec/spec_helper.rb",
187
+ "vendor/daemon-kit/tasks/rspec.rake",
188
+ "vendor/daemon-kit/templates/god/god.erb",
189
+ "vendor/daemon-kit/templates/monit/monit.erb",
190
+ "vendor/daemon-kit/test/test_amqp_generator.rb",
191
+ "vendor/daemon-kit/test/test_cron_generator.rb",
192
+ "vendor/daemon-kit/test/test_daemon-kit_generator.rb",
193
+ "vendor/daemon-kit/test/test_daemon_kit_config.rb",
194
+ "vendor/daemon-kit/test/test_deploy_capistrano_generator.rb",
195
+ "vendor/daemon-kit/test/test_generator_helper.rb",
196
+ "vendor/daemon-kit/test/test_helper.rb",
197
+ "vendor/daemon-kit/test/test_jabber_generator.rb",
198
+ "vendor/daemon-kit/test/test_nanite_agent_generator.rb",
199
+ "vendor/daemon-kit/test/test_ruote_generator.rb",
200
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail.rb",
201
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/address.rb",
202
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/attachments.rb",
203
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/base64.rb",
204
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/compat.rb",
205
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/config.rb",
206
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/core_extensions.rb",
207
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/encode.rb",
208
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/header.rb",
209
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/index.rb",
210
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/interface.rb",
211
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/loader.rb",
212
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/mail.rb",
213
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/mailbox.rb",
214
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/main.rb",
215
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/mbox.rb",
216
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/net.rb",
217
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/obsolete.rb",
218
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/parser.rb",
219
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/port.rb",
220
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/quoting.rb",
221
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/require_arch.rb",
222
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/scanner.rb",
223
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/scanner_r.rb",
224
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/stringio.rb",
225
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/utils.rb",
226
+ "vendor/daemon-kit/vendor/tmail-1.2.3/tmail/version.rb",
227
+ "vendor/daemon-kit/vendor/tmail.rb"
228
+ ]
229
+ s.homepage = %q{http://apphunk.com}
230
+ s.rdoc_options = ["--charset=UTF-8"]
231
+ s.require_paths = ["lib"]
232
+ s.rubygems_version = %q{1.3.5}
233
+ s.summary = %q{A daemon that acts as local proxy between your applications and the apphunk.com remote logging service.}
234
+ s.test_files = [
235
+ "spec/lib/apphunkd/api/service_spec.rb",
236
+ "spec/lib/apphunkd/queue_spec.rb",
237
+ "spec/lib/apphunkd/remote_spec.rb",
238
+ "spec/lib/apphunkd_spec.rb",
239
+ "spec/spec_helper.rb"
240
+ ]
241
+
242
+ if s.respond_to? :specification_version then
243
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
244
+ s.specification_version = 3
245
+
246
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
247
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
248
+ s.add_development_dependency(%q<yard>, [">= 0"])
249
+ else
250
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
251
+ s.add_dependency(%q<yard>, [">= 0"])
252
+ end
253
+ else
254
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
255
+ s.add_dependency(%q<yard>, [">= 0"])
256
+ end
257
+ end
258
+
data/bin/apphunkd ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.dirname(__FILE__) + '/../config/environment'
4
+ DaemonKit::Application.exec( DAEMON_ROOT + '/libexec/apphunkd-daemon.rb' )
@@ -0,0 +1,12 @@
1
+ # Argument handling for your daemon is configured here.
2
+ #
3
+ # You have access to two variables when this file is
4
+ # parsed. The first is +opts+, which is the object yielded from
5
+ # +OptionParser.new+, the second is +@options+ which is a standard
6
+ # Ruby hash that is later accessible through
7
+ # DaemonKit.arguments.options and can be used in your daemon process.
8
+
9
+ # Here is an example:
10
+ # opts.on('-f', '--foo FOO', 'Set foo') do |foo|
11
+ # @options[:foo] = foo
12
+ # end
data/config/boot.rb ADDED
@@ -0,0 +1,68 @@
1
+ # Don't change this file!
2
+ # Configure your daemon in config/environment.rb
3
+
4
+ DAEMON_ROOT = "#{File.expand_path(File.dirname(__FILE__))}/.." unless defined?( DAEMON_ROOT )
5
+
6
+ module DaemonKit
7
+ class << self
8
+ def boot!
9
+ unless booted?
10
+ pick_boot.run
11
+ end
12
+ end
13
+
14
+ def booted?
15
+ defined? DaemonKit::Initializer
16
+ end
17
+
18
+ def pick_boot
19
+ (vendor_kit? ? VendorBoot : GemBoot).new
20
+ end
21
+
22
+ def vendor_kit?
23
+ File.exists?( "#{DAEMON_ROOT}/vendor/daemon_kit" )
24
+ end
25
+ end
26
+
27
+ class Boot
28
+ def run
29
+ load_initializer
30
+ DaemonKit::Initializer.run
31
+ end
32
+ end
33
+
34
+ class VendorBoot < Boot
35
+ def load_initializer
36
+ require "#{DAEMON_ROOT}/vendor/daemon_kit/lib/daemon_kit/initializer"
37
+ end
38
+ end
39
+
40
+ class GemBoot < Boot
41
+ def load_initializer
42
+ begin
43
+ require 'rubygems'
44
+ gem 'kennethkalmer-daemon-kit'
45
+ require 'daemon_kit/initializer'
46
+ rescue Gem::LoadError
47
+ begin
48
+ gem 'daemon-kit'
49
+ require 'daemon_kit/initializer'
50
+ rescue Gem::LoadError => e
51
+ msg = <<EOF
52
+ You are missing the daemon-kit gem. Please install one of the following gems:
53
+
54
+ * Unstable - sudo gem install kennethkalmer-daemon-kit -s http://gems.github.com/
55
+ * Stable - sudo gem install daemon-kit
56
+
57
+ NOTE: The 'unstable' gem is loaded first, before falling back to the stable gem!
58
+
59
+ EOF
60
+ $stderr.puts msg
61
+ exit 1
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
67
+
68
+ DaemonKit.boot!