flnt 0.4.0 → 0.4.1
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/lib/flnt/logger.rb +1 -1
- data/lib/flnt/version.rb +1 -1
- data/lib/flnt.rb +1 -1
- data/spec/lib/flnt/logger_spec.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7c053558d1fd41e4ed0d75adf99864b17ef88f8
|
4
|
+
data.tar.gz: 97c35c0b34145ff14b4a328225228f3599fd2321
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40fdcd6c221753d8d2baaaf279dcc55b1fe1026c316c67d85f95b2bbfb8d177fb4549e49245dd63aa7bad1e2cf103b3c3cf78ff3b262fc1ca2f34769b7d5d1fa
|
7
|
+
data.tar.gz: 216853fe75484dea31a65c0d9155f06bad8246188b6e3c17a76759a020d68d5fb01e4e355a71c6f0c7ff630bcf0c9dd84621d9bf50e01a806ad5522c9443ab9d
|
data/lib/flnt/logger.rb
CHANGED
@@ -13,7 +13,7 @@ module Flnt
|
|
13
13
|
|
14
14
|
# Also pass the :singleton_class to avoid rspec stubbing errors
|
15
15
|
# And :class to avoid stack level too deep in detecting receive ... FIXME
|
16
|
-
unless [:class, :singleton_class, :object_id].include?(target_method.to_sym)
|
16
|
+
unless [:class, :singleton_class, :object_id, :send, :__send__].include?(target_method.to_sym)
|
17
17
|
eval %Q(undef #{target_method})
|
18
18
|
end
|
19
19
|
end
|
data/lib/flnt/version.rb
CHANGED
data/lib/flnt.rb
CHANGED
@@ -13,7 +13,7 @@ module Flnt
|
|
13
13
|
each do |target_method|
|
14
14
|
|
15
15
|
# Also pass the :singleton_class to avoid rspec stubbing errors
|
16
|
-
unless [:singleton_class, :object_id].include?(target_method.to_sym)
|
16
|
+
unless [:singleton_class, :object_id, :send, :__send__].include?(target_method.to_sym)
|
17
17
|
eval %Q(undef #{target_method})
|
18
18
|
end
|
19
19
|
end
|
@@ -49,6 +49,18 @@ describe "Flnt::Logger" do
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
+
describe "should send messages with dynamic method call" do
|
53
|
+
specify do
|
54
|
+
expect(Fluent::Logger).to receive(:post).with("sample.info", {message: "Hello Info"})
|
55
|
+
Flnt.sample.send :info, "Hello Info"
|
56
|
+
end
|
57
|
+
|
58
|
+
specify do
|
59
|
+
expect(Fluent::Logger).to receive(:post).with("sample.warn", {message: "Hello Info"})
|
60
|
+
Flnt.sample.send :warn, "Hello Info"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
52
64
|
describe "should send messages when called with arg" do
|
53
65
|
context "when String" do
|
54
66
|
specify do
|