tsukasaoishi-miyazakiresistance 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -58,7 +58,7 @@ MiyazakiResistance is a library like ActiveRecord to use Tokyo Tyrant.
58
58
  - server: localhost
59
59
  port: 1978
60
60
  role: readonly
61
- log_file: log/miyazakiresistance.log
61
+ log_file: log/miyazakiresistance.log
62
62
 
63
63
  == REQUIREMENTS:
64
64
 
@@ -21,13 +21,14 @@ module MiyazakiResistance
21
21
  def server_config(env, file = DEFAULT[:config])
22
22
  env = env.to_s
23
23
  conf = YAML.load_file(file)
24
+
25
+ class_variable_set("@@logger", Logger.new(config["log_file"])) if conf["log_file"]
26
+
24
27
  if (config = conf[env]).nil?
25
28
  logger_fatal "specified environment(#{env}) is not found in conig file(#{file})"
26
29
  return
27
30
  end
28
31
 
29
- class_variable_set("@@logger", Logger.new(config["log_file"])) if config["log_file"]
30
-
31
32
  config["set_server"].each do |work|
32
33
  set_server work["server"], work["port"], work["role"]
33
34
  end
@@ -13,7 +13,7 @@ require 'miyazaki_resistance/base'
13
13
  require 'miyazaki_resistance/error'
14
14
 
15
15
  module MiyazakiResistance
16
- VERSION = '0.1.0'
16
+ VERSION = '0.1.1'
17
17
  end
18
18
 
19
19
  MiyazakiResistance::Base.class_eval do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tsukasaoishi-miyazakiresistance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tsukasa OISHI