delayed_job_tracer 0.9.0 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,2 +1,4 @@
1
- source :rubygems
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in delayed_job_tracer.gemspec
2
4
  gemspec
@@ -1,14 +1,11 @@
1
- delayed_job_tracer -- Like a tracer bullet for your delayed_job queue.
2
- ====================================
1
+ h1. delayed_job_tracer
3
2
 
4
- ## DESCRIPTION
5
-
6
- The delayed_job_tracer gem is designed to monitor the delayed_job gem ([https://github.com/collectiveidea/delayed_job](https://github.com/collectiveidea/delayed_job)). It will alert you via e-mail if something goes wrong, such as if the delayed_job process crashes or one of its jobs fails or takes too long to complete.
3
+ The delayed_job_tracer gem is designed to monitor the delayed_job gem, which was extracted from Shopify ("http://github.com/tobi/delayed_job":http://github.com/tobi/delayed_job), but is now maintained at ("https://github.com/collectiveidea/delayed_job":https://github.com/collectiveidea/delayed_job). It will alert you via e-mail if something goes wrong, such as if the delayed_job process crashes or one of its jobs fails or takes too long to complete.
7
4
 
8
5
  This gem also detects wither e-mails sent through delayed_job are actually being delivered by sending test messages (like tracer bullets) to an e-mail account then checking that account to ensure they were processed and dispatched via the delayed_job queue. The e-mail delivery detection allows you to be notified if e-mails can't be sent out either because of delayed_job having choked or because of an issue with the e-mail account the application uses to send e-mail.
9
6
 
10
7
 
11
- ## Primary Features
8
+ h2. Primary Features
12
9
 
13
10
  * Sends an e-mail notification when delayed_job crashes or is unable to complete a job in a reasonable amount of time.
14
11
  * Sends an e-mail notification when the Rails application is unable to successfully deliver e-mails via delayed_job.
@@ -16,77 +13,83 @@ This gem also detects wither e-mails sent through delayed_job are actually being
16
13
  * Keeps memory usage low by working outside of Rails.
17
14
 
18
15
 
19
- ## Rails and delayed_job support
20
-
21
- * The master branch and all 1.x series gems work with delayed_job 2.1.x and above (Rails 3.x)
22
- * The 2-3-stable branch and all 0.9.x series gems work with delayed_job 2.0.7 and above (Rails 2.3)
23
-
24
-
25
- ## Why use a Cron'd ruby process to monitor delayed_job and e-mail delivery?
16
+ h2. Why use a Cron'd ruby process to monitor delayed_job and e-mail delivery?
26
17
 
27
18
  * Cron is often considered to be more reliable than process monitoring tools like Monit or God.
28
19
  * The Cron'd Ruby process only uses a modest amount of memory (~27MB) for a few seconds at regular intervals, whereas a rake task or runner would equate to the entire size of the Rails application, with a memory footprint that grows over time.
29
20
 
30
21
 
31
- ## Why use a Perl Script to send alert e-mails to admins?
22
+ h2. Why use a Perl Script to send alert e-mails to admins?
32
23
 
33
24
  * It's fast
34
25
  * It doesn't rely on the Rails application
35
26
  * It doesn't rely on the delayed_job process you're monitoring with this gem
36
27
 
37
28
 
38
- ## Prerequisites
29
+ h2. Prerequisites
39
30
 
40
31
  1) Install XML and SSL Packages:
41
32
 
42
33
  Note: These are for Ubuntu. You may need to find alternate packages for your platform.
43
34
 
44
- sudo apt-get install libxml2-dev libxslt-dev libnet-ssleay-perl libcrypt-ssleay-perl libio-socket-ssl-perl
35
+ <pre>
36
+ sudo apt-get install libxml2-dev libxslt-dev libnet-ssleay-perl libcrypt-ssleay-perl libio-socket-ssl-perl
37
+ </pre>
45
38
 
46
39
  2) sendEmail Perl script:
47
40
 
48
41
  Download from "http://caspian.dotconf.net/menu/Software/SendEmail":http://caspian.dotconf.net/menu/Software/SendEmail and follow the setup instructions, or just follow these instructions:
49
42
 
50
- wget -c http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz
51
- tar xvfz sendEmail-v1.56.tar.gz
52
- sudo cp -a sendEmail-v1.56/sendEmail /usr/local/bin
53
- chmod +x /usr/local/bin/sendEmail
43
+ <pre>
44
+ wget -c http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz
45
+ tar xvfz sendEmail-v1.56.tar.gz
46
+ sudo cp -a sendEmail-v1.56/sendEmail /usr/local/bin
47
+ chmod +x /usr/local/bin/sendEmail
48
+ </pre>
54
49
 
55
50
  Run it to be sure it works:
56
51
 
57
- sendEmail
52
+ <pre>
53
+ sendEmail
54
+ </pre>
58
55
 
59
56
  Cleanup:
60
57
 
61
- rm -rf sendEmail-v1.56*
58
+ <pre>
59
+ rm -rf sendEmail-v1.56*
60
+ </pre>
61
+
62
62
 
63
-
64
- ## Installation
63
+ h2. Installation
65
64
 
66
65
  1) Add the gem to your Gemfile:
