graylog2-resque 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ - jruby-18mode # JRuby in 1.8 mode
7
+ - jruby-19mode # JRuby in 1.9 mode
8
+ - rbx-18mode
9
+ # - rbx-19mode
10
+ script: bundle exec rspec spec
data/CHANGELOG CHANGED
@@ -1,3 +1,12 @@
1
+ 0.5.1
2
+ -----
3
+
4
+ Merge pull request #1 from mogotest/master <bf17b32> [Matt Conway]
5
+ Properly scope the reference to the Stat class. <b0d007e> [Kevin Menard]
6
+ only auto start redis if not on CI <0010bd5> [Matt Conway]
7
+ disable rbx19 <d66ae57> [Matt Conway]
8
+ setup travis CI <a553e2b> [Matt Conway]
9
+
1
10
  0.5.0
2
11
  -----
3
12
 
@@ -63,7 +63,7 @@ module Graylog2
63
63
  def self.count
64
64
  # We can't get the total # of errors from graylog so we fake it
65
65
  # by asking Resque how many errors it has seen.
66
- Stat[:failed]
66
+ ::Resque::Stat[:failed]
67
67
  end
68
68
 
69
69
  end
@@ -1,5 +1,5 @@
1
1
  module Graylog2
2
2
  module Resque
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
4
4
  end
5
5
  end
@@ -21,7 +21,7 @@ daemonize yes
21
21
  pidfile ./redis.pid
22
22
 
23
23
  # Accept connections on the specified port, default is 6379
24
- port 9736
24
+ port 6379
25
25
 
26
26
  # If you want you can bind a single interface, if the bind option is not
27
27
  # specified all the interfaces will listen for incoming connections.
@@ -1,17 +1,29 @@
1
1
  require 'rspec'
2
2
  require 'graylog2-resque'
3
3
 
4
- spec_dir = File.dirname(File.expand_path(__FILE__))
5
- REDIS_CMD = "redis-server #{spec_dir}/redis-test.conf"
4
+ # No need to start redis when running in Travis
5
+ unless ENV['CI']
6
6
 
7
- puts "Starting redis for testing at localhost:9736..."
8
- puts `cd #{spec_dir}; #{REDIS_CMD}`
9
- Resque.redis = 'localhost:9736'
10
-
11
- # Schedule the redis server for shutdown when tests are all finished.
12
- at_exit do
13
- pid = File.read("#{spec_dir}/redis.pid").to_i rescue nil
14
- system ("kill #{pid}") if pid != 0
7
+ begin
8
+ Resque.queues
9
+ rescue Errno::ECONNREFUSED
10
+ spec_dir = File.dirname(File.expand_path(__FILE__))
11
+ REDIS_CMD = "redis-server #{spec_dir}/redis-test.conf"
12
+
13
+ puts "Starting redis for testing at localhost..."
14
+ puts `cd #{spec_dir}; #{REDIS_CMD}`
15
+
16
+ # Schedule the redis server for shutdown when tests are all finished.
17
+ at_exit do
18
+ puts 'Stopping redis'
19
+ pid = File.read("#{spec_dir}/redis.pid").to_i rescue nil
20
+ system ("kill -9 #{pid}") if pid.to_i != 0
21
+ File.delete("#{spec_dir}/redis.pid") rescue nil
22
+ File.delete("#{spec_dir}/redis-server.log") rescue nil
23
+ File.delete("#{spec_dir}/dump.rdb") rescue nil
24
+ end
25
+ end
26
+
15
27
  end
16
28
 
17
29
  ##
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graylog2-resque
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-26 00:00:00.000000000Z
12
+ date: 2012-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &2240396860 !ruby/object:Gem::Requirement
16
+ requirement: &70360966781160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2240396860
24
+ version_requirements: *70360966781160
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &2240396400 !ruby/object:Gem::Requirement
27
+ requirement: &70360966780480 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2240396400
35
+ version_requirements: *70360966780480
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: gelf
38
- requirement: &2240395960 !ruby/object:Gem::Requirement
38
+ requirement: &70360966779800 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2240395960
46
+ version_requirements: *70360966779800
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: resque
49
- requirement: &2240395480 !ruby/object:Gem::Requirement
49
+ requirement: &70360966778940 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2240395480
57
+ version_requirements: *70360966778940
58
58
  description: ! 'A resque failure handler that sends failures to the graylog2 log management
59
59
  facility '
60
60
  email:
@@ -64,6 +64,7 @@ extensions: []
64
64
  extra_rdoc_files: []
65
65
  files:
66
66
  - .gitignore
67
+ - .travis.yml
67
68
  - CHANGELOG
68
69
  - Gemfile
69
70
  - LICENSE
@@ -88,15 +89,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
89
  - - ! '>='
89
90
  - !ruby/object:Gem::Version
90
91
  version: '0'
92
+ segments:
93
+ - 0
94
+ hash: 3532665088592803414
91
95
  required_rubygems_version: !ruby/object:Gem::Requirement
92
96
  none: false
93
97
  requirements:
94
98
  - - ! '>='
95
99
  - !ruby/object:Gem::Version
96
100
  version: '0'
101
+ segments:
102
+ - 0
103
+ hash: 3532665088592803414
97
104
  requirements: []
98
105
  rubyforge_project: graylog2-resque
99
- rubygems_version: 1.8.10
106
+ rubygems_version: 1.8.15
100
107
  signing_key:
101
108
  specification_version: 3
102
109
  summary: A resque failure handler that sends failures to the graylog2 log management
@@ -105,4 +112,3 @@ test_files:
105
112
  - spec/redis-test.conf
106
113
  - spec/resque_failure_spec.rb
107
114
  - spec/spec_helper.rb
108
- has_rdoc: