sidekiq-statsd 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/.yardopts +1 -1
  2. data/README.md +8 -4
  3. data/lib/sidekiq/statsd/client.rb +10 -10
  4. data/lib/sidekiq/statsd/server_middleware.rb +8 -9
  5. data/lib/sidekiq/statsd/version.rb +1 -1
  6. data/spec/sidekiq/statsd/client_spec.rb +6 -6
  7. data/spec/spec_helper.rb +1 -0
  8. data/vendor/ruby/1.9.1/bin/yard +1 -1
  9. data/vendor/ruby/1.9.1/bin/yardoc +1 -1
  10. data/vendor/ruby/1.9.1/bin/yri +1 -1
  11. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/default_factory.rb +176 -0
  12. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/default_tag.rb +12 -0
  13. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/directives.rb +595 -0
  14. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/library.rb +630 -0
  15. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/option_tag.rb +12 -0
  16. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/overload_tag.rb +65 -0
  17. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/ref_tag.rb +7 -0
  18. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/ref_tag_list.rb +27 -0
  19. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/tag.rb +57 -0
  20. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/tag_format_error.rb +6 -0
  21. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/tags/default_factory_spec.rb +152 -0
  22. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/tags/default_tag_spec.rb +11 -0
  23. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/tags/directives_spec.rb +436 -0
  24. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/tags/library_spec.rb +34 -0
  25. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/tags/overload_tag_spec.rb +53 -0
  26. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/tags/ref_tag_list_spec.rb +53 -0
  27. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/html/example.erb +11 -0
  28. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/html/index.erb +3 -0
  29. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/html/option.erb +24 -0
  30. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/html/overload.erb +14 -0
  31. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/html/see.erb +8 -0
  32. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/html/tag.erb +20 -0
  33. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/setup.rb +55 -0
  34. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/text/example.erb +12 -0
  35. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/text/index.erb +1 -0
  36. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/text/option.erb +20 -0
  37. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/text/overload.erb +19 -0
  38. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/text/see.erb +11 -0
  39. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/text/tag.erb +13 -0
  40. data/vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/guide/tags/html/setup.rb +8 -0
  41. metadata +34 -4
