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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9b2acd326993c550068ab0e17c5785fdc519eed
4
- data.tar.gz: aa3550730b3576dde36bbdfbaaa45fb2bc787733
3
+ metadata.gz: f7c053558d1fd41e4ed0d75adf99864b17ef88f8
4
+ data.tar.gz: 97c35c0b34145ff14b4a328225228f3599fd2321
5
5
  SHA512:
6
- metadata.gz: 278588d6e9cd876ae04bd1b109294bb87a94b618298e5b3cbe892d5944691b34a58cf3d76a04adffeee3d5a39d49f1523e40dfd1ed8d4c3f2766babf35c0ba40
7
- data.tar.gz: c42b2a84703cc3597d2e17bede59560e7af9fc9eb7023e58c68d4400aa5912256bcafa94f7ff9eaffb5ccc41121fe141ed7c110c4f1347d5ca95cafff3b37f14
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
@@ -1,3 +1,3 @@
1
1
  module Flnt
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flnt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uchio KONDO