luban 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7f56432034ca3f37b4bdb2e9984223083f21843
|
4
|
+
data.tar.gz: 91057327dff28e84d3e13353dc917022ce53659f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e5b7eaec61be97da7fe826ab300c800f091b7a1168a94b077919325c3132b8d491b2559d8e80dc6cc6db88898f1d9a11ea69b8987d9083c8ce7c12bc423a58e
|
7
|
+
data.tar.gz: 3baa07d7e53473c598c7b0072c7eaa78444b1191e52745702bf4356f3d84baa56630c6484bb0f3d554be0439269f798bb31c1d2d01569cfc1696b128042ed0e1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## Version 0.9.8 (Oct 19, 2016)
|
4
|
+
|
5
|
+
New features:
|
6
|
+
* Added new parameters, #logrotate_max_age, #logrotate_interval and #logrotate_count for log rotation control
|
7
|
+
* Refactored these out from logrotate config to make change easier & cleaner
|
8
|
+
* Respected the environment variable, #LUBAN_LOGROTATE_INTERVAL, to receive the default value
|
9
|
+
* Updated crontab logrotate configuration to utilize the new parameters
|
10
|
+
* Bump up gem dependency of luban-cli to 0.4.8
|
11
|
+
|
3
12
|
## Version 0.9.7 (Oct 19, 2016)
|
4
13
|
|
5
14
|
Bug fixes:
|
@@ -117,9 +117,14 @@ module Luban
|
|
117
117
|
module Application
|
118
118
|
extend Base
|
119
119
|
|
120
|
+
DefaultLogrotateMaxAge = 7 # days
|
121
|
+
DefaultLogrotateInterval = 10 # mins
|
122
|
+
|
120
123
|
parameter :application
|
121
124
|
parameter :scm_role
|
122
125
|
parameter :archive_role
|
126
|
+
parameter :logrotate_max_age
|
127
|
+
parameter :logrotate_interval
|
123
128
|
|
124
129
|
def env_name
|
125
130
|
@env_name ||= "#{stage}.#{project}/#{application}"
|
@@ -133,11 +138,18 @@ module Luban
|
|
133
138
|
monitor_defined? and !monitor_itself?
|
134
139
|
end
|
135
140
|
|
141
|
+
def logrotate_count
|
142
|
+
logrotate_max_age * 24 * (60 / logrotate_interval)
|
143
|
+
end
|
144
|
+
|
136
145
|
protected
|
137
146
|
|
138
147
|
def set_default_application_parameters
|
139
148
|
set_default :scm_role, :scm
|
140
149
|
set_default :archive_role, :archive
|
150
|
+
set_default :logrotate_max_age, DefaultLogrotateMaxAge
|
151
|
+
set_default :logrotate_interval,
|
152
|
+
(ENV['LUBAN_LOGROTATE_INTERVAL'] || DefaultLogrotateInterval).to_i
|
141
153
|
setup_default_application_config_finder
|
142
154
|
end
|
143
155
|
|
data/luban.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.required_ruby_version = ">= 2.1.0"
|
23
|
-
spec.add_runtime_dependency 'luban-cli', ">=0.4.
|
23
|
+
spec.add_runtime_dependency 'luban-cli', ">=0.4.8"
|
24
24
|
spec.add_runtime_dependency 'sshkit'
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.9"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: luban
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rubyist Lei
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.4.
|
19
|
+
version: 0.4.8
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.4.
|
26
|
+
version: 0.4.8
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sshkit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|