log4ever 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +4 -0
- data/lib/log4r/evernote.rb +2 -3
- data/log4ever.gemspec +1 -1
- data/spec/log4ever_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzUxNDFhYjU1YTcyYWZlMjhkYzM0ZjY1MWE4ODkzODgwMTA2MzcyOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzE2OGU2NjFmZDhmMGQ0MDE4MzkzMWJiM2I2ODFhODYxMzY3Y2RhNQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWQ0NzI2Nzk4ODk4MzcwNjNhNGVmZjcwYzU3MGJjNjdjNDg4NTJhYTg1NTJj
|
10
|
+
YzViNTQ0MTU4NjNiMGU3ZjFjNGYzNzZhNTJmMjhlYTYyMDg5YjNjZDBiZjA0
|
11
|
+
M2I1ZjkxMWRiNzEzNTFmNzQzMTY4ZmQ3ZGY4YzQ4MDhhODNjYjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjI2NzMzYmZiM2VjYmIxZDczY2NlYjI5OWU0NTMyNmFkNWI5ZWNmMDg2NDU3
|
14
|
+
MDc3NTNiODhlNTE0YmUyNDNmOTgwNjk4ODZjZWZlMzIzYTc3YWViYjBkYzdi
|
15
|
+
MzBiY2VjMmMzMWNkYjZjZGU5YmUzNzY4YTdlOGU2MjllNGNiYTQ=
|
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.2'
|
7
7
|
class TypeError < StandardError; end
|
8
8
|
module ShiftAge
|
9
9
|
DAILY = 1
|
@@ -109,7 +109,6 @@ module Log4ever
|
|
109
109
|
return unless @params.nil? || @params.empty?
|
110
110
|
@params = {}
|
111
111
|
@notebook = notebook
|
112
|
-
#@tag = Tag.new
|
113
112
|
if !@notebook.kind_of? ::Evernote::EDAM::Type::Notebook
|
114
113
|
raise TypeError, "Expected kind of Notebook, got #{@notebook.class}", caller
|
115
114
|
elsif !@notebook.respond_to? 'guid'
|
@@ -214,7 +213,7 @@ module Log4ever
|
|
214
213
|
|
215
214
|
# get created time
|
216
215
|
def created_at
|
217
|
-
time =
|
216
|
+
time = get.created.to_s
|
218
217
|
ut = time.slice(0, time.length - 3)
|
219
218
|
Time.at(ut.to_f)
|
220
219
|
end
|
data/log4ever.gemspec
CHANGED
data/spec/log4ever_spec.rb
CHANGED
@@ -198,5 +198,17 @@ describe Log4ever, 'が実行する処理' do
|
|
198
198
|
|
199
199
|
guid_before.should_not == guid_after
|
200
200
|
end
|
201
|
+
|
202
|
+
it '期間単位でのログローテートを有効にしたとき、エラーが発生しないこと' do
|
203
|
+
proc {
|
204
|
+
logger = Log4r::Logger.new(LOGGER_NAME)
|
205
|
+
@params.delete(:maxsize)
|
206
|
+
@params[:shift_age] = Log4ever::ShiftAge::DAILY
|
207
|
+
evernoteOutputter = Log4r::EvernoteOutputter.new('evernote', @params)
|
208
|
+
logger.outputters = evernoteOutputter
|
209
|
+
logger.info("test1")
|
210
|
+
}.should_not raise_error()
|
211
|
+
end
|
212
|
+
|
201
213
|
end
|
202
214
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: log4ever
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mapserver2007
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: log4r
|