class_logger 0.0.1 → 0.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/README.md CHANGED
@@ -50,12 +50,6 @@ The following can be used in the *path* or *in* options.
50
50
  <dt><strong>%&lt;rails_root>s</strong></dt>
51
51
  <dd>Will replace itself with Rails.root when in a rails app</dd>
52
52
 
53
- <dt><strong>%&lt;current>s</strong></dt>
54
- <dd>Will replace itself with the +dirname+ of the file</dd>
55
-
56
- <dt><strong>%&lt;parent>s</strong></dt>
57
- <dd>Will replace itself with the parent directory of the file</dd>
58
-
59
53
  <dt><strong>%&lt;class_name>s</strong></dt>
60
54
  <dd>Will replace itself with the name of the class.</dd>
61
55
  </dl>
@@ -118,7 +112,7 @@ Example Usage
118
112
  # inside a class with a custom formatter
119
113
  class Something
120
114
  include ClassLogger
121
- has_logger :path => "%&lt;current>s/log", :rotate => :daily,
115
+ has_logger :path => File.expand_path("../log", __FILE__), :rotate => :daily,
122
116
  :formatter => proc{ |severity, time, program_name, message| "[%s](Something): %s\n" % [severity, message] }
123
117
 
124
118
  def initialize
data/lib/class_logger.rb CHANGED
@@ -30,9 +30,7 @@ module ClassLogger
30
30
  def setup_logger(options)
31
31
  interpolations = {
32
32
  :rails_root => (defined?(Rails) ? Rails.root : ''),
33
- :class_name => self.to_s.downcase,
34
- :current => File.dirname($FILENAME),
35
- :parent => File.expand_path('../../', $FILENAME)
33
+ :class_name => self.to_s.downcase
36
34
  }
37
35
 
38
36
  file_path = File.join(options[:path], options[:in]).to_s % interpolations
@@ -1,3 +1,3 @@
1
1
  module ClassLogger
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1"
3
3
  end
metadata CHANGED
@@ -4,9 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 0
8
7
  - 1
9
- version: 0.0.1
8
+ version: "0.1"
10
9
  platform: ruby
11
10
  authors:
12
11
  - Rob Hurring