fcl_rails_daemon 1.0.8 → 1.0.10
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.
- checksums.yaml +4 -4
- data/bin/fcld +7 -2
- data/lib/core/gerenciador.rb +5 -0
- data/lib/fcl_rails_daemon.rb +0 -1
- data/lib/fcl_rails_daemon/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70bc0c10389e1ccf272628e51e190ff94f6477c7
|
4
|
+
data.tar.gz: f2f3c542304c6df46169ee92e3b56d0f1ac76c7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22688a3a48f56bc0232ff74fc679011be4a580a570dc045386228e77a36d03f3a2cc770593633addc4beabcc93f6c16c81e2b522ad81a5f5c52cac638020f4fd
|
7
|
+
data.tar.gz: 051734232b8d56405ce5f9efa9f860a004e68005baa4557f877c8b96d3c90babb9ea233647d770644ad8fd64f35716a9cc4323f486e21fec3ed1f1a57fffa530
|
data/bin/fcld
CHANGED
@@ -11,8 +11,8 @@ config_file = File.join(config_dir, 'fcld_rails_daemon.rb')
|
|
11
11
|
if ARGV.include? "--configure"
|
12
12
|
config_file_content = <<-FILE
|
13
13
|
# Carrega arquivo de environment (projeto rails)
|
14
|
-
if File.exist?(File.join("#{
|
15
|
-
require File.join("#{
|
14
|
+
if File.exist?(File.join("#{DAEMON_ROOT}", "config", "environment"))
|
15
|
+
require File.join("#{DAEMON_ROOT}", "config", "environment")
|
16
16
|
end
|
17
17
|
|
18
18
|
# Para registrar seus comandos é necessário adicioná-los conforme o exemplo abaixo
|
@@ -24,6 +24,11 @@ end
|
|
24
24
|
File.open(config_file, 'wb') {|f| f.write(config_file_content) } unless File.exist?(config_file)
|
25
25
|
|
26
26
|
command_sample_content = <<-FILE
|
27
|
+
# Carrega arquivo de environment (projeto rails)
|
28
|
+
if File.exist?(File.join("#{DAEMON_ROOT}", "config", "environment"))
|
29
|
+
require File.join("#{DAEMON_ROOT}", "config", "environment")
|
30
|
+
end
|
31
|
+
|
27
32
|
class ComandoExemplo < FclRailsDaemon::Daemon
|
28
33
|
|
29
34
|
# Obrigatóriamente é necessário implementar o método "initialize"
|
data/lib/core/gerenciador.rb
CHANGED
@@ -126,6 +126,11 @@ module FclRailsDaemon
|
|
126
126
|
comando_undescore = ActiveSupport::Inflector.underscore(comando)
|
127
127
|
|
128
128
|
conteudo = <<-FILE
|
129
|
+
# Carrega arquivo de environment (projeto rails)
|
130
|
+
if File.exist?(File.join("#{DAEMON_ROOT}", "config", "environment"))
|
131
|
+
require File.join("#{DAEMON_ROOT}", "config", "environment")
|
132
|
+
end
|
133
|
+
|
129
134
|
class #{comando_camel} < FclRailsDaemon::Daemon
|
130
135
|
|
131
136
|
# Obrigatóriamente é necessário implementar o método "initialize"
|
data/lib/fcl_rails_daemon.rb
CHANGED