daengine 0.2.9 → 0.2.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.
@@ -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)}
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Daengine
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.10"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: daengine
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.9
5
+ version: 0.2.10
6
6
  platform: ruby
7
7
  authors:
8
8
  - sbhatia