timber 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/timber/contexts/custom.rb +1 -1
- data/lib/timber/contexts/organization.rb +1 -1
- data/lib/timber/contexts/system.rb +1 -1
- data/lib/timber/contexts/user.rb +1 -1
- data/lib/timber/events/custom.rb +1 -1
- data/lib/timber/util.rb +1 -0
- data/lib/timber/util/object.rb +13 -0
- data/lib/timber/version.rb +1 -1
- data/spec/timber/contexts/custom_spec.rb +11 -0
- data/spec/timber/contexts/organization_spec.rb +11 -0
- data/spec/timber/contexts/system_spec.rb +11 -0
- data/spec/timber/contexts/user_spec.rb +11 -0
- data/spec/timber/events/custom_spec.rb +11 -0
- metadata +13 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfc7a63ba3d0400f2c4dd67bc0844126e5d155fe
|
4
|
+
data.tar.gz: 1ccf7ffb850c87ae7ccc51c04daaa94b1d685adf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a207f1fccdd43e25fbb3e7c9b31809f00cd53884f09d1ca21201348330b3ac66999f422a6e9a9eb8831b807dc1cc53e2731e2c5f0f0e8e2c5bfe96e992e69f65
|
7
|
+
data.tar.gz: 29da7a68133255e47dbbb58498d120b308176d6d5a1f554a4661c3d9820b4e80043ac4a94da740ae10ccf0be2485404815e13860412376d54f8333b7c2c96af6
|
data/lib/timber/contexts/user.rb
CHANGED
data/lib/timber/events/custom.rb
CHANGED
data/lib/timber/util.rb
CHANGED
data/lib/timber/version.rb
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Timber::Contexts::Custom, :rails_23 => true do
|
4
|
+
describe ".as_json" do
|
5
|
+
it "should coerce type into an atom" do
|
6
|
+
custom_context = described_class.new(:type => "my type", :data => {:key => "value"})
|
7
|
+
json = custom_context.as_json()
|
8
|
+
expect(json.keys.first).to eq(:"my type")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Timber::Contexts::Organization, :rails_23 => true do
|
4
|
+
describe ".as_json" do
|
5
|
+
it "should coerce id into a string" do
|
6
|
+
user_context = described_class.new(:id => 1)
|
7
|
+
json = user_context.as_json()
|
8
|
+
expect(json[:id]).to eq("1")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Timber::Contexts::System, :rails_23 => true do
|
4
|
+
describe ".as_json" do
|
5
|
+
it "should coerce pid into an string" do
|
6
|
+
custom_context = described_class.new(:pid => 1)
|
7
|
+
json = custom_context.as_json()
|
8
|
+
expect(json[:pid]).to eq("1")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Timber::Contexts::User, :rails_23 => true do
|
4
|
+
describe ".as_json" do
|
5
|
+
it "should coerce id into a string" do
|
6
|
+
user_context = described_class.new(:id => 1)
|
7
|
+
json = user_context.as_json()
|
8
|
+
expect(json[:id]).to eq("1")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Timber::Events::Custom, :rails_23 => true do
|
4
|
+
describe ".to_hash" do
|
5
|
+
it "should coerce type into an atom" do
|
6
|
+
custom_context = described_class.new(:type => "my type", :message => "hello", :data => {:key => "value"})
|
7
|
+
hash = custom_context.to_hash()
|
8
|
+
expect(hash.keys.first).to eq(:"my type")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timber Technologies, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- lib/timber/util.rb
|
96
96
|
- lib/timber/util/active_support_log_subscriber.rb
|
97
97
|
- lib/timber/util/hash.rb
|
98
|
+
- lib/timber/util/object.rb
|
98
99
|
- lib/timber/util/struct.rb
|
99
100
|
- lib/timber/version.rb
|
100
101
|
- spec/README.md
|
@@ -111,7 +112,12 @@ files:
|
|
111
112
|
- spec/support/timber.rb
|
112
113
|
- spec/support/timecop.rb
|
113
114
|
- spec/support/webmock.rb
|
115
|
+
- spec/timber/contexts/custom_spec.rb
|
116
|
+
- spec/timber/contexts/organization_spec.rb
|
117
|
+
- spec/timber/contexts/system_spec.rb
|
118
|
+
- spec/timber/contexts/user_spec.rb
|
114
119
|
- spec/timber/contexts_spec.rb
|
120
|
+
- spec/timber/events/custom_spec.rb
|
115
121
|
- spec/timber/events_spec.rb
|
116
122
|
- spec/timber/log_devices/http_spec.rb
|
117
123
|
- spec/timber/log_entry_spec.rb
|
@@ -161,7 +167,12 @@ test_files:
|
|
161
167
|
- spec/support/timber.rb
|
162
168
|
- spec/support/timecop.rb
|
163
169
|
- spec/support/webmock.rb
|
170
|
+
- spec/timber/contexts/custom_spec.rb
|
171
|
+
- spec/timber/contexts/organization_spec.rb
|
172
|
+
- spec/timber/contexts/system_spec.rb
|
173
|
+
- spec/timber/contexts/user_spec.rb
|
164
174
|
- spec/timber/contexts_spec.rb
|
175
|
+
- spec/timber/events/custom_spec.rb
|
165
176
|
- spec/timber/events_spec.rb
|
166
177
|
- spec/timber/log_devices/http_spec.rb
|
167
178
|
- spec/timber/log_entry_spec.rb
|