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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df1726c83f244b7f617bd199fe0026649c8ac7f9
4
- data.tar.gz: 47c16fc3d699f2f51f255cd9544706810f3d8765
3
+ metadata.gz: 70bc0c10389e1ccf272628e51e190ff94f6477c7
4
+ data.tar.gz: f2f3c542304c6df46169ee92e3b56d0f1ac76c7e
5
5
  SHA512:
6
- metadata.gz: 09fbc700b858faf712bf2de69a36f11197cd1dc6be6da6f2731f5ddc20a398196268b14d8062695cf30a9810c061420e3e338f968919045b5ccfa5f6ab9eb5dc
7
- data.tar.gz: 80e8af07361b801bae6f9009ece989c261ffc43609572a3fb8373032f130c2b74ffb5dbda167fae872b31393dbc5cebc2175d61cae6d3c1e0be271d1511c4a19
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("#{config_dir}", "environment"))
15
- require File.join("#{config_dir}", "environment")
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"
@@ -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"
@@ -5,7 +5,6 @@ require 'yaml'
5
5
  require 'daemons'
6
6
  require 'active_support'
7
7
 
8
-
9
8
  module FclRailsDaemon end
10
9
 
11
10
  require_relative "core/daemon"
@@ -1,3 +1,3 @@
1
1
  module FclRailsDaemon
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fcl_rails_daemon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Washington Silva