oysters 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/oysters/initd.rb +13 -1
- data/lib/oysters/templates/logrotate_config.erb +11 -0
- data/lib/oysters/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5d3939566273ee19cbdaefe37521518a9655b5f
|
4
|
+
data.tar.gz: 1a4aeb3ef58de3d219a85f918f6dd242eabb97a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b65b514601c3dcf92981b880dc973dadcc8ceeb250644801e313d61be70519943b4c4c6b192a1545ba9aa54940adc04e3a2f8c4ceeab1eaf6db0750906878721
|
7
|
+
data.tar.gz: 6474e3392b8f17735af068bb8ed6b953ace3a4e4ae0bb6ae8736ebdd907ed98deb63d8189f763befe9d5671cfcd5bac26d8ae787b4b6643a30e977dc896858eb
|
data/.gitignore
CHANGED
data/lib/oysters/initd.rb
CHANGED
@@ -15,7 +15,6 @@ Oysters.with_configuration do
|
|
15
15
|
run "mkdir -p #{shared_path}/config"
|
16
16
|
location = File.expand_path('../templates/unicorn_init.sh.erb', __FILE__)
|
17
17
|
config = ERB.new(File.read(location))
|
18
|
-
puts config.result(binding)
|
19
18
|
text_config = config.result(binding)
|
20
19
|
text_config.gsub!(/(#{su_command}) (.*);/,'\1 "\2";')
|
21
20
|
put text_config, "#{shared_path}/config/#{application}_unicorn_init.sh"
|
@@ -107,6 +106,19 @@ Oysters.with_configuration do
|
|
107
106
|
sudo rm -f /etc/init.d/#{application}_kewatcher", pty: true
|
108
107
|
end
|
109
108
|
end
|
109
|
+
|
110
|
+
namespace :logrotate do
|
111
|
+
desc 'Install logrotate config'
|
112
|
+
task :install, roles: :app do
|
113
|
+
log_path = Pathname.new(shared_path).join('log', "#{rails_env}.log").to_s
|
114
|
+
tmp_file = "/tmp/#{application}_logs_#{rand}"
|
115
|
+
location = File.expand_path('../templates/logrotate_config.erb', __FILE__)
|
116
|
+
config = ERB.new(File.read(location))
|
117
|
+
|
118
|
+
put config.result(binding), tmp_file
|
119
|
+
sudo "mv #{tmp_file} /etc/logrotate.d/#{application}_logs"
|
120
|
+
end
|
121
|
+
end
|
110
122
|
end
|
111
123
|
|
112
124
|
end
|
data/lib/oysters/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oysters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roman Samoilov
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- lib/oysters/resque_scheduler.rb
|
73
73
|
- lib/oysters/resque_sliders.rb
|
74
74
|
- lib/oysters/templates/kewatcher_init.sh.erb
|
75
|
+
- lib/oysters/templates/logrotate_config.erb
|
75
76
|
- lib/oysters/templates/unicorn_init.sh.erb
|
76
77
|
- lib/oysters/version.rb
|
77
78
|
- oysters.gemspec
|