log4ever 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/log4r/evernote.rb +2 -3
- data/lib/log4r/outputter/evernoteoutputter.rb +0 -2
- data/log4ever.gemspec +1 -1
- data/spec/log4ever_spec.rb +17 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1d08242eefdcd15ca81557ddf95daa8ee7fef2a
|
4
|
+
data.tar.gz: e4d0d198403e78215622fc67b116d925d4f421e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 874d33d73d14c566a07ce1d6529de7b47616f9e0b4d62fa507d1de2770ce95fe4ed16dd5c5aa6ca5686c067f35013eac4b835e8a448ff188be59b061f277209f
|
7
|
+
data.tar.gz: 92858b9c5d65b9bf2d9e45cf561426131460c5dd946a1b1352f4e7b9eb026346790ac61b7674f226559f43ac86ddbf2c177f93b4727afbb8605a378a98a43ab6
|
data/README.md
CHANGED
data/lib/log4r/evernote.rb
CHANGED
@@ -3,7 +3,7 @@ require 'log4r/outputter/evernoteoutputter'
|
|
3
3
|
require 'evernote_oauth'
|
4
4
|
|
5
5
|
module Log4ever
|
6
|
-
VERSION = '0.1.
|
6
|
+
VERSION = '0.1.4'
|
7
7
|
|
8
8
|
class EvernoteError < StandardError; end
|
9
9
|
|
@@ -97,7 +97,7 @@ module Log4ever
|
|
97
97
|
@notebook
|
98
98
|
rescue => e
|
99
99
|
Log4r::Logger.log_internal { e.message }
|
100
|
-
raise EvernoteError, "Create notebook failed. Probably, already exists notebook of same name." if @notebook.nil?
|
100
|
+
raise EvernoteError, "Create notebook failed. Probably, already exists notebook of same name.", caller if @notebook.nil?
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
@@ -295,7 +295,6 @@ module Log4ever
|
|
295
295
|
|
296
296
|
# tag name to tag object
|
297
297
|
def to_obj(tag_name)
|
298
|
-
tag_name = tag_name
|
299
298
|
@tags.each do |tag|
|
300
299
|
if tag_name == tag.name
|
301
300
|
Log4r::Logger.log_internal { "Get tag: #{tag_name}" }
|
@@ -140,8 +140,6 @@ module Log4r
|
|
140
140
|
when Log4ever::ShiftAge::MONTHLY
|
141
141
|
next_month = Time.local(created_at.next_month.year, created_at.next_month.month, created_at.next_month.day)
|
142
142
|
@endTime = next_month.to_i
|
143
|
-
else
|
144
|
-
raise TypeError, "Argument 'shift_age' must be '1' or '2' or '3'", caller
|
145
143
|
end
|
146
144
|
end
|
147
145
|
end
|
data/log4ever.gemspec
CHANGED
data/spec/log4ever_spec.rb
CHANGED
@@ -88,6 +88,22 @@ describe Log4ever, 'が実行する処理' do
|
|
88
88
|
))
|
89
89
|
}.should raise_error(ArgumentError)
|
90
90
|
end
|
91
|
+
|
92
|
+
it "ログローテートサイズパラメータのチェックでエラーが出ること" do
|
93
|
+
proc {
|
94
|
+
logger.outputters = Log4r::EvernoteOutputter.new(LOGGER_NAME, @params.merge(
|
95
|
+
:maxsize => 0
|
96
|
+
))
|
97
|
+
}.should raise_error(TypeError)
|
98
|
+
end
|
99
|
+
|
100
|
+
it "ログローテート期間パラメータのチェックでエラーが出ること" do
|
101
|
+
proc {
|
102
|
+
logger.outputters = Log4r::EvernoteOutputter.new(LOGGER_NAME, @params.merge(
|
103
|
+
:shift_age => 4
|
104
|
+
))
|
105
|
+
}.should raise_error(TypeError)
|
106
|
+
end
|
91
107
|
end
|
92
108
|
|
93
109
|
describe 'Log4everの内部の処理' do
|
@@ -127,7 +143,7 @@ describe Log4ever, 'が実行する処理' do
|
|
127
143
|
proc {
|
128
144
|
@evernote = Log4ever::Evernote.new(@params[:auth_token])
|
129
145
|
@notebook = @evernote.notebook
|
130
|
-
|
146
|
+
@notebook.create(@params[:notebook], @params[:stack])
|
131
147
|
}.should raise_error()
|
132
148
|
end
|
133
149
|
|