mad_mimi_two 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/ruby
2
+ # == Synopsis
3
+ # send mad mimi email
4
+ # == Usage
5
+ # add_to_list.rb -e email -l listname -k key -u mimiusername
6
+ # == Author
7
+ # Scott Sproule --- Ficonab.com (scott.sproule@ficonab.com)
8
+ # == Example
9
+ # add_to_list.rb -k xxxx -u xxxx@estormtech.com -l listname -e destination@mail.com
10
+ # == Copyright
11
+ # Copyright (c) 2010 Ficonab Pte. Ltd.
12
+ # See license for license details
13
+ require 'yaml'
14
+ require 'rubygems'
15
+ gem 'mad_mimi_two'
16
+ require 'mad_mimi_two'
17
+ require 'optparse'
18
+ require 'rdoc/usage'
19
+ #require 'java' if RUBY_PLATFORM =~ /java/
20
+ # start the processing
21
+ arg_hash=MadMimiTwo::Options.parse_options(ARGV)
22
+ RDoc::usage if arg_hash[:help]==true
23
+ require 'pp'
24
+
25
+ options = arg_hash
26
+ # set up variables using hash
27
+ # note the strange spacing needed to put the ' in the string
28
+ MadMimiTwo::MadMimiMessage.api_settings = {
29
+ :username => options[:username].to_s,
30
+ :api_key => options[:key].to_s
31
+ }
32
+ t=MadMimiTwo::MadMimiMessage.new
33
+ r=t.add_email(options[:list],options[:email])
34
+ puts "status is #{r} for email #{options[:email]} and list: #{options[:list]}"
@@ -20,6 +20,9 @@ module MadMimiTwo
20
20
  opts.on("-f","--from VAL", String) {|val|
21
21
  temp_hash[:from] = val
22
22
  puts "# from is #{val}" }
23
+ opts.on("-l","--list VAL", String) {|val|
24
+ temp_hash[:list] = val
25
+ puts "# list is #{val}" }
23
26
  opts.on("-s","--subject VAL", String) {|val|
24
27
  temp_hash[:subject] = val
25
28
  puts "# subject is #{val}" }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mad_mimi_two
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 1
10
- version: 0.6.1
9
+ - 2
10
+ version: 0.6.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - scott sproule
@@ -56,6 +56,7 @@ email:
56
56
  executables:
57
57
  - send_mimi.rb
58
58
  - check_mimi_status.rb
59
+ - add_to_list.rb
59
60
  extensions: []
60
61
 
61
62
  extra_rdoc_files:
@@ -79,6 +80,7 @@ files:
79
80
  - test/test_mad_mimi_two.rb
80
81
  - bin/send_mimi.rb
81
82
  - bin/check_mimi_status.rb
83
+ - bin/add_to_list.rb
82
84
  has_rdoc: true
83
85
  homepage: http://github.com/semdinsp/mad_mimi_two
84
86
  licenses: []