keystone 0.0.29 → 0.0.30
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/Rakefile +18 -14
- data/VERSION +1 -1
- data/example/batch_sample.rb +28 -16
- data/example/os.rb +1 -0
- data/example/sendmail.rb +1 -0
- data/example/string_util.rb +1 -0
- data/lib/keystone.rb +7 -2
- data/lib/keystone/base.rb +67 -45
- data/lib/keystone/batch.rb +1 -0
- data/lib/keystone/batch/base.rb +20 -17
- data/lib/keystone/core_ext.rb +1 -0
- data/lib/keystone/core_ext/array.rb +1 -0
- data/lib/keystone/core_ext/blank.rb +1 -0
- data/lib/keystone/core_ext/dir.rb +1 -0
- data/lib/keystone/core_ext/ipaddr.rb +1 -0
- data/lib/keystone/core_ext/object.rb +6 -5
- data/lib/keystone/core_ext/tempfile.rb +1 -0
- data/lib/keystone/core_ext/uri.rb +1 -0
- data/lib/keystone/mail.rb +9 -5
- data/lib/keystone/mail/send.rb +17 -65
- data/lib/keystone/{mail → mail__old}/address.rb +10 -9
- data/lib/keystone/{mail → mail__old}/content_type.rb +1 -0
- data/lib/keystone/{mail → mail__old}/message.rb +4 -1
- data/lib/keystone/{mail → mail__old}/message_factory.rb +1 -0
- data/lib/keystone/{mail → mail__old}/message_iso2022jp.rb +1 -0
- data/lib/keystone/{mail → mail__old}/message_sjis.rb +1 -0
- data/lib/keystone/{mail → mail__old}/receive.rb +28 -27
- data/lib/keystone/mail__old/send.rb +89 -0
- data/lib/keystone/os.rb +1 -0
- data/lib/keystone/os/abstract_os.rb +8 -4
- data/lib/keystone/os/centos.rb +1 -0
- data/lib/keystone/os/darwin.rb +1 -0
- data/lib/keystone/os/linux.rb +1 -0
- data/lib/keystone/os/osx.rb +1 -0
- data/lib/keystone/os/unix.rb +4 -3
- data/lib/keystone/string_util.rb +1 -0
- data/test_local/batch.rb +47 -0
- data/util/bin/command_broadcast.rb +1 -0
- data/util/bin/disk_size_check.rb +1 -1
- data/util/bin/ve2tar.rb +1 -1
- metadata +12 -13
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
$:.unshift "lib"
|
5
5
|
|
6
|
-
require 'lib/keystone'
|
6
|
+
#require 'lib/keystone'
|
7
7
|
|
8
8
|
# task :build do
|
9
9
|
# sh 'rm -f kanamei-keystone-#{Keystone::VERSION}.gem'
|
@@ -11,16 +11,20 @@ require 'lib/keystone'
|
|
11
11
|
# sh "gem install kanamei-keystone-#{Keystone::VERSION}.gem"
|
12
12
|
# end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
14
|
+
desc "create gem file"
|
15
|
+
task :build do
|
16
|
+
begin
|
17
|
+
require 'jeweler'
|
18
|
+
Jeweler::Tasks.new do |gemspec|
|
19
|
+
gemspec.name = "keystone"
|
20
|
+
gemspec.summary = "oreore library"
|
21
|
+
gemspec.email = "paco.jp@gmail.com"
|
22
|
+
gemspec.homepage = "http://github.com/kanamei/keystone"
|
23
|
+
gemspec.description = "oreore library"
|
24
|
+
gemspec.authors = ["paco"]
|
25
|
+
end
|
26
|
+
rescue LoadError
|
27
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.30
|
data/example/batch_sample.rb
CHANGED
@@ -1,24 +1,36 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
require 'rubygems'
|
2
3
|
require 'keystone'
|
3
4
|
require "optparse"
|
4
5
|
|
5
|
-
include Keystone::Batch::Base
|
6
6
|
|
7
|
-
|
7
|
+
class SampleBatch
|
8
|
+
include Keystone::Batch::Base
|
9
|
+
logger_name :l
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
# 実行時に--helpでオプション一覧
|
12
|
+
def main
|
13
|
+
has_option = {}
|
14
|
+
opts = option_parser
|
15
|
+
opts.on("-v value") do |v|
|
16
|
+
has_option[:v] = v
|
17
|
+
end
|
18
|
+
opts.on("-w who") do |v|
|
19
|
+
has_option[:w] = v
|
20
|
+
end
|
21
|
+
|
22
|
+
execute() do
|
23
|
+
begin
|
24
|
+
sleep 10
|
25
|
+
l.info "batch process01"
|
26
|
+
l.info "who=#{has_option[:w]}"
|
27
|
+
sleep 4
|
28
|
+
rescue => e
|
29
|
+
l.error e
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
16
33
|
end
|
17
34
|
|
18
|
-
|
19
|
-
|
20
|
-
info "batch process01"
|
21
|
-
info "who=#{has_option[:w]}"
|
22
|
-
sleep 4
|
23
|
-
raise 'error occur'
|
24
|
-
end
|
35
|
+
batch = SapmleBatch.new
|
36
|
+
batch.main
|
data/example/os.rb
CHANGED
data/example/sendmail.rb
CHANGED
data/example/string_util.rb
CHANGED
data/lib/keystone.rb
CHANGED
@@ -1,5 +1,10 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
|
2
|
-
|
3
|
+
#$KCODE = 'u'
|
4
|
+
|
5
|
+
|
6
|
+
# version check
|
7
|
+
raise 'this version only for 1.9.2' unless RUBY_VERSION == '1.9.2'
|
3
8
|
|
4
9
|
require 'keystone/core_ext'
|
5
10
|
require 'keystone/base'
|
@@ -11,7 +16,7 @@ autoload :Moji , 'vendor/moji'
|
|
11
16
|
|
12
17
|
module Keystone
|
13
18
|
|
14
|
-
VERSION = '0.0.
|
19
|
+
VERSION = '0.0.30'
|
15
20
|
|
16
21
|
autoload :StringUtil , 'keystone/string_util'
|
17
22
|
autoload :Batch , 'keystone/batch'
|
data/lib/keystone/base.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
module Keystone
|
2
|
-
|
3
3
|
#
|
4
4
|
# ログレベルに関してのローカルルール(ログ確認に関して)
|
5
5
|
# debug 対応不要
|
@@ -11,64 +11,86 @@ module Keystone
|
|
11
11
|
# critical 1つで即時対応
|
12
12
|
#
|
13
13
|
module Base
|
14
|
-
def
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
def self.included(base)
|
15
|
+
def __logger
|
16
|
+
Keystone::Base::Logger.instance
|
17
|
+
end
|
18
|
+
|
19
|
+
base.class_eval do
|
20
|
+
def self.logger_name(name)
|
21
|
+
if self.respond_to?(name)
|
22
|
+
raise "name #{name} can not set!!"
|
23
|
+
end
|
24
|
+
define_method(name, instance_method(:__logger))
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class Logger
|
30
|
+
def self.instance
|
31
|
+
@@looger_instance ||= Keystone::Base::Logger.new
|
32
|
+
return @@looger_instance
|
33
|
+
end
|
19
34
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
35
|
+
def _log(log_type,message, is_base_info = true)
|
36
|
+
|
37
|
+
# ......nangiyana
|
38
|
+
message.gsub!(/\r\n/,"\n")
|
39
|
+
message.gsub!(/\r/,"\n")
|
40
|
+
|
41
|
+
messages = message.split("\n")
|
42
|
+
if messages.size > 1
|
43
|
+
messages.each_with_index do |st,i|
|
44
|
+
if i == 0
|
45
|
+
puts "[#{Time.now.strftime("%Y/%m/%d %H:%M:%S")}][#{$$}][#{log_type.to_s}] #{st}"
|
46
|
+
else
|
47
|
+
puts "[#{log_type.to_s}] #{st}"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
else
|
51
|
+
if is_base_info
|
52
|
+
puts "[#{Time.now.strftime("%Y/%m/%d %H:%M:%S")}][#{$$}][#{log_type.to_s}] #{message}"
|
25
53
|
else
|
26
|
-
puts "[#{log_type.to_s}] #{
|
54
|
+
puts "[#{log_type.to_s}] #{message}"
|
27
55
|
end
|
28
56
|
end
|
29
|
-
|
30
|
-
|
31
|
-
|
57
|
+
end
|
58
|
+
|
59
|
+
def error(message)
|
60
|
+
if message.is_a? Exception
|
61
|
+
_log(:ERROR,"#{message.message}")
|
62
|
+
message.backtrace.each_with_index {|line, i|
|
63
|
+
_log(:ERROR,"#{line})",false)
|
64
|
+
}
|
32
65
|
else
|
33
|
-
|
66
|
+
_log(:ERROR,message.to_s)
|
34
67
|
end
|
35
68
|
end
|
36
|
-
end
|
37
69
|
|
38
|
-
|
39
|
-
|
40
|
-
log(:ERROR,"#{message.message}")
|
41
|
-
message.backtrace.each_with_index {|line, i|
|
42
|
-
log(:ERROR,"#{line})",false)
|
43
|
-
}
|
44
|
-
else
|
45
|
-
log(:ERROR,message.to_s)
|
70
|
+
def info(message)
|
71
|
+
_log(:INFO,message)
|
46
72
|
end
|
47
|
-
end
|
48
73
|
|
49
|
-
|
50
|
-
|
51
|
-
|
74
|
+
def warn(message)
|
75
|
+
_log(:WARN,message)
|
76
|
+
end
|
52
77
|
|
53
|
-
|
54
|
-
|
55
|
-
|
78
|
+
def notice(message)
|
79
|
+
_log(:NOTICE,message)
|
80
|
+
end
|
56
81
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
def alert(message)
|
62
|
-
log(:ALERT,message)
|
63
|
-
end
|
82
|
+
def alert(message)
|
83
|
+
_log(:ALERT,message)
|
84
|
+
end
|
64
85
|
|
65
|
-
|
66
|
-
|
67
|
-
|
86
|
+
def critical(message)
|
87
|
+
_log(:CRIT,message)
|
88
|
+
end
|
68
89
|
|
69
|
-
|
70
|
-
|
71
|
-
|
90
|
+
def debug(message)
|
91
|
+
if $DEBUG
|
92
|
+
_log(:DEBUG,message)
|
93
|
+
end
|
72
94
|
end
|
73
95
|
end
|
74
96
|
end
|
data/lib/keystone/batch.rb
CHANGED
data/lib/keystone/batch/base.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
require 'digest/md5'
|
2
3
|
require "optparse"
|
3
4
|
|
@@ -77,7 +78,7 @@ module Keystone::Batch
|
|
77
78
|
|
78
79
|
if Module.constants.include?("ARGV_ORIGINAL")
|
79
80
|
|
80
|
-
debug "ARGV_ORIGINAL found!!"
|
81
|
+
Keystone::Base::Logger.instance.debug "ARGV_ORIGINAL found!!"
|
81
82
|
|
82
83
|
ARGV << "-h" if ARGV_ORIGINAL.include?("-h")
|
83
84
|
ARGV << "--help" if ARGV_ORIGINAL.include?("--help")
|
@@ -85,13 +86,13 @@ module Keystone::Batch
|
|
85
86
|
pg_path = File.expand_path(script_name)
|
86
87
|
opts.banner = "Usage: script/runner #{script_name} [options]"
|
87
88
|
|
88
|
-
debug "pg_path=#{pg_path}"
|
89
|
+
Keystone::Base::Logger.instance.debug "pg_path=#{pg_path}"
|
89
90
|
opts.on("-e", "--environment=name",
|
90
91
|
String,"specifies the environment for the runner to operate under (test/development/production).",
|
91
92
|
"default: development")
|
92
93
|
else
|
93
|
-
debug "caller=#{caller}"
|
94
|
-
pg_path = if File.expand_path(caller[0]) =~ /(.*):\d
|
94
|
+
Keystone::Base::Logger.instance.debug "caller=#{caller}"
|
95
|
+
pg_path = if File.expand_path(caller[0]) =~ /(.*):\d*:in `.*?'\z/
|
95
96
|
$1
|
96
97
|
else
|
97
98
|
raise "must not happen!! can not get caller value"
|
@@ -133,7 +134,7 @@ module Keystone::Batch
|
|
133
134
|
|
134
135
|
opts.parse!(ARGV)
|
135
136
|
|
136
|
-
info "start script(#{pg_path})"
|
137
|
+
Keystone::Base::Logger.instance.info "start script(#{pg_path})"
|
137
138
|
script_started_at = Time.now
|
138
139
|
double_process_check_worked = false
|
139
140
|
begin
|
@@ -143,17 +144,17 @@ module Keystone::Batch
|
|
143
144
|
pg_name = File.basename(pg_path)
|
144
145
|
hash = Digest::MD5.hexdigest(pg_path)
|
145
146
|
pid_file = "/tmp/.#{pg_name}.#{hash}.pid" unless pid_file
|
146
|
-
debug pid_file
|
147
|
+
Keystone::Base::Logger.instance.debug pid_file
|
147
148
|
if File.exists?(pid_file)
|
148
149
|
pid = File.open(pid_file).read.chomp
|
149
150
|
pid_list = `ps ax | awk '{print $1}'`
|
150
151
|
if (pid != nil && pid != "" ) && pid_list =~ /#{pid}/
|
151
|
-
warn "pid:#{pid} still running"
|
152
|
+
Keystone::Base::Logger.instance.warn "pid:#{pid} still running"
|
152
153
|
double_process_check_worked = true
|
153
154
|
return nil
|
154
155
|
else
|
155
156
|
if auto_recover
|
156
|
-
warn "lock file still exists[pid=#{pid}],but process does not found.auto_recover enabled.so process continues"
|
157
|
+
Keystone::Base::Logger.instance.warn "lock file still exists[pid=#{pid}],but process does not found.auto_recover enabled.so process continues"
|
157
158
|
else
|
158
159
|
double_process_check_worked = true
|
159
160
|
raise "lock file still exists[pid=#{pid}],but process does not found.auto_recover disabled.so process can not continue"
|
@@ -166,13 +167,13 @@ module Keystone::Batch
|
|
166
167
|
end
|
167
168
|
return (yield process)
|
168
169
|
rescue => e
|
169
|
-
error e
|
170
|
+
Keystone::Base::Logger.instance.error e
|
170
171
|
send_error_mail(e,options)
|
171
172
|
ensure
|
172
173
|
unless double_process_check_worked
|
173
174
|
File.delete(pid_file) if double_process_check
|
174
175
|
end
|
175
|
-
info "finish script (%1.3fsec)" % (Time.now - script_started_at)
|
176
|
+
Keystone::Base::Logger.instance.info "finish script (%1.3fsec)" % (Time.now - script_started_at)
|
176
177
|
end
|
177
178
|
end
|
178
179
|
|
@@ -187,7 +188,7 @@ module Keystone::Batch
|
|
187
188
|
def send_error_mail(exception,options)
|
188
189
|
if options[:error_mail_to]
|
189
190
|
host = Keystone::Os.get()
|
190
|
-
title = %|error
|
191
|
+
title = %|[error][#{host.hostname}][#{exception.message}]|
|
191
192
|
|
192
193
|
mail_to = options[:error_mail_to]
|
193
194
|
mail_to = [mail_to] if mail_to.is_a?(String)
|
@@ -195,12 +196,14 @@ module Keystone::Batch
|
|
195
196
|
smtp_addr = options[:error_mail_smtp_addr]
|
196
197
|
smtp_port = options[:error_mail_smtp_port]
|
197
198
|
|
198
|
-
debug "mail_to=#{mail_to}"
|
199
|
-
debug "mail_from=#{mail_from}"
|
200
|
-
debug "smtp_addr=#{smtp_addr}"
|
201
|
-
debug "smtp_port=#{smtp_port}"
|
199
|
+
Keystone::Base::Logger.instance.debug "mail_to=#{mail_to}"
|
200
|
+
Keystone::Base::Logger.instance.debug "mail_from=#{mail_from}"
|
201
|
+
Keystone::Base::Logger.instance.debug "smtp_addr=#{smtp_addr}"
|
202
|
+
Keystone::Base::Logger.instance.debug "smtp_port=#{smtp_port}"
|
202
203
|
|
203
204
|
body = <<-BODY
|
205
|
+
==== pg ====
|
206
|
+
#{File.expand_path($0)}
|
204
207
|
==== error message ====
|
205
208
|
#{exception.message}
|
206
209
|
====== backtrace ======
|
@@ -208,9 +211,9 @@ module Keystone::Batch
|
|
208
211
|
===== environment =====
|
209
212
|
#{host.dump}
|
210
213
|
BODY
|
211
|
-
Keystone::Mail::Send.
|
214
|
+
Keystone::Mail::Send.sendmail(mail_from,mail_to,title,body,smtp_addr,smtp_port)
|
212
215
|
else
|
213
|
-
|
216
|
+
Keystone::Base::Logger.instance.info "ERROR_MAIL_TO not defined.if you want error mail automatically,set this value(check execute() method option)."
|
214
217
|
end
|
215
218
|
end
|
216
219
|
end
|
data/lib/keystone/core_ext.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
class Object
|
2
3
|
# http://www.yohasebe.com/pages/trans-seeing-metaclasses-clearly/
|
3
4
|
def metaclass
|
@@ -23,11 +24,11 @@ class Object
|
|
23
24
|
|
24
25
|
# 1.8.7 エミュレート
|
25
26
|
# TODO version 指定
|
26
|
-
def tap
|
27
|
-
|
28
|
-
|
29
|
-
end
|
30
|
-
|
27
|
+
# def tap
|
28
|
+
# yield(self)
|
29
|
+
# self
|
30
|
+
# end
|
31
|
+
#
|
31
32
|
def tapp
|
32
33
|
self.tap{|obj| p obj}
|
33
34
|
end
|
data/lib/keystone/mail.rb
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
# 基本的に使わないでーーーー 1.9 対応適当にしただけだから
|
4
|
+
|
1
5
|
module Keystone::Mail
|
2
|
-
autoload :Message, 'keystone/mail/message'
|
3
|
-
autoload :MessageIso2022jp, 'keystone/mail/message_iso2022jp'
|
4
|
-
autoload :MessageSjis, 'keystone/mail/message_sjis'
|
5
|
-
autoload :Receive, 'keystone/mail/receive'
|
6
|
-
autoload :MessageFactory, 'keystone/mail/message_factory'
|
6
|
+
# autoload :Message, 'keystone/mail/message'
|
7
|
+
# autoload :MessageIso2022jp, 'keystone/mail/message_iso2022jp'
|
8
|
+
# autoload :MessageSjis, 'keystone/mail/message_sjis'
|
9
|
+
# autoload :Receive, 'keystone/mail/receive'
|
10
|
+
# autoload :MessageFactory, 'keystone/mail/message_factory'
|
7
11
|
autoload :Send, 'keystone/mail/send'
|
8
12
|
end
|
data/lib/keystone/mail/send.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
require 'net/smtp'
|
3
|
+
require "nkf"
|
2
4
|
|
3
5
|
if __FILE__ ==$0
|
4
6
|
$: << '../..'
|
@@ -8,76 +10,26 @@ end
|
|
8
10
|
module Keystone
|
9
11
|
module Mail
|
10
12
|
class Send
|
11
|
-
|
13
|
+
def self.sendmail(from, to, subject, body, host = "localhost", port = 25)
|
14
|
+
body = <<EOT
|
15
|
+
From: #{from}
|
16
|
+
To: #{to.to_a.join(",\n ")}
|
17
|
+
Subject: #{NKF.nkf("-WMm0j", subject)}
|
18
|
+
Date: #{Time::now.strftime("%a, %d %b %Y %X %z")}
|
19
|
+
Mime-Version: 1.0
|
20
|
+
Content-Type: text/plain; charset=ISO-2022-JP
|
21
|
+
Content-Transfer-Encoding: 7bit
|
12
22
|
|
13
|
-
|
14
|
-
|
15
|
-
# class Send
|
16
|
-
def initialize(message=nil,opt={})
|
17
|
-
@smtp_addr, @smtp_port, @retry_cnt = "127.0.0.1", 25, 0
|
18
|
-
@message = message
|
19
|
-
@message = Keystone::Mail::MessageFactory.create(opt) if @message == nil
|
20
|
-
debug "@message=#{@message}"
|
21
|
-
set_option(opt)
|
22
|
-
end
|
23
|
+
#{body}
|
24
|
+
EOT
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
# :smtp_port
|
29
|
-
# :retry
|
30
|
-
# :mail_from_text
|
31
|
-
# :encoding
|
32
|
-
#
|
33
|
-
def self.send(from, to, subject, body, opt={})
|
34
|
-
queue = self.new(nil,opt)
|
35
|
-
queue.message.mail_to = to
|
36
|
-
queue.message.mail_from = from
|
37
|
-
queue.message.subject = subject
|
38
|
-
queue.message.body = body
|
39
|
-
queue.send
|
40
|
-
end
|
41
|
-
|
42
|
-
def send
|
43
|
-
src = @message.to_src
|
44
|
-
debug src
|
45
|
-
try_cnt = 0
|
46
|
-
begin
|
47
|
-
m = Net::SMTPSession.new(@smtp_addr, @smtp_port)
|
48
|
-
m.start()
|
49
|
-
m.sendmail(src ,@message.mail_from ,@message.mail_to)
|
50
|
-
m.finish
|
51
|
-
rescue => e
|
52
|
-
debug "try_cnt:#{try_cnt}"
|
53
|
-
try_cnt += 1
|
54
|
-
sleep 1
|
55
|
-
retry if @retry_cnt >= try_cnt
|
56
|
-
raise e
|
26
|
+
body = NKF.nkf("-Wj", body).force_encoding("ASCII-8BIT")
|
27
|
+
|
28
|
+
Net::SMTP.start(host, port) do |smtp|
|
29
|
+
smtp.send_mail body, from, to
|
57
30
|
end
|
58
31
|
end
|
59
|
-
|
60
|
-
def set_option(opt)
|
61
|
-
@smtp_addr = opt[:smtp_addr] if opt.key?(:smtp_addr)
|
62
|
-
@smtp_port = opt[:smtp_port] if opt.key?(:smtp_port)
|
63
|
-
@retry_cnt = Integer(opt[:retry_cnt]) if opt.key?(:retry_cnt)
|
64
|
-
end
|
65
32
|
end
|
66
33
|
end
|
67
34
|
end
|
68
35
|
|
69
|
-
if __FILE__ ==$0
|
70
|
-
require 'rubygems'
|
71
|
-
require 'pit'
|
72
|
-
|
73
|
-
config = Pit.get("keystone_test")
|
74
|
-
|
75
|
-
Keystone::Mail::Send.send(
|
76
|
-
config["mailfrom01"],
|
77
|
-
config["mailto01"],
|
78
|
-
"件名かんさいーーーーでんきほーーーあんky−−−かいいい−−かいいい−−かいいいいいいいい終わり",
|
79
|
-
"body日本語",
|
80
|
-
{:mail_from_text=>"メール送信者名ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー終わり",:retry_cnt=>3,:encoding=>:sjis}
|
81
|
-
)
|
82
|
-
end
|
83
|
-
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
require 'net/smtp'
|
2
3
|
|
3
4
|
if __FILE__ ==$0
|
@@ -42,18 +43,18 @@ module Keystone
|
|
42
43
|
#"=?UTF-8?B?44Gq44GM44O844O844O844O844O844O844O844O844O8?==?UTF-8?B?44O844O844O844O844O844O844O844O844O844O844O8?==?UTF-8?B?44O844O844O844O844O844O844O844O844O844O844O8?==?UTF-8?B?44O844O844O844O844O844O844O844O844O844O844O8?==?UTF-8?B?44O844O844O844O844O844O844O844O844O844O844O8?==?UTF-8?B?44O844O844O844O844O844GE44GC44Gm5YWI?=
|
43
44
|
|
44
45
|
name,address = ""
|
45
|
-
|
46
|
+
Keystone::Base::Logger.instance.debug "line=#{line}"
|
46
47
|
|
47
48
|
if /"(.*)"\s*<(.*)>/ =~ line
|
48
49
|
# umaku dekinkatta
|
49
50
|
name = $1.strip
|
50
51
|
address = $2.strip
|
51
|
-
|
52
|
+
Keystone::Base::Logger.instance.debug "name=|#{name}|"
|
52
53
|
elsif /(.*)\s*<(.*)>/ =~ line
|
53
54
|
name = $1.strip
|
54
55
|
address = $2.strip
|
55
|
-
|
56
|
-
|
56
|
+
Keystone::Base::Logger.instance.debug "name=|#{name}|"
|
57
|
+
Keystone::Base::Logger.instance.debug "address=|#{address}|"
|
57
58
|
else
|
58
59
|
address = line.strip
|
59
60
|
end
|
@@ -61,17 +62,17 @@ module Keystone
|
|
61
62
|
# if /^=\?ISO-2022-JP.*/i =~ name ||
|
62
63
|
# if /^=\?UTF-8/i =~ name
|
63
64
|
if /^(?:(=\?ISO-2022-JP\?B\?)|(=\?UTF-8\?B\?))/i =~ name
|
64
|
-
|
65
|
+
Keystone::Base::Logger.instance.debug "hit!!"
|
65
66
|
begin
|
66
|
-
|
67
|
+
Keystone::Base::Logger.instance.debug "hit #{$1}"
|
67
68
|
name = KmMailAddress::convert(name)
|
68
69
|
rescue => e
|
69
|
-
|
70
|
+
Keystone::Base::Logger.instance.warn e.to_s
|
70
71
|
end
|
71
72
|
end
|
72
73
|
|
73
|
-
|
74
|
-
|
74
|
+
Keystone::Base::Logger.instance.debug "name_end=|#{name}|"
|
75
|
+
Keystone::Base::Logger.instance.debug "address_end=|#{address}|"
|
75
76
|
return address,name
|
76
77
|
end
|
77
78
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
require 'kconv'
|
2
3
|
|
3
4
|
module Keystone
|
@@ -20,7 +21,9 @@ module Keystone
|
|
20
21
|
header += create_mailto_header
|
21
22
|
header += create_subject_header
|
22
23
|
header += "\n"
|
23
|
-
|
24
|
+
e_body = encode_body
|
25
|
+
header = header.encode(encode_body.encoding)
|
26
|
+
header += e_body
|
24
27
|
return header
|
25
28
|
end
|
26
29
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
require 'net/smtp'
|
2
3
|
require 'kconv'
|
3
4
|
require 'tempfile'
|
@@ -72,18 +73,18 @@ module Keystone
|
|
72
73
|
if line == "--#{@content_type.boundary}"
|
73
74
|
set_parse_finish_messages
|
74
75
|
@messages.push(KmMessage.new(@depth + 1))
|
75
|
-
debug "new multipart start"
|
76
|
+
Keystone::Base::Logger.instance.debug "new multipart start"
|
76
77
|
return true
|
77
78
|
end
|
78
79
|
if line == "--#{@content_type.boundary}--"
|
79
80
|
set_parse_finish_messages
|
80
81
|
@is_finish_parsing = true
|
81
|
-
debug "multipart end"
|
82
|
+
Keystone::Base::Logger.instance.debug "multipart end"
|
82
83
|
if @file_handle != nil
|
83
84
|
begin
|
84
85
|
@file_stream.close
|
85
86
|
rescue => e
|
86
|
-
error e
|
87
|
+
Keystone::Base::Logger.instance.error e
|
87
88
|
end
|
88
89
|
end
|
89
90
|
return true
|
@@ -101,17 +102,17 @@ module Keystone
|
|
101
102
|
|
102
103
|
def set_special_attrs
|
103
104
|
# do not create file for top node KmMessage
|
104
|
-
debug "depth=#{@depth}"
|
105
|
+
Keystone::Base::Logger.instance.debug "depth=#{@depth}"
|
105
106
|
if @depth != 1
|
106
107
|
if @content_type.content_type != :multipart_mixed && @content_type.content_type != :multipart_related && @content_type.content_type != :multipart_alternative
|
107
108
|
if $is_save_file
|
108
|
-
debug "!!!!!!!! create file handle [content_type=#{@content_type.content_type}]"
|
109
|
+
Keystone::Base::Logger.instance.debug "!!!!!!!! create file handle [content_type=#{@content_type.content_type}]"
|
109
110
|
$save_folder ||= "/tmp"
|
110
111
|
tmp_file = Tempfile.new("KmReceiveMail",$save_folder)
|
111
112
|
@file_path = tmp_file.path
|
112
113
|
@file_handle =tmp_file
|
113
114
|
@file_stream =tmp_file.open
|
114
|
-
debug "@file_path=#{@file_path}"
|
115
|
+
Keystone::Base::Logger.instance.debug "@file_path=#{@file_path}"
|
115
116
|
end
|
116
117
|
end
|
117
118
|
end
|
@@ -126,13 +127,13 @@ module Keystone
|
|
126
127
|
header["from"] = KmMailAddress::get_addresses(header["from"])[0] if header["from"] != nil
|
127
128
|
|
128
129
|
if @header["content-type"] != nil
|
129
|
-
debug "reshape_header set content-type"
|
130
|
+
Keystone::Base::Logger.instance.debug "reshape_header set content-type"
|
130
131
|
@content_type = KmContentType.new(@header["content-type"])
|
131
|
-
debug "@content_type=#{@content_type.inspect}"
|
132
|
-
debug "get file"
|
132
|
+
Keystone::Base::Logger.instance.debug "@content_type=#{@content_type.inspect}"
|
133
|
+
Keystone::Base::Logger.instance.debug "get file"
|
133
134
|
else
|
134
|
-
warn "content-type not fond"
|
135
|
-
warn @header.inspect
|
135
|
+
Keystone::Base::Logger.instance.warn "content-type not fond"
|
136
|
+
Keystone::Base::Logger.instance.warn @header.inspect
|
136
137
|
end
|
137
138
|
if @header["content-transfer-encoding"] != nil
|
138
139
|
if /base64/i =~ @header["content-transfer-encoding"]
|
@@ -146,7 +147,7 @@ module Keystone
|
|
146
147
|
elsif /quoted\-printable/i =~ @header["content-transfer-encoding"]
|
147
148
|
@content_transfer_encoding = :quoted_printable
|
148
149
|
else
|
149
|
-
error "transfer encoding not supported [#{@header["content-transfer-encoding"]}]"
|
150
|
+
Keystone::Base::Logger.instance.error "transfer encoding not supported [#{@header["content-transfer-encoding"]}]"
|
150
151
|
end
|
151
152
|
end
|
152
153
|
end
|
@@ -156,7 +157,7 @@ module Keystone
|
|
156
157
|
end
|
157
158
|
|
158
159
|
def set_header(key,val)
|
159
|
-
debug "key[#{key}],val[#{val}]"
|
160
|
+
Keystone::Base::Logger.instance.debug "key[#{key}],val[#{val}]"
|
160
161
|
|
161
162
|
key = key.downcase
|
162
163
|
@header[key] ||= ""
|
@@ -172,7 +173,7 @@ module Keystone
|
|
172
173
|
|
173
174
|
def parse_and_set_header(line)
|
174
175
|
if /^\s/ =~ line
|
175
|
-
debug "multi header:#{@last_header}"
|
176
|
+
Keystone::Base::Logger.instance.debug "multi header:#{@last_header}"
|
176
177
|
set_header(@last_header,line.strip)
|
177
178
|
else
|
178
179
|
|
@@ -182,7 +183,7 @@ module Keystone
|
|
182
183
|
@last_header = $1
|
183
184
|
set_header($1,$2)
|
184
185
|
else
|
185
|
-
error "error parse header!! [#{line}]"
|
186
|
+
Keystone::Base::Logger.instance.error "error parse header!! [#{line}]"
|
186
187
|
end
|
187
188
|
end
|
188
189
|
end
|
@@ -202,11 +203,11 @@ module Keystone
|
|
202
203
|
@body += cline
|
203
204
|
@file_stream.write(cline) if @file_handle != nil
|
204
205
|
elsif @content_transfer_encoding == :base64
|
205
|
-
debug "content_type=#{@content_type.content_type.to_s}"
|
206
|
-
debug "boundary=#{@content_type.boundary}"
|
207
|
-
debug "size=#{@file_handle.size}"
|
208
|
-
debug "file_path=#{@file_path}"
|
209
|
-
debug "!!!!!!!!!writing[#{line}]"
|
206
|
+
Keystone::Base::Logger.instance.debug "content_type=#{@content_type.content_type.to_s}"
|
207
|
+
Keystone::Base::Logger.instance.debug "boundary=#{@content_type.boundary}"
|
208
|
+
Keystone::Base::Logger.instance.debug "size=#{@file_handle.size}"
|
209
|
+
Keystone::Base::Logger.instance.debug "file_path=#{@file_path}"
|
210
|
+
Keystone::Base::Logger.instance.debug "!!!!!!!!!writing[#{line}]"
|
210
211
|
@file_stream.write(Base64::decode64(line)) if @file_handle != nil
|
211
212
|
end
|
212
213
|
return true
|
@@ -300,16 +301,16 @@ module Keystone
|
|
300
301
|
|
301
302
|
def dump
|
302
303
|
dump_inner(@message)
|
303
|
-
info "=========== body =============="
|
304
|
-
info(@message.body)
|
304
|
+
Keystone::Base::Logger.instance.info "=========== body =============="
|
305
|
+
Keystone::Base::Logger.instance.info(@message.body)
|
305
306
|
end
|
306
307
|
|
307
308
|
def dump_inner(message)
|
308
|
-
info(("-" * message.depth) + "content-type=" + message.content_type.content_type.to_s)
|
309
|
-
info(("-" * message.depth) + "boundary=" + message.content_type.boundary.to_s) if message.content_type.boundary != nil
|
310
|
-
info(("-" * message.depth) + "file_path=" + message.file_path) if message.file_path != nil
|
311
|
-
info(("-" * message.depth) + "content_transfer_encoding=" + message.content_transfer_encoding.to_s) if message.content_transfer_encoding != nil
|
312
|
-
info(("-" * message.depth) + "header=" + message.header.inspect)
|
309
|
+
Keystone::Base::Logger.instance.info(("-" * message.depth) + "content-type=" + message.content_type.content_type.to_s)
|
310
|
+
Keystone::Base::Logger.instance.info(("-" * message.depth) + "boundary=" + message.content_type.boundary.to_s) if message.content_type.boundary != nil
|
311
|
+
Keystone::Base::Logger.instance.info(("-" * message.depth) + "file_path=" + message.file_path) if message.file_path != nil
|
312
|
+
Keystone::Base::Logger.instance.info(("-" * message.depth) + "content_transfer_encoding=" + message.content_transfer_encoding.to_s) if message.content_transfer_encoding != nil
|
313
|
+
Keystone::Base::Logger.instance.info(("-" * message.depth) + "header=" + message.header.inspect)
|
313
314
|
message.messages.each{|m|
|
314
315
|
dump_inner(m)
|
315
316
|
}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'net/smtp'
|
3
|
+
|
4
|
+
if __FILE__ ==$0
|
5
|
+
$: << '../..'
|
6
|
+
require 'keystone'
|
7
|
+
end
|
8
|
+
|
9
|
+
module Keystone
|
10
|
+
module Mail
|
11
|
+
class Send
|
12
|
+
attr_accessor :message, :smtp_addr, :smtp_port, :retry_cnt
|
13
|
+
|
14
|
+
#
|
15
|
+
# 普通なことをしたいならTMailを使いましょう
|
16
|
+
# class Send
|
17
|
+
def initialize(message=nil,opt={})
|
18
|
+
@smtp_addr, @smtp_port, @retry_cnt = "127.0.0.1", 25, 0
|
19
|
+
@message = message
|
20
|
+
@message = Keystone::Mail::MessageFactory.create(opt) if @message == nil
|
21
|
+
Keystone::Base::Logger.instance.debug "@message=#{@message}"
|
22
|
+
set_option(opt)
|
23
|
+
end
|
24
|
+
|
25
|
+
#
|
26
|
+
# from could be String or Array
|
27
|
+
# opt
|
28
|
+
# :smtp_addr
|
29
|
+
# :smtp_port
|
30
|
+
# :retry
|
31
|
+
# :mail_from_text
|
32
|
+
# :encoding
|
33
|
+
#
|
34
|
+
def self.send(from, to, subject, body, opt={})
|
35
|
+
queue = self.new(nil,opt)
|
36
|
+
queue.message.mail_to = to
|
37
|
+
queue.message.mail_from = from
|
38
|
+
queue.message.subject = subject
|
39
|
+
queue.message.body = body
|
40
|
+
queue.send
|
41
|
+
end
|
42
|
+
|
43
|
+
def send
|
44
|
+
src = @message.to_src
|
45
|
+
Keystone::Base::Logger.instance.debug src.encoding
|
46
|
+
Keystone::Base::Logger.instance.debug src
|
47
|
+
try_cnt = 0
|
48
|
+
begin
|
49
|
+
m = Net::SMTPSession.new(@smtp_addr, @smtp_port)
|
50
|
+
m.start()
|
51
|
+
mail_to = []
|
52
|
+
@message.mail_to.each{|m_to|mail_to << m_to.encode("US-ASCII")}
|
53
|
+
mail_from = @message.mail_from.encode("US-ASCII")
|
54
|
+
|
55
|
+
m.sendmail(src ,mail_from ,mail_to)
|
56
|
+
m.finish
|
57
|
+
rescue => e
|
58
|
+
Keystone::Base::Logger.instance.debug "try_cnt:#{try_cnt}"
|
59
|
+
try_cnt += 1
|
60
|
+
sleep 1
|
61
|
+
retry if @retry_cnt >= try_cnt
|
62
|
+
raise e
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def set_option(opt)
|
67
|
+
@smtp_addr = opt[:smtp_addr] if opt.key?(:smtp_addr)
|
68
|
+
@smtp_port = opt[:smtp_port] if opt.key?(:smtp_port)
|
69
|
+
@retry_cnt = Integer(opt[:retry_cnt]) if opt.key?(:retry_cnt)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
if __FILE__ ==$0
|
76
|
+
require 'rubygems'
|
77
|
+
require 'pit'
|
78
|
+
|
79
|
+
config = Pit.get("keystone_test")
|
80
|
+
|
81
|
+
Keystone::Mail::Send.send(
|
82
|
+
config["mailfrom01"],
|
83
|
+
config["mailto01"],
|
84
|
+
"件名かんさいーーーーでんきほーーーあんky−−−かいいい−−かいいい−−かいいいいいいいい終わり",
|
85
|
+
"body日本語",
|
86
|
+
{:mail_from_text=>"メール送信者名ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー終わり",:retry_cnt=>3,:encoding=>:sjis}
|
87
|
+
)
|
88
|
+
end
|
89
|
+
|
data/lib/keystone/os.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
module Keystone
|
2
3
|
module Os
|
3
4
|
class AbstractOs
|
@@ -21,12 +22,15 @@ module Keystone
|
|
21
22
|
|
22
23
|
def dump
|
23
24
|
self_methods = self.methods - Class.methods
|
24
|
-
self_methods.delete(
|
25
|
-
self_methods.delete(
|
26
|
-
self_methods.delete(
|
25
|
+
self_methods.delete(:version=)
|
26
|
+
self_methods.delete(:dump)
|
27
|
+
self_methods.delete(:bin_or_usrbin)
|
28
|
+
|
29
|
+
Keystone::Base::Logger.instance.debug self_methods
|
30
|
+
|
27
31
|
st = ""
|
28
32
|
self_methods.each do |method|
|
29
|
-
p method
|
33
|
+
#p method
|
30
34
|
st << "== #{method} ==\n #{self.__send__(method).to_s.split("\n").join("\n ")}\n"
|
31
35
|
end
|
32
36
|
return st
|
data/lib/keystone/os/centos.rb
CHANGED
data/lib/keystone/os/darwin.rb
CHANGED
data/lib/keystone/os/linux.rb
CHANGED
data/lib/keystone/os/osx.rb
CHANGED
data/lib/keystone/os/unix.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
module Keystone
|
2
3
|
module Os
|
3
4
|
class Unix < AbstractOs
|
@@ -16,9 +17,9 @@ module Keystone
|
|
16
17
|
|
17
18
|
def bin_or_usrbin(cmd,option="")
|
18
19
|
cmd_option = "#{cmd} #{option}"
|
19
|
-
begin;return `/bin/#{cmd_option}
|
20
|
-
begin;return `/usr/bin/#{cmd_option}
|
21
|
-
begin;return `/sbin/#{cmd_option}
|
20
|
+
begin;return `/bin/#{cmd_option}`.chomp if File.exists?("/bin/#{cmd}");rescue;end
|
21
|
+
begin;return `/usr/bin/#{cmd_option}`.chomp if File.exists?("/usr/bin/#{cmd}");rescue;end
|
22
|
+
begin;return `/sbin/#{cmd_option}`.chomp if File.exists?("/sbin/#{cmd}");rescue;end
|
22
23
|
begin;return `/usr/sbin/#{cmd_option}`.chomp;rescue;end
|
23
24
|
end
|
24
25
|
|
data/lib/keystone/string_util.rb
CHANGED
data/test_local/batch.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
$LOAD_PATH << "../lib/"
|
4
|
+
|
5
|
+
require 'keystone'
|
6
|
+
require "optparse"
|
7
|
+
require 'pit'
|
8
|
+
|
9
|
+
|
10
|
+
ENV["EDITOR"] = "vi" unless ENV.key?("EDITOR")
|
11
|
+
|
12
|
+
class Batch
|
13
|
+
include Keystone::Batch::Base
|
14
|
+
logger_name :l
|
15
|
+
|
16
|
+
# 実行時に--helpでオプション一覧
|
17
|
+
def main
|
18
|
+
has_option = {}
|
19
|
+
opts = option_parser
|
20
|
+
opts.on("-v value") do |v|
|
21
|
+
has_option[:v] = v
|
22
|
+
end
|
23
|
+
opts.on("-w who") do |v|
|
24
|
+
has_option[:w] = v
|
25
|
+
end
|
26
|
+
|
27
|
+
config = Pit.get("keystone_test", :require => {
|
28
|
+
"smtp_addr" => "smtp_server_address",
|
29
|
+
"mailto" => "mailto",
|
30
|
+
"mailfrom" => "mailfrom"
|
31
|
+
})
|
32
|
+
|
33
|
+
execute(:error_mail_to=>config["mailto"]) do
|
34
|
+
# begin
|
35
|
+
l.info "batch process01"
|
36
|
+
l.info "who=#{has_option[:w]}"
|
37
|
+
l.warn "this is warning"
|
38
|
+
raise "error occured manually エラーが発生しましたがなにか????"
|
39
|
+
# rescue => e
|
40
|
+
# l.error e
|
41
|
+
# end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
b = Batch.new
|
47
|
+
b.main
|
data/util/bin/disk_size_check.rb
CHANGED
data/util/bin/ve2tar.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keystone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 37
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
8
|
+
- 30
|
9
|
+
version: 0.0.30
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- paco
|
@@ -15,7 +14,7 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2010-
|
17
|
+
date: 2010-11-04 00:00:00 +09:00
|
19
18
|
default_executable:
|
20
19
|
dependencies: []
|
21
20
|
|
@@ -172,14 +171,15 @@ files:
|
|
172
171
|
- lib/keystone/core_ext/tempfile.rb
|
173
172
|
- lib/keystone/core_ext/uri.rb
|
174
173
|
- lib/keystone/mail.rb
|
175
|
-
- lib/keystone/mail/address.rb
|
176
|
-
- lib/keystone/mail/content_type.rb
|
177
|
-
- lib/keystone/mail/message.rb
|
178
|
-
- lib/keystone/mail/message_factory.rb
|
179
|
-
- lib/keystone/mail/message_iso2022jp.rb
|
180
|
-
- lib/keystone/mail/message_sjis.rb
|
181
|
-
- lib/keystone/mail/receive.rb
|
182
174
|
- lib/keystone/mail/send.rb
|
175
|
+
- lib/keystone/mail__old/address.rb
|
176
|
+
- lib/keystone/mail__old/content_type.rb
|
177
|
+
- lib/keystone/mail__old/message.rb
|
178
|
+
- lib/keystone/mail__old/message_factory.rb
|
179
|
+
- lib/keystone/mail__old/message_iso2022jp.rb
|
180
|
+
- lib/keystone/mail__old/message_sjis.rb
|
181
|
+
- lib/keystone/mail__old/receive.rb
|
182
|
+
- lib/keystone/mail__old/send.rb
|
183
183
|
- lib/keystone/os.rb
|
184
184
|
- lib/keystone/os/abstract_os.rb
|
185
185
|
- lib/keystone/os/centos.rb
|
@@ -190,6 +190,7 @@ files:
|
|
190
190
|
- lib/keystone/string_util.rb
|
191
191
|
- test/test_core_ext.rb
|
192
192
|
- test/test_string_util.rb
|
193
|
+
- test_local/batch.rb
|
193
194
|
- util/README
|
194
195
|
- util/bin/command_broadcast.rb
|
195
196
|
- util/bin/disk_size_check.rb
|
@@ -211,7 +212,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
211
212
|
requirements:
|
212
213
|
- - ">="
|
213
214
|
- !ruby/object:Gem::Version
|
214
|
-
hash: 3
|
215
215
|
segments:
|
216
216
|
- 0
|
217
217
|
version: "0"
|
@@ -220,7 +220,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
220
|
requirements:
|
221
221
|
- - ">="
|
222
222
|
- !ruby/object:Gem::Version
|
223
|
-
hash: 3
|
224
223
|
segments:
|
225
224
|
- 0
|
226
225
|
version: "0"
|