sidekick-client 0.2.0 → 0.2.1

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -8,6 +8,7 @@ require "#{File.dirname(__FILE__)}/../shared/sidekick_queue_publisher"
8
8
  Thread.new { EM.run } unless EM.reactor_running?
9
9
 
10
10
  SIDEKICK_CONFIG = "/etc/vamp/sidekick.conf" unless defined?(SIDEKICK_CONFIG)
11
+ DEFAULT_LOG_LOCATION = "/var/log/cft/sidekick/sidekick_client.log"
11
12
  # TODO: this client must be used from within a rails application right now
12
13
  # because it relies on RAILS_ROOT to find its config file
13
14
  #
@@ -22,11 +23,8 @@ class SidekickClient
22
23
  @config ||= config_override.with_indifferent_access
23
24
  end
24
25
 
25
- if @config[:sidekick_log_file]
26
- @logger = SidekickLogger.new(@config[:sidekick_log_file].to_s.gsub("sidekick.log","sidekick_client.log"))
27
- else
28
- @logger = SidekickLogger.new(STDOUT)
29
- end
26
+ @config[:sidekick_log_file] ||= DEFAULT_LOG_LOCATION
27
+ @logger = SidekickLogger.new(@config[:sidekick_log_file].to_s.gsub("sidekick.log","sidekick_client.log"))
30
28
 
31
29
  @config[:exchange] ||= "amq.direct"
32
30
 
@@ -56,4 +54,4 @@ class SidekickClient
56
54
  response = @qconn.publish(message.to_yaml, queue_name || @config[:queue_name], temp_queue)
57
55
  return response && YAML.load(response)
58
56
  end
59
- end
57
+ end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sidekick-client}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["yan"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekick-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - yan