mad_mimi_two 0.6.4 → 0.6.5
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.
- data/History.txt +3 -0
- data/bin/add_to_list.rb +6 -2
- data/bin/check_mimi_status.rb +5 -2
- data/bin/send_mimi.rb +5 -2
- data/lib/mad_mimi_two/support.rb +9 -31
- metadata +5 -5
data/History.txt
CHANGED
data/bin/add_to_list.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
|
+
usage=<<EOF_USAGE
|
3
|
+
|
2
4
|
# == Synopsis
|
3
5
|
# send mad mimi email
|
4
6
|
# == Usage
|
@@ -10,16 +12,18 @@
|
|
10
12
|
# == Copyright
|
11
13
|
# Copyright (c) 2010 Ficonab Pte. Ltd.
|
12
14
|
# See license for license details
|
15
|
+
EOF_USAGE
|
16
|
+
|
13
17
|
require 'yaml'
|
14
18
|
require 'rubygems'
|
15
19
|
gem 'mad_mimi_two'
|
16
20
|
require 'mad_mimi_two'
|
17
21
|
require 'optparse'
|
18
|
-
require 'rdoc/usage'
|
19
22
|
#require 'java' if RUBY_PLATFORM =~ /java/
|
20
23
|
# start the processing
|
21
24
|
arg_hash=MadMimiTwo::Options.parse_options(ARGV)
|
22
|
-
|
25
|
+
EstormScripts::Options.show_usage_exit(usage) if arg_hash[:help]==true
|
26
|
+
|
23
27
|
require 'pp'
|
24
28
|
|
25
29
|
options = arg_hash
|
data/bin/check_mimi_status.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
|
+
usage=<<EOF_USAGE
|
3
|
+
|
2
4
|
# == Synopsis
|
3
5
|
# send mad mimi email
|
4
6
|
# == Usage
|
@@ -10,16 +12,17 @@
|
|
10
12
|
# == Copyright
|
11
13
|
# Copyright (c) 2010 Ficonab Pte. Ltd.
|
12
14
|
# See license for license details
|
15
|
+
EOF_USAGE
|
16
|
+
|
13
17
|
require 'yaml'
|
14
18
|
require 'rubygems'
|
15
19
|
gem 'mad_mimi_two'
|
16
20
|
require 'mad_mimi_two'
|
17
21
|
require 'optparse'
|
18
|
-
require 'rdoc/usage'
|
19
22
|
#require 'java' if RUBY_PLATFORM =~ /java/
|
20
23
|
# start the processing
|
21
24
|
arg_hash=MadMimiTwo::Options.parse_options(ARGV)
|
22
|
-
|
25
|
+
EstormScripts::Options.show_usage_exit(usage) if arg_hash[:help]==true
|
23
26
|
require 'pp'
|
24
27
|
|
25
28
|
options = arg_hash
|
data/bin/send_mimi.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
|
+
usage=<<EOF_USAGE
|
3
|
+
|
2
4
|
# == Synopsis
|
3
5
|
# send mad mimi email
|
4
6
|
# == Usage
|
@@ -10,16 +12,17 @@
|
|
10
12
|
# == Copyright
|
11
13
|
# Copyright (c) 2010 Ficonab Pte. Ltd.
|
12
14
|
# See license for license details
|
15
|
+
EOF_USAGE
|
16
|
+
|
13
17
|
require 'yaml'
|
14
18
|
require 'rubygems'
|
15
19
|
gem 'mad_mimi_two'
|
16
20
|
require 'mad_mimi_two'
|
17
21
|
require 'optparse'
|
18
|
-
require 'rdoc/usage'
|
19
22
|
#require 'java' if RUBY_PLATFORM =~ /java/
|
20
23
|
# start the processing
|
21
24
|
arg_hash=MadMimiTwo::Options.parse_options(ARGV)
|
22
|
-
|
25
|
+
EstormScripts::Options.show_usage_exit(usage) if arg_hash[:help]==true
|
23
26
|
require 'pp'
|
24
27
|
|
25
28
|
options = arg_hash
|
data/lib/mad_mimi_two/support.rb
CHANGED
@@ -29,8 +29,9 @@ module MadMimiTwo
|
|
29
29
|
opts.on("-d","--debug", "turn on debug") { |val| temp_hash[:debug ] = true }
|
30
30
|
opts.on("-k","--key VAL", String) { |val| temp_hash[:key ] = val
|
31
31
|
puts "# mad mimi api key #{temp_hash[:key]}" }
|
32
|
-
|
33
|
-
|
32
|
+
opts.on_tail("-h","--help", "get help message") { |val| temp_hash[:help ] = true
|
33
|
+
puts opts }
|
34
|
+
|
34
35
|
opts.parse(params)
|
35
36
|
# puts " in HTTP #{hostname} port #{port} url: #{url}"
|
36
37
|
|
@@ -39,35 +40,12 @@ module MadMimiTwo
|
|
39
40
|
end # parse options
|
40
41
|
end #class
|
41
42
|
# help build xml commands from messages
|
43
|
+
def self.show_usage_exit(usage)
|
44
|
+
# usage=usage.gsub(/^\s*#/,'')
|
45
|
+
puts usage
|
46
|
+
exit
|
47
|
+
end
|
42
48
|
|
43
49
|
end #module
|
44
50
|
|
45
|
-
|
46
|
-
# main_program_file = caller[1].sub(/:\d+$/, '')
|
47
|
-
main_program_file = caller[1].split(':')[0]
|
48
|
-
#puts "main program is #{main_program_file}"
|
49
|
-
# puts " caller is #{caller.inspect}"
|
50
|
-
comment = File.open(main_program_file) do |file|
|
51
|
-
find_comment(file)
|
52
|
-
end
|
53
|
-
|
54
|
-
comment = comment.gsub(/^\s*#/, '')
|
55
|
-
|
56
|
-
markup = SM::SimpleMarkup.new
|
57
|
-
flow_convertor = SM::ToFlow.new
|
58
|
-
|
59
|
-
flow = markup.convert(comment, flow_convertor)
|
60
|
-
|
61
|
-
format = "plain"
|
62
|
-
|
63
|
-
unless args.empty?
|
64
|
-
flow = extract_sections(flow, args)
|
65
|
-
end
|
66
|
-
|
67
|
-
options = RI::Options.instance
|
68
|
-
if args = ENV["RI"]
|
69
|
-
options.parse(args.split)
|
70
|
-
end
|
71
|
-
formatter = options.formatter.new(options, "")
|
72
|
-
formatter.display_flow(flow)
|
73
|
-
end
|
51
|
+
|
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
|
-
prerelease:
|
4
|
+
hash: 13
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 5
|
10
|
+
version: 0.6.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- scott sproule
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements: []
|
115
115
|
|
116
116
|
rubyforge_project: mad_mimi_two
|
117
|
-
rubygems_version: 1.
|
117
|
+
rubygems_version: 1.6.0
|
118
118
|
signing_key:
|
119
119
|
specification_version: 3
|
120
120
|
summary: Using Mad Mimi on rails 3
|