loggem 0.0.4 → 0.0.5
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.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/README.md +2 -2
- data/Rakefile +5 -1
- data/lib/loggem/formatters/human_readable.rb +11 -0
- data/lib/loggem/version.rb +1 -1
- data/lib/loggem.rb +1 -0
- data/loggem.gemspec +1 -1
- data/spec/loggem/formatters/human_readable_spec.rb +18 -0
- data/spec/loggem/formatters/raw_spec.rb +3 -1
- data/spec/spec_helper.rb +0 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f25cd6561469046b0e72e6d5a66dae159c0cee10
|
4
|
+
data.tar.gz: 86a3a00ff03ebc0c6a28ba7f70603ce3870570d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb1839fbc3027b904d95102849e57eb7cc1ea4047af35c6de673600ebfebf8e4dc5e3f22b3f8de4bd9bfbfacb226e194c071fff66a089d071bcf517e2915b15d
|
7
|
+
data.tar.gz: c0965606410bd875daf00cb4ddbef687ae97725a1af5a6927cf23b2b9f20a1cab6b41f55b4ba9182768e15fc899364ed84d781cf4261336f89c5fce89f1912ce
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Loggem
|
1
|
+
# Loggem [](https://travis-ci.org/emartech/loggem)
|
2
2
|
|
3
3
|
Simple log wrapper with different formatters. Minimal Rails/ActiveRecord/Sequel support, so far
|
4
4
|
|
@@ -22,7 +22,7 @@ TODO: Write usage instructions here
|
|
22
22
|
|
23
23
|
## Contributing
|
24
24
|
|
25
|
-
1. Fork it ( https://github.com/
|
25
|
+
1. Fork it ( https://github.com/emartech/loggem/fork )
|
26
26
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
27
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
28
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/Rakefile
CHANGED
data/lib/loggem/version.rb
CHANGED
data/lib/loggem.rb
CHANGED
data/loggem.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["istvan.demeter@emarsys.com"]
|
11
11
|
spec.summary = %q{Simple log wrapper with different formatters. Rails/ActiveRecord/Sequel support, so far}
|
12
12
|
spec.description = %q{}
|
13
|
-
spec.homepage = "https://github.com/
|
13
|
+
spec.homepage = "https://github.com/emartech/loggem"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Loggem::Formatters::HumanReadable do
|
4
|
+
|
5
|
+
describe "#call" do
|
6
|
+
{
|
7
|
+
{message: 'event worth to mention', duration: 123} => %Q{\n\tmessage: event worth to mention\n\tduration: 123},
|
8
|
+
{message: "single ' quote"} => %Q{\n\tmessage: single ' quote},
|
9
|
+
{message: "double \" quote"} => %Q{\n\tmessage: double " quote},
|
10
|
+
{tags: %w[a b c]} => %Q{\n\ttags: ["a", "b", "c"]},
|
11
|
+
{symbol: :symbol} => %Q{\n\tsymbol: symbol},
|
12
|
+
}.each do |input, output|
|
13
|
+
it "returns all data showing every keys in new lines" do
|
14
|
+
expect(subject.call input).to eq output
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -3,8 +3,10 @@ require 'spec_helper'
|
|
3
3
|
describe Loggem::Formatters::Raw do
|
4
4
|
|
5
5
|
describe "#call" do
|
6
|
+
let(:data) { double 'raw data' }
|
7
|
+
|
6
8
|
it "returns the raw data" do
|
7
|
-
expect(subject.call
|
9
|
+
expect(subject.call data).to be data
|
8
10
|
end
|
9
11
|
end
|
10
12
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loggem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Istvan Demeter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -60,6 +60,7 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
+
- ".travis.yml"
|
63
64
|
- Gemfile
|
64
65
|
- LICENSE.txt
|
65
66
|
- README.md
|
@@ -68,6 +69,7 @@ files:
|
|
68
69
|
- lib/loggem/event.rb
|
69
70
|
- lib/loggem/extensions/active_record.rb
|
70
71
|
- lib/loggem/extensions/sequel.rb
|
72
|
+
- lib/loggem/formatters/human_readable.rb
|
71
73
|
- lib/loggem/formatters/json.rb
|
72
74
|
- lib/loggem/formatters/key_value.rb
|
73
75
|
- lib/loggem/formatters/raw.rb
|
@@ -76,13 +78,14 @@ files:
|
|
76
78
|
- lib/loggem/version.rb
|
77
79
|
- loggem.gemspec
|
78
80
|
- spec/loggem/event_spec.rb
|
81
|
+
- spec/loggem/formatters/human_readable_spec.rb
|
79
82
|
- spec/loggem/formatters/json_spec.rb
|
80
83
|
- spec/loggem/formatters/key_value_spec.rb
|
81
84
|
- spec/loggem/formatters/raw_spec.rb
|
82
85
|
- spec/loggem/logger_spec.rb
|
83
86
|
- spec/loggem_spec.rb
|
84
87
|
- spec/spec_helper.rb
|
85
|
-
homepage: https://github.com/
|
88
|
+
homepage: https://github.com/emartech/loggem
|
86
89
|
licenses:
|
87
90
|
- MIT
|
88
91
|
metadata: {}
|
@@ -102,13 +105,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
105
|
version: '0'
|
103
106
|
requirements: []
|
104
107
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.4.5
|
106
109
|
signing_key:
|
107
110
|
specification_version: 4
|
108
111
|
summary: Simple log wrapper with different formatters. Rails/ActiveRecord/Sequel support,
|
109
112
|
so far
|
110
113
|
test_files:
|
111
114
|
- spec/loggem/event_spec.rb
|
115
|
+
- spec/loggem/formatters/human_readable_spec.rb
|
112
116
|
- spec/loggem/formatters/json_spec.rb
|
113
117
|
- spec/loggem/formatters/key_value_spec.rb
|
114
118
|
- spec/loggem/formatters/raw_spec.rb
|