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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8875273e847f20359d003311d9db05446cc29edf
4
- data.tar.gz: b467ce75804859526aa28efdebb006f107e8a148
3
+ metadata.gz: e1d08242eefdcd15ca81557ddf95daa8ee7fef2a
4
+ data.tar.gz: e4d0d198403e78215622fc67b116d925d4f421e6
5
5
  SHA512:
6
- metadata.gz: ac9133e8cac593f1238eb74927921741e4a51675221dc0de1cef44a13c0cf3fbd3c37bf6d307af16238e783474aedac112213d2ff4aa50d7cdd076a5c3c0c5dc
7
- data.tar.gz: 81c33ff7df80e54bae18ff4cf7e7220ac2c404f7b98d0bdda8186ba0b7271a196901a3d4b35524f4559ff6d5399e8cae428c239cac6051f3f5541a048cf39cc0
6
+ metadata.gz: 874d33d73d14c566a07ce1d6529de7b47616f9e0b4d62fa507d1de2770ce95fe4ed16dd5c5aa6ca5686c067f35013eac4b835e8a448ff188be59b061f277209f
7
+ data.tar.gz: 92858b9c5d65b9bf2d9e45cf561426131460c5dd946a1b1352f4e7b9eb026346790ac61b7674f226559f43ac86ddbf2c177f93b4727afbb8605a378a98a43ab6
data/README.md CHANGED
@@ -64,6 +64,8 @@ Performance improvement.
64
64
  Bug fix.
65
65
  * 0.1.3
66
66
  Ruby2.0.0 support. Bug fix.
67
+ * 0.1.4
68
+ Add testcase.
67
69
 
68
70
  ##License
69
71
  Licensed under the MIT
@@ -3,7 +3,7 @@ require 'log4r/outputter/evernoteoutputter'
3
3
  require 'evernote_oauth'
4
4
 
5
5
  module Log4ever
6
- VERSION = '0.1.3'
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
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
14
14
  gem.add_dependency('activesupport', '>= 4.0.4')
15
15
  gem.add_dependency('i18n', '>= 0.6.9')
16
16
  gem.add_dependency('evernote_oauth', '>= 0.2.3')
17
- gem.version = '0.1.3'
17
+ gem.version = '0.1.4'
18
18
  gem.license = 'MIT'
19
19
  end
20
20
 
@@ -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
- notebook_obj = @notebook.create(@params[:notebook], @params[:stack])
146
+ @notebook.create(@params[:notebook], @params[:stack])
131
147
  }.should raise_error()
132
148
  end
133
149
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log4ever
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - mapserver2007