rbatch 2.0.0 → 2.1.0
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/CHANGELOG +7 -0
- data/README.ja.md +70 -47
- data/README.md +261 -238
- data/bin/rbatch-init +27 -6
- data/doc/RBatch/CommonConfig.html +108 -12
- data/doc/RBatch/Config.html +108 -12
- data/doc/RBatch/Log.html +108 -65
- data/doc/RBatch/RunConf.html +78 -78
- data/doc/RBatch.html +274 -44
- data/doc/created.rid +9 -9
- data/doc/index.html +30 -8
- data/doc/lib/rbatch/cmd_rb.html +1 -1
- data/doc/lib/rbatch/common_config_rb.html +1 -1
- data/doc/lib/rbatch/config_rb.html +1 -1
- data/doc/lib/rbatch/double_run_checker_rb.html +1 -1
- data/doc/lib/rbatch/log_rb.html +1 -1
- data/doc/lib/rbatch/run_conf_rb.html +1 -1
- data/doc/lib/rbatch/version_rb.html +1 -1
- data/doc/lib/rbatch_rb.html +1 -1
- data/lib/rbatch/common_config.rb +36 -10
- data/lib/rbatch/config.rb +36 -10
- data/lib/rbatch/log.rb +12 -1
- data/lib/rbatch/run_conf.rb +4 -1
- data/lib/rbatch/version.rb +1 -1
- data/lib/rbatch.rb +68 -14
- data/sample/.rbatchrc +127 -0
- data/spec/cmd_spec.rb +2 -4
- data/spec/common_config_spec.rb +38 -7
- data/spec/config_spec.rb +36 -6
- data/spec/log_spec.rb +6 -6
- data/spec/rbatch_spec.rb +2 -4
- data/spec/run_conf_spec.rb +3 -2
- data/spec/spec_helper.rb +5 -0
- metadata +5 -3
- data/sample/conf/rbatch.yaml +0 -68
data/spec/rbatch_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require File.expand_path(File.join( File.dirname(__FILE__), 'spec_helper'))
|
2
2
|
|
3
3
|
describe "RBatch" do
|
4
4
|
before :all do
|
@@ -14,10 +14,8 @@ describe "RBatch" do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
it "RB_HOME should be home_dir" do
|
17
|
-
@dir = Dir.tmpdir
|
18
|
-
ENV["RB_HOME"]=@dir
|
19
17
|
require 'rbatch'
|
20
|
-
expect(RBatch.home_dir).to eq
|
18
|
+
expect(RBatch.home_dir).to eq ENV["RB_HOME"]
|
21
19
|
end
|
22
20
|
|
23
21
|
|
data/spec/run_conf_spec.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
require '
|
1
|
+
require File.expand_path(File.join( File.dirname(__FILE__), 'spec_helper'))
|
2
|
+
|
2
3
|
require 'rbatch/run_conf'
|
3
4
|
|
4
5
|
describe RBatch::RunConf do
|
5
6
|
before :all do
|
6
|
-
@home =
|
7
|
+
@home = ENV["RB_HOME"]
|
7
8
|
@config = File.join(@home,"run_conf_test.yaml")
|
8
9
|
end
|
9
10
|
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rbatch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.
|
5
|
+
version: 2.1.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- fetaro
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date:
|
13
|
+
date: 2014-01-09 00:00:00 Z
|
14
14
|
dependencies: []
|
15
15
|
|
16
16
|
description: RBatch has many fanctions to help with your making a batch script such as "data backup script" or "proccess starting script".
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- lib/rbatch/run_conf.rb
|
89
89
|
- lib/rbatch/version.rb
|
90
90
|
- rbatch.gemspec
|
91
|
+
- sample/.rbatchrc
|
91
92
|
- sample/bin/apache_log_insert.rb
|
92
93
|
- sample/bin/file_batch_copy.rb
|
93
94
|
- sample/bin/log_backup.rb
|
@@ -101,7 +102,6 @@ files:
|
|
101
102
|
- sample/conf/mysql_data_backup.yaml
|
102
103
|
- sample/conf/openam_log_insert.yaml
|
103
104
|
- sample/conf/openldap_backup.yaml
|
104
|
-
- sample/conf/rbatch.yaml
|
105
105
|
- sample/conf/webagent_log_insert.yaml
|
106
106
|
- sample/data/access_log.1
|
107
107
|
- sample/data/access_log.2012-07-10
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- spec/log_spec.rb
|
120
120
|
- spec/rbatch_spec.rb
|
121
121
|
- spec/run_conf_spec.rb
|
122
|
+
- spec/spec_helper.rb
|
122
123
|
homepage: https://github.com/fetaro/rbatch
|
123
124
|
licenses:
|
124
125
|
- MIT
|
@@ -154,3 +155,4 @@ test_files:
|
|
154
155
|
- spec/log_spec.rb
|
155
156
|
- spec/rbatch_spec.rb
|
156
157
|
- spec/run_conf_spec.rb
|
158
|
+
- spec/spec_helper.rb
|
data/sample/conf/rbatch.yaml
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
# RBatch config
|
2
|
-
#
|
3
|
-
# This file format is YAML
|
4
|
-
#
|
5
|
-
|
6
|
-
# -------------------
|
7
|
-
# Global setting
|
8
|
-
# -------------------
|
9
|
-
|
10
|
-
# Forbit Double Run
|
11
|
-
#
|
12
|
-
# Default : false
|
13
|
-
#
|
14
|
-
#forbid_double_run: true
|
15
|
-
|
16
|
-
# -------------------
|
17
|
-
# Cmd setting
|
18
|
-
# -------------------
|
19
|
-
|
20
|
-
# Raise Exception
|
21
|
-
#
|
22
|
-
# Default : false
|
23
|
-
#
|
24
|
-
# If command exit status is not 0, raise exception.
|
25
|
-
#
|
26
|
-
cmd_raise : true
|
27
|
-
|
28
|
-
|
29
|
-
# -------------------
|
30
|
-
# Log setting
|
31
|
-
# -------------------
|
32
|
-
|
33
|
-
# Log File Name
|
34
|
-
#
|
35
|
-
# Default : "<date>_<time>_<prog>.log"
|
36
|
-
#
|
37
|
-
# Reservation words
|
38
|
-
# <data> --> replace to YYYYMMDD date string
|
39
|
-
# <time> --> replace to hhmmss time string
|
40
|
-
# <prog> --> Program file base name (except extention)
|
41
|
-
#
|
42
|
-
#log_name : "<date>_<time>_<prog>.log"
|
43
|
-
log_name : "<date>_<prog>.log"
|
44
|
-
|
45
|
-
# Log Output Directory
|
46
|
-
#
|
47
|
-
# Default : "(Script path)/../log"
|
48
|
-
#
|
49
|
-
#log_dir : "/tmp/log"
|
50
|
-
|
51
|
-
# Append log or not
|
52
|
-
#
|
53
|
-
# Default : ture
|
54
|
-
#
|
55
|
-
#log_append : false
|
56
|
-
|
57
|
-
# Log Level
|
58
|
-
#
|
59
|
-
# Default : "info"
|
60
|
-
# Value : "debug","info","wran","error","fatal"
|
61
|
-
#
|
62
|
-
#log_level : "debug"
|
63
|
-
|
64
|
-
# Print log-string both file and STDOUT
|
65
|
-
#
|
66
|
-
# Default : false
|
67
|
-
#
|
68
|
-
log_stdout : true
|