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/spec/rbatch_spec.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'tmpdir'
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 @dir
18
+ expect(RBatch.home_dir).to eq ENV["RB_HOME"]
21
19
  end
22
20
 
23
21
 
@@ -1,9 +1,10 @@
1
- require 'tmpdir'
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 = Dir.tmpdir
7
+ @home = ENV["RB_HOME"]
7
8
  @config = File.join(@home,"run_conf_test.yaml")
8
9
  end
9
10
 
@@ -0,0 +1,5 @@
1
+ require 'tmpdir'
2
+ @HOME_DIR = File.join(Dir.tmpdir, "rbatch_test_" + Time.now.strftime("%Y%m%d%H%M%S"))
3
+ Dir.mkdir(@HOME_DIR)
4
+ ENV["RB_HOME"]=@HOME_DIR
5
+ ENV["RB_VERBOSE"]="0"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rbatch
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.0.0
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: 2013-12-28 00:00:00 Z
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
@@ -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