logcast 1.0.3 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/logcast/broadcaster.rb +13 -7
  3. metadata +7 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9a2746d63df4476b6f08089cf47a2b193d918e3f
4
- data.tar.gz: 037c4086009af9af2b19e21a2399c19604796092
2
+ SHA256:
3
+ metadata.gz: f2ccc31f2e68f0a35edfcbccc9c87462ad2c779f08b0a0858a38ebb38a9a297f
4
+ data.tar.gz: 2dbe7a057cf7080e4e10f0c4e52fc1cac5aff92af2b7196b6823dd812142ded4
5
5
  SHA512:
6
- metadata.gz: 9339100d94dfcfcde1def919451347738600e59c0bf13dca1dc40f2e517607ea81e0b8f25c7b403ae5953c764cbe8c9749391a0599b1e9eb7dcce455d950a15b
7
- data.tar.gz: 36adc5cb7164f46b369f780a2785121868dd17ffe024107c63a706b2de0d2d32065ba24662f09ca688dd9e0b10fc9e2471b408f2628ed7f3f1aeb8b6b33c4c99
6
+ metadata.gz: 57c5fa53d11284be2e3909524e8c37ea5197694e8a0d10c042cc660b2340f92872bac47ef5cd84495ecb61ad2496d2eeb7a4e2cd7c44614189de23f57cf9b06b
7
+ data.tar.gz: 86e39eca741ba0454d4ea40fc60d2ec4ca0adab1b3b7a1809f3c12b2e9eb0e36ef3945b3277dd9ba5dd92db361ec2f7eb6ab14077c7adf4b6c07293333651bd4
@@ -34,15 +34,21 @@ class Logcast::Broadcaster
34
34
  end
35
35
 
36
36
  def method_missing(name, *args, &block)
37
- responded = false
38
-
39
- subscribers.each do |subscriber|
40
- if subscriber.respond_to?(name)
41
- responded = subscriber.send(name, *args, &block)
42
- end
37
+ responding = subscribers.select { |s| s.respond_to?(name) }
38
+ if responding.any?
39
+ responding.map { |s| s.send(name, *args, &block) }.last
40
+ else
41
+ super
43
42
  end
43
+ end
44
+
45
+ def respond_to_missing?(name, include_all)
46
+ subscribers.any? { |s| s.respond_to?(name) } || super
47
+ end
44
48
 
45
- responded || super
49
+ # Kernel#warn is defined by Ruby
50
+ def warn(*args, &block)
51
+ method_missing("warn", *args, &block)
46
52
  end
47
53
 
48
54
  private
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logcast
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Davidovitz
8
8
  - Michael Grosser
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-07 00:00:00.000000000 Z
12
+ date: 2021-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -39,7 +39,7 @@ dependencies:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
- description: Broadcasts logs, including support for Rails version 2.3 through 3.2.
42
+ description: Broadcasts logs, including support for Rails version 4.2.
43
43
  email:
44
44
  - support@zendesk.com
45
45
  executables: []
@@ -53,7 +53,7 @@ homepage: http://developer.zendesk.com
53
53
  licenses:
54
54
  - Apache License Version 2.0
55
55
  metadata: {}
56
- post_install_message:
56
+ post_install_message:
57
57
  rdoc_options: []
58
58
  require_paths:
59
59
  - lib
@@ -68,9 +68,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  - !ruby/object:Gem::Version
69
69
  version: 1.3.6
70
70
  requirements: []
71
- rubyforge_project:
72
- rubygems_version: 2.2.0.rc.1
73
- signing_key:
71
+ rubygems_version: 3.0.3.1
72
+ signing_key:
74
73
  specification_version: 4
75
74
  summary: Log Broadcaster
76
75
  test_files: []