67
66
 
68
- gem "delayed_job_tracer"
69
-
67
+ <pre>
68
+ gem 'delayed_job_tracer'
69
+ </pre>
70
+
70
71
  2) Generate the config file:
71
72
 
72
- rails g delayed_job_tracer
73
+ <pre>
74
+ rails g delayed_job_tracer
75
+ </pre>
73
76
 
74
- ## Configuration
77
+ h2. Configuration
75
78
 
76
- 1) Create a 'DelayedJobTracer' folder/label in the e-mail account you configure the plugin to send test messages to and a filter to move all incoming messages with '[DelayedJobTracer]' in the subject line to this folder (or label if you're using Gmail). Set the name of this folder in the config/delayed_job_tracer_config.yml file - as it will be the folder that the Ruby process checks for test messages.
79
+ * Create a 'DelayedJobTracer' folder/label in the e-mail account you configure the plugin to send test messages to and a filter to move all incoming messages with '[DelayedJobTracer]' in the subject line to this folder (or label if you're using Gmail). Set the name of this folder in the config/delayed_job_tracer_config.yml file - as it will be the folder that the Ruby process checks for test messages.
77
80
 
78
- 2) Add a Cron job on the server:
81
+ * Add a Cron job on the server:
79
82
 
80
83
  Example for running every 15 minutes, replace with your actual app and ruby locations:
81
84
 
82
- */15 * * * * /usr/local/bin/delayed_job_tracer -c /opt/apps/appname/current/config/delayed_job_tracer_config.yml
83
-
84
- Note: If you're using bundler to install gems within an application-specific gem environment, you may need to also install the gem manually on the server so that the executable is available via the location in the example cron entry above.
85
-
86
- Finish configuring your settings in the config/delayed_job_tracer_config.yml file. Your database and ActionMailer config will be applied via the generator, but you'll still need to provide an alternate e-mail account to send administrative notifications through, provide the admin's e-mail address and so forth.
85
+ <pre>
86
+ */15 * * * * /usr/local/bin/delayed_job_tracer -c /opt/apps/appname/current/config/delayed_job_tracer_config.yml
87
+ </pre>
88
+
89
+ * Finish configuring your settings in the config/delayed_job_tracer_config.yml file. Your database and ActionMailer config will be applied via the generator, but you'll still need to provide an alternate e-mail account to send administrative notifications through, provide the admin's e-mail address and so forth.
87
90
 
88
91
 
89
- ## License
92
+ h2. License
90
93
 
91
94
  The MIT License
92
95
 
@@ -108,4 +111,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
108
111
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
109
112
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
110
113
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
111
- THE SOFTWARE.
114
+ THE SOFTWARE.
@@ -35,4 +35,4 @@ begin
35
35
  DelayedJobTracer.run(config)
36
36
  rescue Exception => e
37
37
  puts "Error: #{e}"
38
- end
38
+ end
@@ -10,14 +10,13 @@ Gem::Specification.new do |s|
10
10
  s.email = ["kjohnston.ca@gmail.com"]
11
11
  s.homepage = "https://github.com/kjohnston/delayed_job_tracer"
12
12
  s.summary = %q{Like a tracer bullet for your delayed_job queue}
13
- s.description = %q{Monitors the delayed_job queue and periodically tests its ability to deliver
14
- e-mail messages and e-mails you if something goes wrong, such as the delayed_job
13
+ s.description = %q{Monitors the delayed_job queue and periodically tests its ability to deliver
14
+ e-mail messages and e-mails you if something goes wrong, such as the delayed_job
15
15
  process crashes or one of its jobs fails or takes too long to complete.}
16
16
 
17
- s.add_runtime_dependency "delayed_job", "~> 2.0.7"
18
- s.add_runtime_dependency "mms2r", "2.4.1"
19
- s.add_runtime_dependency "mysql2", ">= 0.2.6", "<= 0.4"
20
- s.add_runtime_dependency "tmail", "1.2.7.1"
17
+ s.add_dependency('tmail', '1.2.7.1')
18
+ s.add_dependency('mms2r', '2.4.1')
19
+ s.add_dependency('mysql', '2.7')
21
20
 
22
21
  s.files = `git ls-files`.split("\n")
23
22
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -4,7 +4,7 @@ else
4
4
  require File.dirname(__FILE__) + '/delayed_job_tracer/notifier'
5
5
  require File.dirname(__FILE__) + '/delayed_job_tracer/message_finder'
6
6
  require File.dirname(__FILE__) + '/delayed_job_tracer/mysql_interface'
7
-
7
+
8
8
  class DelayedJobTracer
9
9
 
10
10
  def self.config
@@ -1,16 +1,18 @@
1
1
  class DelayedJobTracerMailer < ActionMailer::Base
2
2
 
3
3
  def delayed_job_tracer_test_message
4
- config = YAML.load_file(Rails.root.join('config', 'delayed_job_tracer_config.yml'))
5
- @from = ActionMailer::Base.smtp_settings[:user_name]
6
- @recipients = config["monitor"]["username"]
7
- @subject = "[DelayedJobTracer] #{Time.zone.now}"
8
- @sent_on = Time.zone.now
9
- @body = "This is a test message to ensure messages are being delivered successfully via delayed_job."
4
+ config = YAML.load_file(Rails.root.join('config', 'delayed_job_tracer_config.yml'))
5
+ to = config['monitor']['username']
6
+ from = ActionMailer::Base.smtp_settings[:user_name]
7
+ subject = "[DelayedJobTracer] Test message sent at: #{Time.zone.now}"
8
+ message = 'This is a test message to ensure messages are being delivered successfully via delayed_job.'
9
+ mail(:to => to, :from => from, :subject => subject) do |format|
10
+ format.text { render :text => message }
11
+ end
10
12
  end
11
-
13
+
12
14
  def self.enqueue_delayed_job_tracer_test_message
13
- delay.deliver_delayed_job_tracer_test_message
15
+ delay.delayed_job_tracer_test_message
14
16
  end
15
-
17
+
16
18
  end
@@ -5,22 +5,22 @@ require 'mms2r'
5
5
  require 'yaml'
6
6
 
7
7
  class MessageFinder
8
-
8
+
9
9
  def self.found_recent_message?
10
10
  c = DelayedJobTracer.config['monitor']
11
-
11
+
12
12
  server = c['server']
13
13
  port = c['port'] || 143
14
14
  ssl = c['ssl'] || false
15
15
  username = c['username']
16
16
  password = c['password']
17
17
  folder = c['folder']
18
-
18
+
19
19
  imap = Net::IMAP.new server, port, ssl
20
20
  imap.login username, password
21
21
  imap.select folder
22
22
  uids = imap.search(["UNSEEN"])
23
-
23
+
24
24
  emails = []
25
25
  times = []
26
26
 
@@ -39,12 +39,12 @@ class MessageFinder
39
39
  end
40
40
 
41
41
  imap.disconnect
42
-
42
+
43
43
  # Delete tmp files used by mms2r
44
44
  emails.map{|m| m[:mms].purge }
45
45
 
46
46
  # Just checks to see if there was at least one recent unread message
47
47
  return true unless times.blank?
48
48
  end
49
-
49
+
50
50
  end
@@ -1,52 +1,52 @@
1
- require 'mysql2'
1
+ require 'mysql'
2
2
 
3
3
  class MySQLInterface
4
-
4
+
5
5
  # Connects to the db and submits a query
6
6
  def self.query(sql)
7
7
  c = DelayedJobTracer.config['database']
8
- d = Mysql2::Client.new(:host => c['ip'], :database => c['database'], :username => c['user'], :password => c['password'])
8
+ d = Mysql::new(c['ip'], c['user'], c['password'], c['database'])
9
9
  d.query(sql)
10
10
  end
11
-
11
+
12
12
  # Returns true if there are no stale records
13
13
  def self.delayed_job_queue_ok?
14
- query(delayed_job_stale_records).count.zero?
14
+ query(delayed_job_stale_records).num_rows.zero?
15
15
  end
16
-
16
+
17
17
  # Inserts a delayed_job record
18
18
  def self.queue_delayed_job
19
19
  query(delayed_job_record).to_s
20
20
  end
21
-
21
+
22
22
  # SQL for selecting stale delayed_job records
23
23
  def self.delayed_job_stale_records
24
24
  c = DelayedJobTracer.config['delayed_job']
25
25
  "SELECT * FROM delayed_jobs WHERE created_at < '#{(Time.now-c['stale']).utc.strftime("%Y-%m-%d %H:%M:%S")}'"
26
26
  end
27
-
27
+
28
28
  # SQL for inserting a delayed_job record
29
29
  def self.delayed_job_record
30
- "INSERT INTO delayed_jobs (`handler`, `run_at`, `created_at`, `updated_at`) VALUES
30
+ "INSERT INTO delayed_jobs (`handler`, `run_at`, `created_at`, `updated_at`) VALUES
31
31
  ('#{delayed_job_handler}', '#{mysql_timestamp}', '#{mysql_timestamp}', '#{mysql_timestamp}')"
32
32
  end
33
-
33
+
34
34
  # SQL helper method for inserting a delayed_job record
35
35
  def self.delayed_job_handler
36
- "--- !ruby/struct:Delayed::PerformableMethod
37
- object: LOAD;DelayedJobTracerMailer
38
- method: :deliver_delayed_job_tracer_test_message
36
+ "--- !ruby/struct:Delayed::PerformableMailer
37
+ object: !ruby/class DelayedJobTracerMailer
38
+ method_name: :delayed_job_tracer_test_message
39
39
  args: []"
40
40
  end
41
-
41
+
42
42
  # Timestamp in the format that e-mails expect
43
43
  def self.email_timestamp
44
44
  Time.now.strftime("%a, %e %b %Y %H:%M:%S %z")
45
45
  end
46
-
46
+
47
47
  # Timestamp in the format that MySQL expects
48
48
  def self.mysql_timestamp
49
49
  Time.now.utc.strftime("%Y-%m-%d %H:%M:%S")
50
50
  end
51
-
51
+
52
52
  end
@@ -1,19 +1,19 @@
1
1
  require 'yaml'
2
2
 
3
3
  class Notifier
4
-
4
+
5
5
  def self.notify_admin_of_email_issue
6
6
  subject_suffix = 'E-mail Issue'
7
7
  message_suffix = 'is having trouble sending e-mail via delayed_job, please investigate.'
8
8
  send_notification(subject_suffix, message_suffix)
9
9
  end
10
-
10
+
11
11
  def self.notify_admin_of_queue_issue
12
12
  subject_suffix = 'Queue Issue'
13
13
  message_suffix = 'has one or more stale delayed_jobs, please investigate.'
14
14
  send_notification(subject_suffix, message_suffix)
15
15
  end
16
-
16
+
17
17
  def self.send_notification(subject_suffix, message_suffix)
18
18
  c = DelayedJobTracer.config
19
19
  account = c['alert']
@@ -25,5 +25,5 @@ class Notifier
25
25
  -s #{account['server']}:#{account['port']} -xu #{account['username']} -xp #{account['password']} \
26
26
  #{ '-o tls=yes' if c['alert']['tls'] == 'true' }"
27
27
  end
28
-
28
+
29
29
  end
@@ -1,3 +1,3 @@
1
1
  module DelayedJobTracer
2
- VERSION = "0.9.0"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -0,0 +1,29 @@
1
+ require 'rails/generators'
2
+
3
+ class DelayedJobTracerGenerator < Rails::Generators::Base
4
+
5
+ attr_accessor :app_name, :db_host, :db_database, :db_username, :db_password,
6
+ :mail_domain, :mail_username, :mail_password
7
+
8
+ def self.source_root
9
+ @source_root ||= File.join(File.dirname(__FILE__), 'templates')
10
+ end
11
+
12
+ def create_config_file
13
+ @app_name = Dir.glob(Rails.root).to_s.split('/').last
14
+
15
+ db_config = YAML.load_file('config/database.yml')
16
+ @db_host = db_config['production']['host']
17
+ @db_database = db_config['production']['database']
18
+ @db_username = db_config['production']['username']
19
+ @db_password = db_config['production']['password']
20
+
21
+ mail_config = ActionMailer::Base.smtp_settings
22
+ @mail_domain = mail_config[:address]
23
+ @mail_username = mail_config[:user_name]
24
+ @mail_password = mail_config[:password]
25
+
26
+ template 'delayed_job_tracer_config.yml', 'config/delayed_job_tracer_config.yml'
27
+ end
28
+
29
+ end
@@ -1,15 +1,15 @@
1
1
  # Application's name
2
2
  # This will be the prefix of alert e-mail subject lines, which will have brackets
3
- # added around it.
4
- # Example: App Name => [App Name]
5
- app:
3
+ # added around it.
4
+ # Example: App Name => [App Name]
5
+ app:
6
6
  name: <%= app_name %>
7
7
 
8
-
8
+
9
9
  # Administrative e-mail address to send alerts to
10
- admin:
11
- email:
12
-
10
+ admin:
11
+ email:
12
+
13
13
 
14
14
  # Number of seconds after a delayed_job is considered stale.
15
15
  # An e-mail will be sent to the admin if records older than this are found
@@ -19,9 +19,9 @@ admin:
19
19
  # 3) One or more jobs are taking longer than the number of seconds set here
20
20
  # to complete
21
21
  delayed_job:
22
- stale: 3600
23
-
24
-
22
+ stale: 3600
23
+
24
+
25
25
  # Application's production database
26
26
  database:
27
27
  ip: <%= db_host %>
@@ -49,7 +49,7 @@ monitor:
49
49
  # e-mail account and Google puts it on lockdown.
50
50
  alert:
51
51
  server: smtp.gmail.com
52
- username:
53
- password:
52
+ username:
53
+ password:
54
54
  port: 25
55
55
  tls: true
metadata CHANGED
@@ -1,13 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_job_tracer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
5
- prerelease:
6
- segments:
7
- - 0
8
- - 9
9
- - 0
10
- version: 0.9.0
4
+ version: 1.0.3
11
5
  platform: ruby
12
6
  authors:
13
7
  - Kenny Johnston
@@ -15,83 +9,42 @@ autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
11
 
18
- date: 2011-09-13 00:00:00 Z
12
+ date: 2011-02-28 00:00:00 -08:00
13
+ default_executable:
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
- name: delayed_job
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
16
+ name: tmail
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
25
20
  requirements:
26
- - - ~>
21
+ - - "="
27
22
  - !ruby/object:Gem::Version
28
- hash: 1
29
- segments:
30
- - 2
31
- - 0
32
- - 7
33
- version: 2.0.7
34
- type: :runtime
35
- version_requirements: *id001
23
+ version: 1.2.7.1
24
+ version:
36
25
  - !ruby/object:Gem::Dependency
37
26
  name: mms2r
38
- prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
41
30
  requirements:
42
31
  - - "="
43
32
  - !ruby/object:Gem::Version
44
- hash: 29
45
- segments:
46
- - 2
47
- - 4
48
- - 1
49
33
  version: 2.4.1
50
- type: :runtime
51
- version_requirements: *id002
34
+ version:
52
35
  - !ruby/object:Gem::Dependency
53
- name: mysql2
54
- prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
56
- none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 27
61
- segments:
62
- - 0
63
- - 2
64
- - 6
65
- version: 0.2.6
66
- - - <=
67
- - !ruby/object:Gem::Version
68
- hash: 3
69
- segments:
70
- - 0
71
- - 4
72
- version: "0.4"
36
+ name: mysql
73
37
  type: :runtime
74
- version_requirements: *id003
75
- - !ruby/object:Gem::Dependency
76
- name: tmail
77
- prerelease: false
78
- requirement: &id004 !ruby/object:Gem::Requirement
79
- none: false
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
80
40
  requirements:
81
41
  - - "="
82
42
  - !ruby/object:Gem::Version
83
- hash: 81
84
- segments:
85
- - 1
86
- - 2
87
- - 7
88
- - 1
89
- version: 1.2.7.1
90
- type: :runtime
91
- version_requirements: *id004
43
+ version: "2.7"
44
+ version:
92
45
  description: |-
93
- Monitors the delayed_job queue and periodically tests its ability to deliver
94
- e-mail messages and e-mails you if something goes wrong, such as the delayed_job
46
+ Monitors the delayed_job queue and periodically tests its ability to deliver
47
+ e-mail messages and e-mails you if something goes wrong, such as the delayed_job
95
48
  process crashes or one of its jobs fails or takes too long to complete.
96
49
  email:
97
50
  - kjohnston.ca@gmail.com
@@ -104,19 +57,19 @@ extra_rdoc_files: []
104
57
  files:
105
58
  - .gitignore
106
59
  - Gemfile
107
- - README.md
60
+ - README.textile
108
61
  - Rakefile
109
62
  - bin/delayed_job_tracer
110
63
  - delayed_job_tracer.gemspec
111
- - generators/delayed_job_tracer/delayed_job_tracer_generator.rb
112
- - generators/delayed_job_tracer/templates/delayed_job_tracer_config.yml
113
64
  - lib/delayed_job_tracer.rb
114
65
  - lib/delayed_job_tracer/delayed_job_tracer_mailer.rb
115
66
  - lib/delayed_job_tracer/message_finder.rb
116
67
  - lib/delayed_job_tracer/mysql_interface.rb
117
68
  - lib/delayed_job_tracer/notifier.rb
118
69
  - lib/delayed_job_tracer/version.rb
119
- - rails/init.rb
70
+ - lib/generators/delayed_job_tracer/delayed_job_tracer_generator.rb
71
+ - lib/generators/delayed_job_tracer/templates/delayed_job_tracer_config.yml
72
+ has_rdoc: true
120
73
  homepage: https://github.com/kjohnston/delayed_job_tracer
121
74
  licenses: []
122
75
 
@@ -126,27 +79,21 @@ rdoc_options: []
126
79
  require_paths:
127
80
  - lib
128
81
  required_ruby_version: !ruby/object:Gem::Requirement
129
- none: false
130
82
  requirements:
131
83
  - - ">="
132
84
  - !ruby/object:Gem::Version
133
- hash: 3
134
- segments:
135
- - 0
136
85
  version: "0"
86
+ version:
137
87
  required_rubygems_version: !ruby/object:Gem::Requirement
138
- none: false
139
88
  requirements:
140
89
  - - ">="
141
90
  - !ruby/object:Gem::Version
142
- hash: 3
143
- segments:
144
- - 0
145
91
  version: "0"
92
+ version:
146
93
  requirements: []
147
94
 
148
95
  rubyforge_project:
149
- rubygems_version: 1.8.6
96
+ rubygems_version: 1.3.5
150
97
  signing_key:
151
98
  specification_version: 3
152
99
  summary: Like a tracer bullet for your delayed_job queue
@@ -1,25 +0,0 @@
1
- class DelayedJobTracerGenerator < Rails::Generator::Base
2
-
3
- attr_accessor :app_name, :db_host, :db_database, :db_username, :db_password,
4
- :mail_domain, :mail_username, :mail_password
5
-
6
- def manifest
7
- @app_name = Rails.root.to_s.split('/').last
8
-
9
- db_config = Rails::Configuration.new
10
- @db_host = db_config.database_configuration["production"]["host"]
11
- @db_database = db_config.database_configuration["production"]["database"]
12
- @db_username = db_config.database_configuration["production"]["username"]
13
- @db_password = db_config.database_configuration["production"]["password"]
14
-
15
- mail_config = ActionMailer::Base.smtp_settings
16
- @mail_domain = mail_config[:address]
17
- @mail_username = mail_config[:user_name]
18
- @mail_password = mail_config[:password]
19
-
20
- record do |m|
21
- m.template 'delayed_job_tracer_config.yml', File.join('config', 'delayed_job_tracer_config.yml')
22
- end
23
- end
24
-
25
- end
data/rails/init.rb DELETED
@@ -1 +0,0 @@
1
- require "delayed_job_tracer"