apphunkd 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +22 -0
- data/LICENSE +20 -0
- data/README.rdoc +18 -0
- data/Rakefile +78 -0
- data/TODO +1 -0
- data/VERSION +1 -0
- data/apphunkd.gemspec +258 -0
- data/bin/apphunkd +4 -0
- data/config/arguments.rb +12 -0
- data/config/boot.rb +68 -0
- data/config/environment.rb +23 -0
- data/config/environments/development.rb +2 -0
- data/config/environments/production.rb +2 -0
- data/config/environments/test.rb +2 -0
- data/config/post-daemonize/readme +5 -0
- data/config/pre-daemonize/readme +12 -0
- data/config/pre-daemonize/requires.rb +2 -0
- data/lib/apphunkd.rb +25 -0
- data/lib/apphunkd/api.rb +5 -0
- data/lib/apphunkd/api/service.rb +27 -0
- data/lib/apphunkd/queue.rb +96 -0
- data/lib/apphunkd/remote.rb +29 -0
- data/lib/apphunkd/remote/result.rb +15 -0
- data/libexec/apphunkd-daemon.rb +13 -0
- data/script/console +3 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/spec/lib/apphunkd/api/service_spec.rb +47 -0
- data/spec/lib/apphunkd/queue_spec.rb +129 -0
- data/spec/lib/apphunkd/remote_spec.rb +61 -0
- data/spec/lib/apphunkd_spec.rb +50 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +13 -0
- data/support/apphunkd.initd +47 -0
- data/support/apphunkd.monitrc +3 -0
- data/tasks/rspec.rake +21 -0
- data/vendor/daemon-kit/Configuration.txt +102 -0
- data/vendor/daemon-kit/Deployment.txt +113 -0
- data/vendor/daemon-kit/History.txt +97 -0
- data/vendor/daemon-kit/Logging.txt +92 -0
- data/vendor/daemon-kit/Manifest.txt +166 -0
- data/vendor/daemon-kit/PostInstall.txt +6 -0
- data/vendor/daemon-kit/README.rdoc +130 -0
- data/vendor/daemon-kit/Rakefile +37 -0
- data/vendor/daemon-kit/RuoteParticipants.txt +113 -0
- data/vendor/daemon-kit/TODO.txt +37 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/USAGE +7 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/daemon_kit_generator.rb +161 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/README +48 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/Rakefile +6 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/bin/daemon.erb +7 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/arguments.rb +12 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/boot.rb +68 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/environment.rb +23 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/environments/development.rb +2 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/environments/production.rb +2 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/environments/test.rb +2 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/post-daemonize/readme +5 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/config/pre-daemonize/readme +12 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/lib/daemon.rb +2 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/libexec/daemon.erb +18 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/script/console +3 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/script/destroy +14 -0
- data/vendor/daemon-kit/app_generators/daemon_kit/templates/script/generate +14 -0
- data/vendor/daemon-kit/bin/daemon_kit +18 -0
- data/vendor/daemon-kit/daemon_generators/amqp/USAGE +5 -0
- data/vendor/daemon-kit/daemon_generators/amqp/amqp_generator.rb +65 -0
- data/vendor/daemon-kit/daemon_generators/amqp/templates/config/amqp.yml +28 -0
- data/vendor/daemon-kit/daemon_generators/amqp/templates/config/initializers/amqp.rb +7 -0
- data/vendor/daemon-kit/daemon_generators/amqp/templates/libexec/daemon.rb +37 -0
- data/vendor/daemon-kit/daemon_generators/cron/USAGE +5 -0
- data/vendor/daemon-kit/daemon_generators/cron/cron_generator.rb +64 -0
- data/vendor/daemon-kit/daemon_generators/cron/templates/config/initializers/cron.rb +11 -0
- data/vendor/daemon-kit/daemon_generators/cron/templates/libexec/daemon.rb +43 -0
- data/vendor/daemon-kit/daemon_generators/cucumber/USAGE +11 -0
- data/vendor/daemon-kit/daemon_generators/cucumber/cucumber_generator.rb +38 -0
- data/vendor/daemon-kit/daemon_generators/cucumber/templates/cucumber +8 -0
- data/vendor/daemon-kit/daemon_generators/cucumber/templates/cucumber.rake +13 -0
- data/vendor/daemon-kit/daemon_generators/cucumber/templates/cucumber_environment.rb +2 -0
- data/vendor/daemon-kit/daemon_generators/cucumber/templates/env.rb +7 -0
- data/vendor/daemon-kit/daemon_generators/deploy_capistrano/deploy_capistrano_generator.rb +35 -0
- data/vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/Capfile +10 -0
- data/vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/USAGE +10 -0
- data/vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/config/deploy.rb +53 -0
- data/vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/config/deploy/production.rb +6 -0
- data/vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/config/deploy/staging.rb +6 -0
- data/vendor/daemon-kit/daemon_generators/deploy_capistrano/templates/config/environments/staging.rb +0 -0
- data/vendor/daemon-kit/daemon_generators/jabber/USAGE +5 -0
- data/vendor/daemon-kit/daemon_generators/jabber/jabber_generator.rb +65 -0
- data/vendor/daemon-kit/daemon_generators/jabber/templates/config/initializers/jabber.rb +7 -0
- data/vendor/daemon-kit/daemon_generators/jabber/templates/config/jabber.yml +26 -0
- data/vendor/daemon-kit/daemon_generators/jabber/templates/libexec/daemon.rb +27 -0
- data/vendor/daemon-kit/daemon_generators/nanite_agent/USAGE +5 -0
- data/vendor/daemon-kit/daemon_generators/nanite_agent/nanite_agent_generator.rb +68 -0
- data/vendor/daemon-kit/daemon_generators/nanite_agent/templates/config/initializers/nanite_agent.rb +6 -0
- data/vendor/daemon-kit/daemon_generators/nanite_agent/templates/config/nanite.yml +35 -0
- data/vendor/daemon-kit/daemon_generators/nanite_agent/templates/lib/actors/sample.rb +11 -0
- data/vendor/daemon-kit/daemon_generators/nanite_agent/templates/libexec/daemon.rb +31 -0
- data/vendor/daemon-kit/daemon_generators/rspec/USAGE +5 -0
- data/vendor/daemon-kit/daemon_generators/rspec/rspec_generator.rb +55 -0
- data/vendor/daemon-kit/daemon_generators/rspec/templates/spec.rb +11 -0
- data/vendor/daemon-kit/daemon_generators/rspec/templates/spec/spec.opts +1 -0
- data/vendor/daemon-kit/daemon_generators/rspec/templates/spec/spec_helper.rb +21 -0
- data/vendor/daemon-kit/daemon_generators/rspec/templates/tasks/rspec.rake +21 -0
- data/vendor/daemon-kit/daemon_generators/ruote/USAGE +5 -0
- data/vendor/daemon-kit/daemon_generators/ruote/ruote_generator.rb +67 -0
- data/vendor/daemon-kit/daemon_generators/ruote/templates/config/amqp.yml +30 -0
- data/vendor/daemon-kit/daemon_generators/ruote/templates/config/initializers/ruote.rb +13 -0
- data/vendor/daemon-kit/daemon_generators/ruote/templates/config/ruote.yml +23 -0
- data/vendor/daemon-kit/daemon_generators/ruote/templates/lib/daemon.rb +4 -0
- data/vendor/daemon-kit/daemon_generators/ruote/templates/lib/sample.rb +26 -0
- data/vendor/daemon-kit/daemon_generators/ruote/templates/libexec/daemon.rb +33 -0
- data/vendor/daemon-kit/lib/daemon_kit.rb +54 -0
- data/vendor/daemon-kit/lib/daemon_kit/abstract_logger.rb +235 -0
- data/vendor/daemon-kit/lib/daemon_kit/amqp.rb +38 -0
- data/vendor/daemon-kit/lib/daemon_kit/application.rb +187 -0
- data/vendor/daemon-kit/lib/daemon_kit/arguments.rb +165 -0
- data/vendor/daemon-kit/lib/daemon_kit/commands/console.rb +38 -0
- data/vendor/daemon-kit/lib/daemon_kit/config.rb +108 -0
- data/vendor/daemon-kit/lib/daemon_kit/console_daemon.rb +2 -0
- data/vendor/daemon-kit/lib/daemon_kit/core_ext.rb +1 -0
- data/vendor/daemon-kit/lib/daemon_kit/core_ext/configurable.rb +96 -0
- data/vendor/daemon-kit/lib/daemon_kit/core_ext/string.rb +22 -0
- data/vendor/daemon-kit/lib/daemon_kit/cron.rb +48 -0
- data/vendor/daemon-kit/lib/daemon_kit/cucumber/world.rb +38 -0
- data/vendor/daemon-kit/lib/daemon_kit/deployment/capistrano.rb +482 -0
- data/vendor/daemon-kit/lib/daemon_kit/em.rb +43 -0
- data/vendor/daemon-kit/lib/daemon_kit/error_handlers/base.rb +32 -0
- data/vendor/daemon-kit/lib/daemon_kit/error_handlers/hoptoad.rb +61 -0
- data/vendor/daemon-kit/lib/daemon_kit/error_handlers/mail.rb +85 -0
- data/vendor/daemon-kit/lib/daemon_kit/exceptions.rb +8 -0
- data/vendor/daemon-kit/lib/daemon_kit/initializer.rb +438 -0
- data/vendor/daemon-kit/lib/daemon_kit/jabber.rb +170 -0
- data/vendor/daemon-kit/lib/daemon_kit/nanite.rb +7 -0
- data/vendor/daemon-kit/lib/daemon_kit/nanite/agent.rb +56 -0
- data/vendor/daemon-kit/lib/daemon_kit/pid_file.rb +61 -0
- data/vendor/daemon-kit/lib/daemon_kit/ruote_participants.rb +119 -0
- data/vendor/daemon-kit/lib/daemon_kit/ruote_pseudo_participant.rb +68 -0
- data/vendor/daemon-kit/lib/daemon_kit/ruote_workitem.rb +169 -0
- data/vendor/daemon-kit/lib/daemon_kit/safety.rb +85 -0
- data/vendor/daemon-kit/lib/daemon_kit/tasks.rb +2 -0
- data/vendor/daemon-kit/lib/daemon_kit/tasks/environment.rake +10 -0
- data/vendor/daemon-kit/lib/daemon_kit/tasks/framework.rake +120 -0
- data/vendor/daemon-kit/lib/daemon_kit/tasks/god.rake +62 -0
- data/vendor/daemon-kit/lib/daemon_kit/tasks/log.rake +8 -0
- data/vendor/daemon-kit/lib/daemon_kit/tasks/monit.rake +29 -0
- data/vendor/daemon-kit/script/console +10 -0
- data/vendor/daemon-kit/script/destroy +14 -0
- data/vendor/daemon-kit/script/generate +14 -0
- data/vendor/daemon-kit/script/txt2html +71 -0
- data/vendor/daemon-kit/spec/abstract_logger_spec.rb +126 -0
- data/vendor/daemon-kit/spec/argument_spec.rb +70 -0
- data/vendor/daemon-kit/spec/config_spec.rb +79 -0
- data/vendor/daemon-kit/spec/configurable_spec.rb +56 -0
- data/vendor/daemon-kit/spec/daemon_kit_spec.rb +7 -0
- data/vendor/daemon-kit/spec/error_handlers_spec.rb +23 -0
- data/vendor/daemon-kit/spec/fixtures/env.yml +15 -0
- data/vendor/daemon-kit/spec/fixtures/noenv.yml +4 -0
- data/vendor/daemon-kit/spec/initializer_spec.rb +26 -0
- data/vendor/daemon-kit/spec/spec.opts +1 -0
- data/vendor/daemon-kit/spec/spec_helper.rb +27 -0
- data/vendor/daemon-kit/tasks/rspec.rake +21 -0
- data/vendor/daemon-kit/templates/god/god.erb +69 -0
- data/vendor/daemon-kit/templates/monit/monit.erb +14 -0
- data/vendor/daemon-kit/test/test_amqp_generator.rb +48 -0
- data/vendor/daemon-kit/test/test_cron_generator.rb +45 -0
- data/vendor/daemon-kit/test/test_daemon-kit_generator.rb +84 -0
- data/vendor/daemon-kit/test/test_daemon_kit_config.rb +28 -0
- data/vendor/daemon-kit/test/test_deploy_capistrano_generator.rb +48 -0
- data/vendor/daemon-kit/test/test_generator_helper.rb +29 -0
- data/vendor/daemon-kit/test/test_helper.rb +7 -0
- data/vendor/daemon-kit/test/test_jabber_generator.rb +49 -0
- data/vendor/daemon-kit/test/test_nanite_agent_generator.rb +49 -0
- data/vendor/daemon-kit/test/test_ruote_generator.rb +45 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail.rb +5 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/address.rb +426 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/attachments.rb +46 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/base64.rb +46 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/compat.rb +41 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/config.rb +67 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/core_extensions.rb +63 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/encode.rb +581 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/header.rb +960 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/index.rb +9 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/interface.rb +1130 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/loader.rb +3 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/mail.rb +578 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/mailbox.rb +495 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/main.rb +6 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/mbox.rb +3 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/net.rb +248 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/obsolete.rb +132 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/parser.rb +1476 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/port.rb +379 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/quoting.rb +118 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/require_arch.rb +58 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/scanner.rb +49 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/scanner_r.rb +261 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/stringio.rb +280 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/utils.rb +337 -0
- data/vendor/daemon-kit/vendor/tmail-1.2.3/tmail/version.rb +39 -0
- data/vendor/daemon-kit/vendor/tmail.rb +13 -0
- metadata +281 -0
data/.document
ADDED
data/.gitignore
ADDED
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/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
data/config/arguments.rb
ADDED
@@ -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!
|