@@ -22,6 +22,10 | |||
|
22 | 22 | # create: create a user account |
|
23 | 23 | # --no-permission-check disable permission checking when receiving |
|
24 | 24 | # the email |
|
25 | # --key-file=PATH path to a file that contains the Redmine | |
|
26 | # API key (use this option instead of --key | |
|
27 | # if you don't the key to appear in the | |
|
28 | # command line) | |
|
25 | 29 | # --no-check-certificate do not check server certificate |
|
26 | 30 | # -h, --help show this help |
|
27 | 31 | # -v, --verbose show extra information |
@@ -87,6 +91,7 class RedmineMailHandler | |||
|
87 | 91 | [ '--verbose', '-v', GetoptLong::NO_ARGUMENT ], |
|
88 | 92 | [ '--url', '-u', GetoptLong::REQUIRED_ARGUMENT ], |
|
89 | 93 | [ '--key', '-k', GetoptLong::REQUIRED_ARGUMENT], |
|
94 | [ '--key-file', GetoptLong::REQUIRED_ARGUMENT], | |
|
90 | 95 | [ '--project', '-p', GetoptLong::REQUIRED_ARGUMENT ], |
|
91 | 96 | [ '--status', '-s', GetoptLong::REQUIRED_ARGUMENT ], |
|
92 | 97 | [ '--tracker', '-t', GetoptLong::REQUIRED_ARGUMENT], |
@@ -104,6 +109,13 class RedmineMailHandler | |||
|
104 | 109 | self.url = arg.dup |
|
105 | 110 | when '--key' |
|
106 | 111 | self.key = arg.dup |
|
112 | when '--key-file' | |
|
113 | begin | |
|
114 | self.key = File.read(arg).strip | |
|
115 | rescue Exception => e | |
|
116 | $stderr.puts "Unable to read the key from #{arg}: #{e.message}" | |
|
117 | exit 1 | |
|
118 | end | |
|
107 | 119 | when '--help' |
|
108 | 120 | usage |
|
109 | 121 | when '--verbose' |
General Comments 0
You need to be logged in to leave comments.
Login now