sysloggable 0.1.0 → 0.2.0

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: 905c341697f07420f3fbba5a5118c0991f058cfc
4
- data.tar.gz: 4bbb3c0b63fe1f68250395295dd32a943e776bef
3
+ metadata.gz: 1f0ba652ee30b298f62ce43a5f68b5012da95114
4
+ data.tar.gz: 3113c3c7988c85eeee2b47374cd1d6416118e9df
5
5
  SHA512:
6
- metadata.gz: 78d7e3972c7476aedadec9c6eb5b9c3f4bf1c9bbb35e02307f4068041344ff7eb2a9b3f147383767da8444c5ff47eac3aa1243567287da93fa56350a9293e855
7
- data.tar.gz: 5eede3bf94802cb56b478bcf1951d0f2f49c235be7781564e0b9f792b90b12f1e6eaea34985c2b10972c53842ebf714b58fd32464e4e7d9720c6d4c6732a0c8a
6
+ metadata.gz: 5e838f101bad4925f901d1f532635d56fc8d84f115371864304003e418ac1a0a943fcd5a162db5ffcf8f79b49fa0261e72c8dfd67ce4a1954df9492b920c6941
7
+ data.tar.gz: eefd1fbe38891dc0285b8eca726cc431eba1810513023014337b69e35348b08c03d87827adf35b2d9096a1f132ef578aaeba260544e8505586a5ffeeadab1afd
@@ -24,6 +24,10 @@ module Sysloggable
24
24
  def logger
25
25
  return @logger if defined?(@logger)
26
26
 
27
+ if @options.fetch(:ident).size > 24
28
+ raise ArgumentError.new('Ident lenght must be less then 32 (24 with pid)')
29
+ end
30
+
27
31
  @logger = Container['lib.syslogger'].new(
28
32
  @options.fetch(:ident),
29
33
  ::Syslog::LOG_PID | ::Syslog::LOG_CONS,
@@ -1,3 +1,3 @@
1
1
  module Sysloggable
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -32,4 +32,11 @@ describe Sysloggable::Logger do
32
32
 
33
33
  Timecop.return
34
34
  end
35
+
36
+ context 'when ident is invalid' do
37
+ subject(:logger) { described_class.new(ident: '22222' * 5) }
38
+ it 'raises error' do
39
+ expect{ logger.info('msg') }.to raise_error(ArgumentError)
40
+ end
41
+ end
35
42
  end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sysloggable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michail Merkushin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-10 00:00:00.000000000 Z
11
+ date: 2016-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: syslogger
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dry-container
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.3.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.3.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.13'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.13'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '10.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '10.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '3.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: timecop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0.8'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.8'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: simplecov
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0.12'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.12'
111
111
  description: Writes to syslog with user defined params
@@ -115,9 +115,9 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
- - ".drone.yml"
119
- - ".gitignore"
120
- - ".rspec"
118
+ - .drone.yml
119
+ - .gitignore
120
+ - .rspec
121
121
  - Gemfile
122
122
  - README.md
123
123
  - Rakefile
@@ -142,17 +142,17 @@ require_paths:
142
142
  - lib
143
143
  required_ruby_version: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - ">="
145
+ - - '>='
146
146
  - !ruby/object:Gem::Version
147
147
  version: '0'
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - '>='
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  requirements: []
154
154
  rubyforge_project:
155
- rubygems_version: 2.6.1
155
+ rubygems_version: 2.0.14.1
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: The Logger with writing to syslog