rename mail.rb to notification.rb 93/25493/1
authorHyoun Jiil <jiil.hyoun@samsung.com>
Wed, 6 Aug 2014 06:19:29 +0000 (15:19 +0900)
committerHyoun Jiil <jiil.hyoun@samsung.com>
Wed, 6 Aug 2014 06:19:29 +0000 (15:19 +0900)
Change-Id: I083bbc9d649d9b6a8f6b47c1a7b1071f24f243f1

src/common/DibsMail.rb [deleted file]
src/common/notification.rb [new file with mode: 0644]

diff --git a/src/common/DibsMail.rb b/src/common/DibsMail.rb
deleted file mode 100644 (file)
index 5207acc..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-=begin
-
- mail.rb
-
-Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-
-Contact:
-Taejun Ha <taejun.ha@samsung.com>
-Jiil Hyoun <jiil.hyoun@samsung.com>
-Donghyuk Yang <donghyuk.yang@samsung.com>
-DongHee Yang <donghee.yang@samsung.com>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Contributors:
-- S-Core Co., Ltd
-=end
-
-require 'net/smtp'
-$LOAD_PATH.unshift File.dirname(__FILE__)
-require "mailConfig"
-
-class Mail
-
-        def Mail.send_mail( mail_to, subject, contents )
-
-                if mail_to.nil? or mail_to.empty? \
-                        or subject.nil? or subject.empty? \
-                        or contents.nil? or contents.empty? then
-                        return false
-                end
-
-                message = <<MESSAGE_END
-From: #{SENDER}
-TO: #{mail_to}
-Subject: #{subject}
-
-#{contents}
-
-MESSAGE_END
-
-Mail.send_mail2( mail_to, message )
-        end
-
-        def Mail.send_mail2( mail_to_list, message )
-                if mail_to_list.empty? then
-                        puts "There is no maintainer email address "
-                else
-                        begin
-                                Net::SMTP.start('localhost') do |smtp|
-                                        smtp.send_message( message, SENDER, mail_to_list)
-                                end
-                        rescue => e
-                                puts "Can't send result email"
-                                puts e.message
-                        end
-                end
-        end
-
-        def Mail.parse_email( low_email_list )
-                mail_list = []
-                low_email_list.split(",").each do | low_email |
-                        ms = low_email.index('<')
-                me = low_email.index('>')
-                if ms.nil? or me.nil? then
-                        next
-                else
-                        mail = low_email[(ms+1)..(me-1)]
-                end
-                if mail.include?("@") then mail_list.push mail end
-                end
-                return mail_list
-        end
-end
-
diff --git a/src/common/notification.rb b/src/common/notification.rb
new file mode 100644 (file)
index 0000000..5207acc
--- /dev/null
@@ -0,0 +1,85 @@
+=begin
+
+ mail.rb
+
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+
+Contact:
+Taejun Ha <taejun.ha@samsung.com>
+Jiil Hyoun <jiil.hyoun@samsung.com>
+Donghyuk Yang <donghyuk.yang@samsung.com>
+DongHee Yang <donghee.yang@samsung.com>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Contributors:
+- S-Core Co., Ltd
+=end
+
+require 'net/smtp'
+$LOAD_PATH.unshift File.dirname(__FILE__)
+require "mailConfig"
+
+class Mail
+
+        def Mail.send_mail( mail_to, subject, contents )
+
+                if mail_to.nil? or mail_to.empty? \
+                        or subject.nil? or subject.empty? \
+                        or contents.nil? or contents.empty? then
+                        return false
+                end
+
+                message = <<MESSAGE_END
+From: #{SENDER}
+TO: #{mail_to}
+Subject: #{subject}
+
+#{contents}
+
+MESSAGE_END
+
+Mail.send_mail2( mail_to, message )
+        end
+
+        def Mail.send_mail2( mail_to_list, message )
+                if mail_to_list.empty? then
+                        puts "There is no maintainer email address "
+                else
+                        begin
+                                Net::SMTP.start('localhost') do |smtp|
+                                        smtp.send_message( message, SENDER, mail_to_list)
+                                end
+                        rescue => e
+                                puts "Can't send result email"
+                                puts e.message
+                        end
+                end
+        end
+
+        def Mail.parse_email( low_email_list )
+                mail_list = []
+                low_email_list.split(",").each do | low_email |
+                        ms = low_email.index('<')
+                me = low_email.index('>')
+                if ms.nil? or me.nil? then
+                        next
+                else
+                        mail = low_email[(ms+1)..(me-1)]
+                end
+                if mail.include?("@") then mail_list.push mail end
+                end
+                return mail_list
+        end
+end
+