Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

updating actionmailer_standalone ng example #81

Merged
merged 1 commit into from

2 participants

Roman Andrew Kirilenko
Roman

No description provided.

Andrew Kirilenko iced merged commit e6003ca into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 13, 2012
  1. updating actionmailer_standalone example

    Roman Dzvinkovsky authored
This page is out of date. Refresh to see the latest.
11 ruby_ng/actionmailer_standalone/README.md
View
@@ -0,0 +1,11 @@
+# action_mailer example
+
+This example shows how to send emails in worker.
+
+1. Be sure you've setup your Iron.io credentials, see main [README.md](https://github.com/iron-io/iron_worker_examples).
+2. Copy `actionmailer_config_sample.json` to `actionmailer_config.json` and edit it to set your gmail credentials.
+3. Run `iron_worker upload actionmailer_standalone` to upload worker.
+4. Run `iron_worker queue actionmailer_standalone --payload-file actionmailer_config.json`
+5. Look at [HUD](https://hud.iron.io) to view your tasks running, check logs, etc.
+
+Read the code in this directory to learn more about what happened.
8 ruby_ng/actionmailer_standalone/actionmailer_config_sample.json
View
@@ -0,0 +1,8 @@
+{
+ "gmail": {
+ "username": "you@gmail.com",
+ "password": "yourpwd"
+ },
+ "from": "you@gmail.com",
+ "to": ["you@gmail.com"]
+}
4 ruby_ng/actionmailer_standalone/actionmailer_standalone.worker
View
@@ -0,0 +1,4 @@
+exec 'actionmailer_worker.rb'
+file 'mailer.rb'
+dir 'mailer'
+gem 'actionmailer'
8 ruby_ng/actionmailer_standalone/enqueue.rb
View
@@ -1,8 +0,0 @@
-require 'iron_worker_ng'
-require_relative '../../ruby/examples_helper'
-
-config = ExamplesHelper.load_config
-
-client = IronWorkerNG::Client.new(:token => config['iw']['token'], :project_id => config['iw']['project_id'])
-
-client.tasks.create('ActionmailerWorker', :gmail => config['gmail'], :from => 'andrew@iron.io', :to => ['andrew@iron.io']) # I like receiving mails
14 ruby_ng/actionmailer_standalone/upload.rb
View
@@ -1,14 +0,0 @@
-require 'iron_worker_ng'
-require_relative '../../ruby/examples_helper'
-
-config = ExamplesHelper.load_config
-
-client = IronWorkerNG::Client.new(:token => config['iw']['token'], :project_id => config['iw']['project_id'])
-
-code = IronWorkerNG::Code::Ruby.new
-code.merge_worker 'actionmailer_worker.rb'
-code.merge_file 'mailer.rb' # merging mailer...
-code.merge_dir 'mailer' # ...and templates
-code.merge_gem 'actionmailer' # we need actionmailer gem merged as well
-
-client.codes.create(code)
Something went wrong with that request. Please try again.