Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Update to work with Bundler & Rails 3.0 and make easier to apply #1

Open
wants to merge 29 commits into from

5 participants

Mat Ellis Jason Amster Jon Frisby Noah Lorang Naseem Hakim
Mat Ellis

Hello

Thanks for developing resque-statsd. We had some difficulty using this with Rails 3.0 & Bundler. Specifically, the way we had to use environment variables meant we couldn't simply add extend Resque::Plugins::Statsd in the right places like we do with other extensions because the initializer hadn't run yet.

Our patch doesn't work with Rails 2.x, it would need to be adjusted to try both ENV['RAILS_ENV'] as well as Rails.env.

Thanks

Mat & Jon

MrJoy and others added some commits
Jon Frisby MrJoy Changing to lazy-instantiation model, so we can switch to a more robu…
…st configuration model.
c7d0793
Jon Frisby MrJoy Adding the gemspec... 6c8ef63
Jon Frisby MrJoy Hoisting defaults, adding env-search, fixing stupid. e1b9d27
Jon Frisby MrJoy Making config actually work properly.
Using a separate helper class to avoid weirdness with module lifecycle (yes yes, I need to learn how that aspect of Ruby works in more depth.).
1156393
Mat Ellis matellis Updated readme af6e780
Jason Amster
Owner

Thanks for contributing! I've actually lost my statsd/graphite setup due to a cloud server failure and my lack of time to get it back up, so I haven't messed around with it for quite some time. But, you've given me incentive to get it back up and test all this. Super busy this week, hope to get it in this weekend and I'll happily merge your commits.

Cheers,
Jason

Mat Ellis
Jason Amster
Owner

Yep, if you have that script handy, that would be great!

Mat Ellis
Jason Amster
Owner

didn't see an attachment. was there one? (never used puppet before, is it like ruby gems where it will pull from a centralized source?)

Mat Ellis
noahhl and others added some commits
Noah Lorang noahhl Add a before_perform_statsd method 27a8797
Jon Frisby MrJoy Namespace things a bit.
(So if you're tracking something BESIDES Resque jobs in your app, you don't get frustrated...)
145f99f
Noah Lorang noahhl Add a gemspec 7953b8c
Naseem Hakim naseem Logging split by job as well as queue in statsd 0885070
Naseem Hakim naseem resque is the default namespace, so removing from module 8614020
Naseem Hakim naseem Adding some monkey patching to monitor time spent in queue. d095825
Naseem Hakim naseem updating instructions to include require in initializer 2f9a1aa
Naseem Hakim naseem typo 0c05d0c
Naseem Hakim naseem Making this monkey patch work with a similar one adding functionality…
… to the same Resque.push function

Old code was getting over-written by the last-included module monkey-patch
d1c6ff3
Noah Lorang noahhl Add a before_perform_statsd method
(Updated to match new queue/job-name split, etc.)

Conflicts:

	lib/resque/plugins/statsd.rb
8e1e256
Jon Frisby MrJoy Updating dependencies. 872ae18
Jon Frisby MrJoy Tidying up whitespace cruft. b4623a0
Jon Frisby MrJoy Merge with '--strategy ours' to hide commits on GH fork view. c233240
Jon Frisby MrJoy Tabs to spaces. 36641d7
Jon Frisby MrJoy Swallowing errors so statsd issues don't take down your app. b48d536
Jon Frisby MrJoy Quarantine ourselves. 0cb40c2
Jon Frisby MrJoy Letting dependencies float, and removing explicit bundler dep as that…
…'s just silly.
4f300a3
Jon Frisby MrJoy Updating dependencies. 0840e19
Jon Frisby MrJoy Freshening gemspec via new Jeweler build. cfb25af
Jon Frisby MrJoy Bumping version to reflect all the shiny little tidy-ups happening here. 85a4f43
Jon Frisby MrJoy Updating authorship so people using our fork know who to kvetch at. 7e72ae9
Jon Frisby MrJoy Tidying up, and skipping a few files that don't belong in the gem. cbc7783
Jon Frisby MrJoy While we're at it, what is the point of including the test suite in t…
…he gem?

It just bloats deployments and doesn't actually make it easy/feasible to run the
tests out of the gems anyway.

So, if you wanna run the tests (if/when they ever exist) -- clone the repo.
27ab1ae
Jon Frisby MrJoy Updating gemspec. a07359e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 29 unique commits by 4 authors.