@@ -0,0 +1,55 @@
1
+ def init
2
+ tags = Tags::Library.visible_tags - [:abstract, :deprecated, :note, :todo]
3
+ create_tag_methods(tags - [:example, :option, :overload, :see])
4
+ sections :index, tags.map {|t| t.to_s.gsub('.', '_').to_sym }
5
+ sections.any(:overload).push(T('docstring'))
6
+ end
7
+
8
+ def return
9
+ if object.type == :method
10
+ return if object.constructor?
11
+ return if object.tags(:return).size == 1 && object.tag(:return).types == ['void']
12
+ end
13
+ tag(:return)
14
+ end
15
+
16
+ def param
17
+ tag(:param) if object.type == :method
18
+ end
19
+
20
+ private
21
+
22
+ def tag(name, opts = nil)
23
+ return unless object.has_tag?(name)
24
+ opts ||= options_for_tag(name)
25
+ @no_names = true if opts[:no_names]
26
+ @no_types = true if opts[:no_types]
27
+ @name = name
28
+ out = erb('tag')
29
+ @no_names, @no_types = nil, nil
30
+ out
31
+ end
32
+
33
+ def create_tag_methods(tags)
34
+ tags.each do |tag|
35
+ tag_meth = tag.to_s.gsub('.', '_')
36
+ next if respond_to?(tag_meth)
37
+ instance_eval(<<-eof, __FILE__, __LINE__ + 1)
38
+ def #{tag_meth}; tag(#{tag.inspect}) end
39
+ eof
40
+ end
41
+ end
42
+
43
+ def options_for_tag(tag)
44
+ opts = {:no_types => true, :no_names => true}
45
+ case Tags::Library.factory_method_for(tag)
46
+ when :with_types
47
+ opts[:no_types] = false
48
+ when :with_types_and_name
49
+ opts[:no_types] = false
50
+ opts[:no_names] = false
51
+ when :with_name
52
+ opts[:no_names] = false
53
+ end
54
+ opts
55
+ end
@@ -0,0 +1,12 @@
1
+ <% if object.has_tag?(:example) %>
2
+
3
+ Examples:
4
+ ---------
5
+
6
+ <% object.tags(:example).each_with_index do |tag, i| %>
7
+ <%= indent("# " + tag.name + "\n") if tag.name %>
8
+ <%= indent(format_source(tag.text)) + "\n" %>
9
+ <%= "\n" if i < object.tags(:example).size - 1 %>
10
+ <% end %>
11
+ <% end %>
12
+
@@ -0,0 +1,20 @@
1
+ <% if object.has_tag?(:option) %>
2
+ <% object.parameters.each do |param, default| %>
3
+ <% tags = object.tags(:option).select {|x| x.name.to_s == param.to_s } %>
4
+ <% next if tags.empty? %>
5
+ Options Hash (<%= param %>):
6
+ --------------<%= hr(param.to_s.length) %>--
7
+
8
+ <% for tag in tags %>
9
+ <% text = "" %>
10
+ <% text += format_types(tag.pair.types || ['Object']) %>
11
+ <% text += " " + tag.pair.name.to_s %>
12
+ <% if tag.pair.defaults %>
13
+ <% text += " - default: " + tag.pair.defaults.join(", ") %>
14
+ <% end %>
15
+ <% text += " - " + tag.pair.text if tag.pair.text %>
16
+ <%= indent(wrap(text)) %>
17
+
18
+ <% end %>
19
+ <% end %>
20
+ <% end %>
@@ -0,0 +1,19 @@
1
+ <% if object.tags(:overload).size == 1 %>
2
+ <%= wrap(yieldall(:object => object.tag(:overload))) %>
3
+ <% elsif object.has_tag?(:overload) %>
4
+ Overloads:
5
+ ----------
6
+
7
+ <% object.tags(:overload).each do |overload| %>
8
+ <% if overload.tags.size > 0 %>
9
+ <%= hr %>
10
+
11
+ <%= indent signature(overload) %>
12
+
13
+ <%= hr %>
14
+
15
+ <%= indent(wrap(yieldall(:object => overload))) %>
16
+
17
+ <% end %>
18
+ <% end %>
19
+ <% end %>
@@ -0,0 +1,11 @@
1
+ <% if object.has_tag?(:see) %>
2
+ See Also:
3
+ ---------
4
+
5
+ <% for tag in object.tags(:see) %>
6
+ <% text = "- " + tag.name %>
7
+ <% text += " - " + tag.text if tag.text && !tag.text.empty? %>
8
+ <%= indent(wrap(text)) %>
9
+ <% end %>
10
+ <% end %>
11
+
@@ -0,0 +1,13 @@
1
+ <% title = @label ? @label : YARD::Tags::Library.labels[@name] %>
2
+ <%= title %>:
3
+ <%= hr(title.length) %>-
4
+
5
+ <% object.tags(@name).each do |tag| %>
6
+ <% text = "" %>
7
+ <% text += format_types(tag.types) + " " unless @no_types || tag.types.nil? %>
8
+ <% text += tag.name.to_s + " " unless @no_names %>
9
+ <% text += "- " unless @no_names && @no_types %>
10
+ <% text += tag.text if tag.text && !tag.text.empty? %>
11
+ <%= indent wrap(text) %>
12
+
13
+ <% end %>
@@ -0,0 +1,8 @@
1
+ include T('default/tags/html')
2
+
3
+ def init
4
+ super
5
+ [:since, :see, :return].each do |section|
6
+ sections[:index].delete(section)
7
+ end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-statsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-09 00:00:00.000000000 Z
12
+ date: 2013-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -3034,6 +3034,16 @@ files:
3034
3034
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/server/templates/doc_server/search/html/search.erb
3035
3035
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/server/templates/doc_server/search/html/setup.rb
3036
3036
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/server/webrick_adapter.rb
3037
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/default_factory.rb
3038
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/default_tag.rb
3039
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/directives.rb
3040
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/library.rb
3041
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/option_tag.rb
3042
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/overload_tag.rb
3043
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/ref_tag.rb
3044
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/ref_tag_list.rb
3045
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/tag.rb
3046
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/tags/tag_format_error.rb
3037
3047
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/templates/engine.rb
3038
3048
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/templates/erb_cache.rb
3039
3049
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/templates/helpers/base_helper.rb
@@ -3189,6 +3199,12 @@ files:
3189
3199
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/server/webrick_servlet_spec.rb
3190
3200
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/server_spec.rb
3191
3201
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/spec_helper.rb
3202
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/tags/default_factory_spec.rb
3203
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/tags/default_tag_spec.rb
3204
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/tags/directives_spec.rb
3205
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/tags/library_spec.rb
3206
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/tags/overload_tag_spec.rb
3207
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/tags/ref_tag_list_spec.rb
3192
3208
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/templates/class_spec.rb
3193
3209
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/templates/constant_spec.rb
3194
3210
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/spec/templates/engine_spec.rb
@@ -3329,6 +3345,19 @@ files:
3329
3345
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/root/dot/child.erb
3330
3346
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/root/dot/setup.rb
3331
3347
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/root/html/setup.rb
3348
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/html/example.erb
3349
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/html/index.erb
3350
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/html/option.erb
3351
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/html/overload.erb
3352
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/html/see.erb
3353
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/html/tag.erb
3354
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/setup.rb
3355
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/text/example.erb
3356
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/text/index.erb
3357
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/text/option.erb
3358
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/text/overload.erb
3359
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/text/see.erb
3360
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/default/tags/text/tag.erb
3332
3361
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/guide/class/html/setup.rb
3333
3362
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/guide/docstring/html/setup.rb
3334
3363
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/guide/fulldoc/html/css/style.css
@@ -3344,6 +3373,7 @@ files:
3344
3373
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/guide/onefile/html/files.erb
3345
3374
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/guide/onefile/html/setup.rb
3346
3375
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/guide/onefile/html/toc.erb
3376
+ - vendor/ruby/1.9.1/gems/yard-0.8.6.1/templates/guide/tags/html/setup.rb
3347
3377
  - vendor/ruby/1.9.1/gems/yard-0.8.6.1/yard.gemspec
3348
3378
  - vendor/ruby/1.9.1/specifications/activesupport-3.2.13.gemspec
3349
3379
  - vendor/ruby/1.9.1/specifications/celluloid-0.14.0.gemspec
@@ -3398,7 +3428,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
3398
3428
  version: '0'
3399
3429
  segments:
3400
3430
  - 0
3401
- hash: -2616668490999446890
3431
+ hash: -807555301570693707
3402
3432
  required_rubygems_version: !ruby/object:Gem::Requirement
3403
3433
  none: false
3404
3434
  requirements:
@@ -3407,7 +3437,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
3407
3437
  version: '0'
3408
3438
  segments:
3409
3439
  - 0
3410
- hash: -2616668490999446890
3440
+ hash: -807555301570693707
3411
3441
  requirements: []
3412
3442
  rubyforge_project:
3413
3443
  rubygems_version: 1.8.25