daengine 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/taxonomy_term.rb +1 -1
- data/lib/daengine.rb +4 -5
- data/lib/daengine/version.rb +1 -1
- metadata +1 -1
data/app/models/taxonomy_term.rb
CHANGED
@@ -16,7 +16,7 @@ class TaxonomyTerm
|
|
16
16
|
validates_presence_of :term_id, :label
|
17
17
|
validates_uniqueness_of :term_id
|
18
18
|
|
19
|
-
scope :term_id_is, ->(term_id) { where(:term_id => term_id)}
|
19
|
+
scope :term_id_is, ->(term_id) { where(:term_id => term_id).first }
|
20
20
|
scope :parent_term_in, ->(parent_term_id) { where(:parent_term.in => parent_term_id)}
|
21
21
|
scope :label_is, ->(label) {where(:label => label)}
|
22
22
|
scope :fund_code_is, ->(fund_code) { where("term_type.FUND_CODE" => fund_code)}
|
data/lib/daengine.rb
CHANGED
@@ -60,7 +60,7 @@ module Daengine
|
|
60
60
|
|
61
61
|
def self.execute(config_options)
|
62
62
|
self.configure(config_options)
|
63
|
-
self.set_logger()
|
63
|
+
self.set_logger(config[:logfile_location])
|
64
64
|
self.log("Daengine: ### Loading application config ###", "info")
|
65
65
|
config_options.each { |key, value| self.log("CONFIG #{key}\t#{value}", "info")}
|
66
66
|
begin
|
@@ -72,7 +72,7 @@ module Daengine
|
|
72
72
|
|
73
73
|
def self.execute_taxonomy(config_options)
|
74
74
|
self.configure(config_options)
|
75
|
-
self.set_logger()
|
75
|
+
self.set_logger(config[:taxonomyengine_logfile_location])
|
76
76
|
self.log("Daengine: ### Loading application config ###", "info")
|
77
77
|
config_options.each { |key, value| self.log("CONFIG #{key}\t#{value}", "info")}
|
78
78
|
begin
|
@@ -84,7 +84,7 @@ module Daengine
|
|
84
84
|
|
85
85
|
def self.execute_content_service(config_options)
|
86
86
|
self.configure(config_options)
|
87
|
-
self.set_logger()
|
87
|
+
self.set_logger(config[:content_service_logfile_location])
|
88
88
|
self.log("Daengine: ### Loading application config ###", "info")
|
89
89
|
config_options.each { |key, value| self.log("CONFIG #{key}\t#{value}", "info")}
|
90
90
|
begin
|
@@ -94,8 +94,7 @@ module Daengine
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
def self.set_logger
|
98
|
-
logfile = self.config[:logfile_location]
|
97
|
+
def self.set_logger(logfile)
|
99
98
|
@logger = Logger.new(logfile, 'daily')
|
100
99
|
end
|
101
100
|
|
data/lib/daengine/version.rb
CHANGED