Aug 25, 2011
Jon Frisby MrJoy Changing to lazy-instantiation model, so we can switch to a more robu…
…st configuration model.
c7d0793
Jon Frisby MrJoy Adding the gemspec... 6c8ef63
Jon Frisby MrJoy Hoisting defaults, adding env-search, fixing stupid. e1b9d27
Jon Frisby MrJoy Making config actually work properly.
Using a separate helper class to avoid weirdness with module lifecycle (yes yes, I need to learn how that aspect of Ruby works in more depth.).
1156393
Mat Ellis matellis Updated readme af6e780
Oct 06, 2011
Noah Lorang noahhl Add a before_perform_statsd method 27a8797
Oct 25, 2011
Jon Frisby MrJoy Namespace things a bit.
(So if you're tracking something BESIDES Resque jobs in your app, you don't get frustrated...)
145f99f
Nov 09, 2011
Noah Lorang noahhl Add a gemspec 7953b8c
Nov 17, 2011
Naseem Hakim naseem Logging split by job as well as queue in statsd 0885070
Naseem Hakim naseem resque is the default namespace, so removing from module 8614020
Nov 28, 2011
Naseem Hakim naseem Adding some monkey patching to monitor time spent in queue. d095825
Naseem Hakim naseem updating instructions to include require in initializer 2f9a1aa
Naseem Hakim naseem typo 0c05d0c
Nov 29, 2011
Naseem Hakim naseem Making this monkey patch work with a similar one adding functionality…
… to the same Resque.push function

Old code was getting over-written by the last-included module monkey-patch
d1c6ff3
Dec 28, 2011
Noah Lorang noahhl Add a before_perform_statsd method
(Updated to match new queue/job-name split, etc.)

Conflicts:

	lib/resque/plugins/statsd.rb
8e1e256
Jon Frisby MrJoy Updating dependencies. 872ae18
Jon Frisby MrJoy Tidying up whitespace cruft. b4623a0
Jon Frisby MrJoy Merge with '--strategy ours' to hide commits on GH fork view. c233240
Mar 23, 2012
Jon Frisby MrJoy Tabs to spaces. 36641d7
Jon Frisby MrJoy Swallowing errors so statsd issues don't take down your app. b48d536
Jon Frisby MrJoy Quarantine ourselves. 0cb40c2
Jon Frisby MrJoy Letting dependencies float, and removing explicit bundler dep as that…
…'s just silly.
4f300a3
Jon Frisby MrJoy Updating dependencies. 0840e19
Jon Frisby MrJoy Freshening gemspec via new Jeweler build. cfb25af
Jon Frisby MrJoy Bumping version to reflect all the shiny little tidy-ups happening here. 85a4f43
Jon Frisby MrJoy Updating authorship so people using our fork know who to kvetch at. 7e72ae9
Jon Frisby MrJoy Tidying up, and skipping a few files that don't belong in the gem. cbc7783
Jon Frisby MrJoy While we're at it, what is the point of including the test suite in t…
…he gem?

It just bloats deployments and doesn't actually make it easy/feasible to run the
tests out of the gems anyway.

So, if you wanna run the tests (if/when they ever exist) -- clone the repo.
27ab1ae
Jon Frisby MrJoy Updating gemspec. a07359e
This page is out of date. Refresh to see the latest.
2  .document
... ... @@ -1,5 +1,5 @@
1 1 lib/**/*.rb
2 2 bin/*
3   --
  3 +-
4 4 features/**/*.feature
5 5 LICENSE.txt
2  .gitignore
@@ -14,7 +14,7 @@ doc
14 14 # jeweler generated
15 15 pkg
16 16
17   -# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
  17 +# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
18 18 #
19 19 # * Create a file at ~/.gitignore
20 20 # * Include files you want ignored
1  .rvmrc
... ... @@ -0,0 +1 @@
  1 +rvm use ruby-1.9.2-p290@resque-statsd
9 Gemfile
@@ -6,11 +6,10 @@ source "http://rubygems.org"
6 6 # Add dependencies to develop your gem here.
7 7 # Include everything needed to run rake, tests, features, etc.
8 8 group :development do
9   - # gem "rspec", "~> 2.3.0"
10   - gem "yard", "~> 0.6.0"
11   - gem "bundler", "~> 1.0.0"
12   - gem "jeweler", "~> 1.5.2"
  9 + # gem "rspec"
  10 + gem "yard"
  11 + gem "jeweler"
13 12 # gem "rcov", ">= 0"
14 13 end
15 14
16   -gem 'jamster-statsd'
  15 +gem 'jamster-statsd'
17 Gemfile.lock
@@ -3,18 +3,21 @@ GEM
3 3 specs:
4 4 git (1.2.5)
5 5 jamster-statsd (0.1.0)
6   - jeweler (1.5.2)
7   - bundler (~> 1.0.0)
  6 + jeweler (1.8.3)
  7 + bundler (~> 1.0)
8 8 git (>= 1.2.5)
9 9 rake
10   - rake (0.8.7)
11   - yard (0.6.5)
  10 + rdoc
  11 + json (1.6.5)
  12 + rake (0.9.2.2)
  13 + rdoc (3.12)
  14 + json (~> 1.4)
  15 + yard (0.7.5)
12 16
13 17 PLATFORMS
14 18 ruby
15 19
16 20 DEPENDENCIES
17   - bundler (~> 1.0.0)
18 21 jamster-statsd
19   - jeweler (~> 1.5.2)
20   - yard (~> 0.6.0)
  22 + jeweler
  23 + yard
51 README.mdown
Source Rendered
@@ -3,8 +3,8 @@
3 3 Resque Statsd is a Resque plugin that will collect and send data samples from your Resque Jobs. It samples 4 statistics for any Job for which the plugin extends, enqueue count, completion count, failure count, and the time to process. It will monitor for each specific job, in addition to the totals for all jobs (not including timing stats)
4 4
5 5 ## CURRENT STATUS
6   -
7   -Tests on the way, but being used in production already
  6 +
  7 +This is a fork of jamster's original gem designed to make it easier to run with Bundler and Rails 3.0.
8 8
9 9 ## Final Outcome
10 10
@@ -16,21 +16,40 @@ Tests on the way, but being used in production already
16 16
17 17 ### Install
18 18
19   - gem install resque-statsd
20   - gem install jamster-statsd # really jnunemaker's version of the statsd rubygem
21   -
  19 +Add this to your Gemfile:
  20 +
  21 + gem "resque-statsd", :git => "git://github.com/cloudability/resque-statsd.git"
  22 +
22 23 ### Rails Setup
23 24
24   -in an initializer, set up the Statsd
  25 +in an initializer, set up the Statsd
  26 +
  27 + touch config/initializers/resque-statsd.rb
25 28
26   - touch config/initializers/resque-statsd.rb
27   -
28 29 in file add code
29 30
30   - ENV['GRAPHITE_HOST'] = 'graphite.YOURHOST.com'
31   - ENV['APP_NAME'] = 'YOURAPPNAME_resque' # I add the _resque to separate against web stats
32   - require 'resque-statsd' # Needs to come after the ENV variable setting
33   -
  31 + require 'enqueue_time'
  32 +
  33 + module Resque
  34 + include Resque::EnqueueTime
  35 + end
  36 +
  37 + StatsdHelper.graphite_host = 'graphite.YOUR_HOST.com'
  38 + StatsdHelper.namespace = "YOUR_APP.#{Rails.env.development? ? ENV['USER'] : Rails.env}.resque"
  39 +
  40 +Change `YOUR_HOST` and `YOUR_APP` accordingly.
  41 +
  42 +### In Your Code
  43 +
  44 +Extend your class like this:
  45 +
  46 + class MyJob
  47 + extend Resque::Plugins::Statsd
  48 + def self.perform(*payload)
  49 + # ..
  50 + end
  51 + end
  52 +
34 53 ## Background Reading
35 54
36 55 ### Graphite
@@ -39,7 +58,7 @@ http://graphite.wikidot.com/
39 58
40 59 ### StatsD Comes From Etsy
41 60
42   -The folks at Etsy (kastner) have come up with a neat node.js app to listen for Graphite stats.
  61 +The folks at Etsy (kastner) have come up with a neat node.js app to listen for Graphite stats.
43 62
44 63 * http://codeascraft.etsy.com/2010/12/08/track-every-release/
45 64 * http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/
@@ -47,14 +66,14 @@ The folks at Etsy (kastner) have come up with a neat node.js app to listen for G
47 66
48 67 ### Ruby StatsD Client
49 68
50   -I've required a particular version (jnunemaker's) of the ruby StatsD client
  69 +I've required a particular version (jnunemaker's) of the ruby StatsD client
51 70 Read the post here
52   -
  71 +
53 72 * http://railstips.org/blog/archives/2011/03/21/hi-my-name-is-john/
54 73 * A Ruby statsd client (https://github.com/etsy/statsd)
55 74
56 75 ## Contributing to resque-statsd
57   -
  76 +
58 77 * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
59 78 * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
60 79 * Fork the project
26 Rakefile
@@ -11,18 +11,20 @@ require 'rake'
11 11
12 12 require 'jeweler'
13 13 Jeweler::Tasks.new do |gem|
14   - # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15 14 gem.name = "resque-statsd"
16   - gem.homepage = "http://github.com/jamster/resque-statsd"
  15 + gem.homepage = "http://github.com/cloudability/resque-statsd"
17 16 gem.license = "MIT"
18 17 gem.summary = %Q{Adds simple counters and timers for statsd into your Resque jobs}
19 18 gem.description = %Q{Will add a counter for enqueuing, performing, failing and timing Jobs}
20   - gem.email = "jayamster@gmail.com"
21   - gem.authors = ["Jason Amster"]
22   - # Include your dependencies below. Runtime dependencies are required when using your gem,
23   - # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24   - # gem.add_runtime_dependency 'jabber4r', '> 0.1'
25   - # gem.add_development_dependency 'rspec', '> 1.2.3'
  19 + gem.email = "engineering@cloudability.com"
  20 + gem.authors = ["Jon Frisby", "Jason Amster"]
  21 + gem.require_path = 'lib'
  22 +
  23 + gem.files.reject! do |fn|
  24 + fn =~ /^\.(rvmrc|rspec|document|gitignore)$/ ||
  25 + fn =~ /^VERSION$/ ||
  26 + fn =~ /^(spec|features)\//
  27 + end
26 28 end
27 29 Jeweler::RubygemsDotOrgTasks.new
28 30
@@ -31,13 +33,13 @@ Jeweler::RubygemsDotOrgTasks.new
31 33 # RSpec::Core::RakeTask.new(:spec) do |spec|
32 34 # spec.pattern = FileList['spec/**/*_spec.rb']
33 35 # end
34   -#
  36 +#
35 37 # RSpec::Core::RakeTask.new(:rcov) do |spec|
36 38 # spec.pattern = 'spec/**/*_spec.rb'
37 39 # spec.rcov = true
38 40 # end
39   -#
  41 +#
40 42 # task :default => :spec
41 43
42   -require 'yard'
43   -YARD::Rake::YardocTask.new
  44 +# require 'yard'
  45 +# YARD::Rake::YardocTask.new
2  VERSION
... ... @@ -1 +1 @@
1   -0.0.1
  1 +0.0.4
49 lib/enqueue_time.rb
... ... @@ -0,0 +1,49 @@
  1 +# Monkey-patch to record queue length since resque doesn't have hooks that give access to the
  2 +# redis stored object, so we can add metadata
  3 +# Ideal solution: contribute to the resque project to add hooks for the push and perform action:
  4 +# https://github.com/defunkt/resque/issues/464
  5 +
  6 +module Resque
  7 + module EnqueueTime
  8 +
  9 + def self.included(base)
  10 + base.class_eval do
  11 + alias_method :push_without_enqueued_at, :push
  12 + # Wrapper for the original Resque push method, which adds
  13 + # enqueued_at time
  14 + def push(queue, item)
  15 + begin
  16 + if item.respond_to?(:[]=)
  17 + item[:enqueued_at] = Time.now
  18 + end
  19 + rescue Exception => e
  20 + Rails.logger.error "Error in Resque::EnqueueTime: #{e.message}"
  21 + end
  22 + push_without_enqueued_at queue, item
  23 + end
  24 + end
  25 + end
  26 +
  27 + end
  28 +end
  29 +
  30 +
  31 +module Resque
  32 + class Job
  33 + alias_method :perform_without_enqueue_time, :perform
  34 +
  35 + def perform
  36 + begin
  37 + if payload['enqueued_at']
  38 + queue_time = (Time.now - DateTime.parse(payload['enqueued_at'])) * 1000.0
  39 + StatsdHelper.statsd.timing("queues.#{queue}.queue_time", queue_time)
  40 + StatsdHelper.statsd.timing("total.queue_time", queue_time)
  41 + end
  42 + rescue Exception => e
  43 + Rails.logger.error "Error in Resque::EnqueueTime in recording queue_time in statsd: #{e.message}"
  44 + end
  45 + perform_without_enqueue_time
  46 + end
  47 +
  48 + end
  49 +end
39 lib/resque-statsd.rb
... ... @@ -1,18 +1,43 @@
1 1 require 'rubygems'
2   -require 'statsd' # Really Jnunemakers's mine branch of statsd
  2 +require 'statsd' # Really Jnunemakers's mine branch of statsd
3 3 require 'resque/plugins/statsd'
4 4
5   -# Set up the client
6   -$resque_statsd = Statsd.new(ENV['GRAPHITE_HOST'], 8125)
7   -$resque_statsd.namespace="#{ENV['APP_NAME']}_#{ENV['RAILS_ENV']}.resque"
  5 +class StatsdHelper
  6 + def self.graphite_host
  7 + return @graphite_host || ENV['GRAPHITE_HOST'] || 'localhost'
  8 + end
  9 + def self.graphite_host=(val)
  10 + @graphite_host = val
  11 + end
  12 +
  13 + def self.graphite_port
  14 + return @graphite_port || ENV['GRAPHITE_PORT'] || 8125
  15 + end
  16 + def self.graphite_port=(val)
  17 + @graphite_port = val
  18 + end
  19 +
  20 + def self.namespace
  21 + return @namespace || ENV['GRAPHITE_NAMESPACE'] || 'resque'
  22 + end
  23 + def self.namespace=(val)
  24 + @namespace = val
  25 + end
8 26
  27 + # Set up the client lazily, to minimize order-of-operations headaches.
  28 + def self.statsd
  29 + if(@stats.nil?)
  30 + @statsd = Statsd.new(graphite_host, graphite_port)
  31 + @statsd.namespace = namespace
  32 + end
  33 + return @statsd
  34 + end
  35 +end
9 36
10 37 module Resque
11 38 module Plugins
12 39 module Statsd
13   -
14   - VERSION = "0.0.1"
15   -
  40 + VERSION = "0.0.4"
16 41 end
17 42 end
18 43 end
77 lib/resque/plugins/statsd.rb
... ... @@ -1,29 +1,78 @@
1 1 module Resque
2 2 module Plugins
3 3 module Statsd
4   -
5 4 def after_enqueue_statsd(*args)
6   - $resque_statsd.increment("#{@queue}.enqueued")
7   - $resque_statsd.increment("total.enqueued")
8   -
  5 + StatsdHelper.statsd.increment("queues.#{@queue}.enqueued")
  6 + StatsdHelper.statsd.increment("jobs.#{self.name}.enqueued")
  7 + StatsdHelper.statsd.increment("total.enqueued")
  8 + rescue SocketError => se
  9 + # Common cause of this is failure of getaddrinfo (I.E. can't route to
  10 + # statsd server or some such). This may happen in development, when
  11 + # your net connection isn't in a good way, for example.
  12 + #
  13 + # Ignoring this because we don't want unreachability of statsd to
  14 + # impair the ability of an app to actually operate.
  15 + end
  16 +
  17 + def before_perform_statsd(*args)
  18 + StatsdHelper.statsd.increment("queues.#{@queue}.started")
  19 + StatsdHelper.statsd.increment("jobs.#{self.name}.started")
  20 + StatsdHelper.statsd.increment("total.started")
  21 + rescue SocketError => se
  22 + # Common cause of this is failure of getaddrinfo (I.E. can't route to
  23 + # statsd server or some such). This may happen in development, when
  24 + # your net connection isn't in a good way, for example.
  25 + #
  26 + # Ignoring this because we don't want unreachability of statsd to
  27 + # impair the ability of an app to actually operate.
9 28 end
10   -
  29 +
11 30 def after_perform_statsd(*args)
12   - $resque_statsd.increment("#{@queue}.finished")
13   - $resque_statsd.increment("total.finished")
  31 + StatsdHelper.statsd.increment("queues.#{@queue}.finished")
  32 + StatsdHelper.statsd.increment("jobs.#{self.name}.finished")
  33 + StatsdHelper.statsd.increment("total.finished")
  34 + rescue SocketError => se
  35 + # Common cause of this is failure of getaddrinfo (I.E. can't route to
  36 + # statsd server or some such). This may happen in development, when
  37 + # your net connection isn't in a good way, for example.
  38 + #
  39 + # Ignoring this because we don't want unreachability of statsd to
  40 + # impair the ability of an app to actually operate.
14 41 end
15   -
  42 +
16 43 def on_failure_statsd(*args)
17   - $resque_statsd.increment("#{@queue}.failed")
18   - $resque_statsd.increment("total.failed")
  44 + StatsdHelper.statsd.increment("queues.#{@queue}.failed")
  45 + StatsdHelper.statsd.increment("jobs.#{self.name}.failed")
  46 + StatsdHelper.statsd.increment("total.failed")
  47 + rescue SocketError => se
  48 + # Common cause of this is failure of getaddrinfo (I.E. can't route to
  49 + # statsd server or some such). This may happen in development, when
  50 + # your net connection isn't in a good way, for example.
  51 + #
  52 + # Ignoring this because we don't want unreachability of statsd to
  53 + # impair the ability of an app to actually operate.
19 54 end
20   -
  55 +
21 56 def around_perform_statsd(*args)
22   - $resque_statsd.time("#{@queue}.processed") do
23   - yield
  57 + # We don't want to swallow a SocketError if it didn't actually come
  58 + # from our attempts to talk to statsd.
  59 + failure_is_in_app = true
  60 + StatsdHelper.statsd.time("queues.#{@queue}.processed") do
  61 + StatsdHelper.statsd.time("jobs.#{self.name}.processed") do
  62 + yield
  63 + failure_is_in_app = false
  64 + end
24 65 end
  66 + rescue SocketError => se
  67 + # Common cause of this is failure of getaddrinfo (I.E. can't route to
  68 + # statsd server or some such). This may happen in development, when
  69 + # your net connection isn't in a good way, for example.
  70 + #
  71 + # Ignoring this iff it's statsd-related because we don't want
  72 + # unreachability of statsd to impair the ability of an app to actually
  73 + # operate.
  74 + raise se if(failure_is_in_app)
25 75 end
26   -
27 76 end
28 77 end
29 78 end
54 resque-statsd.gemspec
... ... @@ -0,0 +1,54 @@
  1 +# Generated by jeweler
  2 +# DO NOT EDIT THIS FILE DIRECTLY
  3 +# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
  4 +# -*- encoding: utf-8 -*-
  5 +
  6 +Gem::Specification.new do |s|
  7 + s.name = "resque-statsd"
  8 + s.version = "0.0.4"
  9 +
  10 + s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
  11 + s.authors = ["Jon Frisby", "Jason Amster"]
  12 + s.date = "2012-03-23"
  13 + s.description = "Will add a counter for enqueuing, performing, failing and timing Jobs"
  14 + s.email = "engineering@cloudability.com"
  15 + s.extra_rdoc_files = [
  16 + "LICENSE.txt",
  17 + "README.mdown"
  18 + ]
  19 + s.files = [
  20 + "Gemfile",
  21 + "Gemfile.lock",
  22 + "LICENSE.txt",
  23 + "README.mdown",
  24 + "Rakefile",
  25 + "lib/enqueue_time.rb",
  26 + "lib/resque-statsd.rb",
  27 + "lib/resque/plugins/statsd.rb",
  28 + "resque-statsd.gemspec"
  29 + ]
  30 + s.homepage = "http://github.com/cloudability/resque-statsd"
  31 + s.licenses = ["MIT"]
  32 + s.require_paths = ["lib"]
  33 + s.rubygems_version = "1.8.13"
  34 + s.summary = "Adds simple counters and timers for statsd into your Resque jobs"
  35 +
  36 + if s.respond_to? :specification_version then
  37 + s.specification_version = 3
  38 +
  39 + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
  40 + s.add_runtime_dependency(%q<jamster-statsd>, [">= 0"])
  41 + s.add_development_dependency(%q<yard>, [">= 0"])
  42 + s.add_development_dependency(%q<jeweler>, [">= 0"])
  43 + else
  44 + s.add_dependency(%q<jamster-statsd>, [">= 0"])
  45 + s.add_dependency(%q<yard>, [">= 0"])
  46 + s.add_dependency(%q<jeweler>, [">= 0"])
  47 + end
  48 + else
  49 + s.add_dependency(%q<jamster-statsd>, [">= 0"])
  50 + s.add_dependency(%q<yard>, [">= 0"])
  51 + s.add_dependency(%q<jeweler>, [">= 0"])
  52 + end
  53 +end
  54 +
2  spec/spec_helper.rb
@@ -8,5 +8,5 @@
8 8 Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9 9
10 10 RSpec.configure do |config|
11   -
  11 +
12 12 end

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.