smokesignal 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use 1.9.2-p290@resque-failure-campfire --create
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'tinder', '~> 1.8.0'
4
+ gem 'scoped_choices', '0.0.3'
5
+ gem 'resque', '~> 1.20.0'
6
+ group :development do
7
+ gem "bundler", "~> 1.0.0"
8
+ gem "jeweler", "~> 1.6.4"
9
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,71 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activesupport (3.2.2)
5
+ i18n (~> 0.6)
6
+ multi_json (~> 1.0)
7
+ addressable (2.2.7)
8
+ eventmachine (0.12.10)
9
+ faraday (0.7.6)
10
+ addressable (~> 2.2)
11
+ multipart-post (~> 1.1)
12
+ rack (~> 1.1)
13
+ faraday_middleware (0.7.0)
14
+ faraday (~> 0.7.3)
15
+ git (1.2.5)
16
+ hashie (1.2.0)
17
+ http_parser.rb (0.5.3)
18
+ i18n (0.6.0)
19
+ jeweler (1.6.4)
20
+ bundler (~> 1.0)
21
+ git (>= 1.2.5)
22
+ rake
23
+ mime-types (1.17.2)
24
+ multi_json (1.1.0)
25
+ multipart-post (1.1.5)
26
+ rack (1.4.1)
27
+ rack-protection (1.2.0)
28
+ rack
29
+ rake (0.9.2.2)
30
+ redis (2.2.2)
31
+ redis-namespace (1.0.3)
32
+ redis (< 3.0.0)
33
+ resque (1.20.0)
34
+ multi_json (~> 1.0)
35
+ redis-namespace (~> 1.0.2)
36
+ sinatra (>= 0.9.2)
37
+ vegas (~> 0.1.2)
38
+ scoped_choices (0.0.3)
39
+ hashie (>= 0.4.0)
40
+ simple_oauth (0.1.5)
41
+ sinatra (1.3.2)
42
+ rack (~> 1.3, >= 1.3.6)
43
+ rack-protection (~> 1.2)
44
+ tilt (~> 1.3, >= 1.3.3)
45
+ tilt (1.3.3)
46
+ tinder (1.8.0)
47
+ activesupport (>= 2.3, < 4)
48
+ eventmachine (~> 0.12)
49
+ faraday (>= 0.6, < 0.8)
50
+ faraday_middleware (>= 0.6, < 0.8)
51
+ hashie (~> 1.0)
52
+ mime-types (~> 1.16)
53
+ multi_json (~> 1.0)
54
+ multipart-post (~> 1.1)
55
+ twitter-stream (~> 0.1)
56
+ twitter-stream (0.1.14)
57
+ eventmachine (>= 0.12.8)
58
+ http_parser.rb (~> 0.5.1)
59
+ simple_oauth (~> 0.1.4)
60
+ vegas (0.1.11)
61
+ rack (>= 1.0.0)
62
+
63
+ PLATFORMS
64
+ ruby
65
+
66
+ DEPENDENCIES
67
+ bundler (~> 1.0.0)
68
+ jeweler (~> 1.6.4)
69
+ resque (~> 1.20.0)
70
+ scoped_choices (= 0.0.3)
71
+ tinder (~> 1.8.0)
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Samer Masry
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README ADDED
File without changes
data/README.rdoc ADDED
@@ -0,0 +1,19 @@
1
+ = resque-failure-campfire
2
+
3
+ Description goes here.
4
+
5
+ == Contributing to resque-failure-campfire
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
+ * Fork the project
10
+ * Start a feature/bugfix branch
11
+ * Commit and push until you are happy with your contribution
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2012 Samer Masry. See LICENSE.txt for
18
+ further details.
19
+
data/Rakefile ADDED
@@ -0,0 +1,46 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "smokesignal"
18
+ gem.homepage = "http://github.com/okl/smokesignal"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Campfire resque failure backend}
21
+ gem.description = %Q{Posts the resque failure messages to campfire}
22
+ gem.email = "samer@onekingslane.com"
23
+ gem.authors = ["Samer Masry"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rake/testtask'
29
+ Rake::TestTask.new(:test) do |test|
30
+ test.libs << 'lib' << 'test'
31
+ test.pattern = 'test/**/test_*.rb'
32
+ test.verbose = true
33
+ end
34
+
35
+
36
+ task :default => :test
37
+
38
+ require 'rdoc/task'
39
+ Rake::RDocTask.new do |rdoc|
40
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
41
+
42
+ rdoc.rdoc_dir = 'rdoc'
43
+ rdoc.title = "resque-failure-campfire #{version}"
44
+ rdoc.rdoc_files.include('README*')
45
+ rdoc.rdoc_files.include('lib/**/*.rb')
46
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.2
@@ -0,0 +1,14 @@
1
+ module Resque
2
+ module Failure
3
+ class Campfire < Base
4
+ def save
5
+ campfire = Tinder::Campfire.new(Rails.configuration.smokesignal.domain, :token => Rails.configuration.smokesignal.token)
6
+ room = campfire.find_or_create_room_by_name(Rails.configuration.smokesignal.room)
7
+ # todo work on body for paste
8
+ room.paste "RESQUE ERROR - queue: #{queue}\n" +
9
+ exception.message + "\n" +
10
+ exception.backtrace
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ require 'scoped_choices'
2
+ module Smokesignal
3
+ class Engine < Rails::Engine
4
+ initializer "my_engine.add_middleware" do |app|
5
+ app.config.from_file_with_scope "smokesignal.yml", "smokesignal"
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ require 'tinder'
2
+ require 'resque'
3
+ require 'resque/failure/campfire'
4
+
5
+ require 'smokesignal/engine'
@@ -0,0 +1,66 @@
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 = "smokesignal"
8
+ s.version = "0.0.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Samer Masry"]
12
+ s.date = "2012-03-06"
13
+ s.description = "Posts the resque failure messages to campfire"
14
+ s.email = "samer@onekingslane.com"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README",
18
+ "README.rdoc"
19
+ ]
20
+ s.files = [
21
+ ".rvmrc",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "lib/resque/failure/Campfire.rb",
30
+ "lib/smokesignal.rb",
31
+ "lib/smokesignal/engine.rb",
32
+ "smokesignal.gemspec",
33
+ "test/helper.rb",
34
+ "test/test_resque-failure-campfire.rb"
35
+ ]
36
+ s.homepage = "http://github.com/okl/smokesignal"
37
+ s.licenses = ["MIT"]
38
+ s.require_paths = ["lib"]
39
+ s.rubygems_version = "1.8.17"
40
+ s.summary = "Campfire resque failure backend"
41
+
42
+ if s.respond_to? :specification_version then
43
+ s.specification_version = 3
44
+
45
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
+ s.add_runtime_dependency(%q<tinder>, ["~> 1.8.0"])
47
+ s.add_runtime_dependency(%q<scoped_choices>, ["= 0.0.3"])
48
+ s.add_runtime_dependency(%q<resque>, ["~> 1.20.0"])
49
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
50
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
51
+ else
52
+ s.add_dependency(%q<tinder>, ["~> 1.8.0"])
53
+ s.add_dependency(%q<scoped_choices>, ["= 0.0.3"])
54
+ s.add_dependency(%q<resque>, ["~> 1.20.0"])
55
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
56
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
57
+ end
58
+ else
59
+ s.add_dependency(%q<tinder>, ["~> 1.8.0"])
60
+ s.add_dependency(%q<scoped_choices>, ["= 0.0.3"])
61
+ s.add_dependency(%q<resque>, ["~> 1.20.0"])
62
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
63
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
64
+ end
65
+ end
66
+
data/test/helper.rb ADDED
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'resque-failure-campfire'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestResqueFailureCampfire < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,117 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: smokesignal
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Samer Masry
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-03-06 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: tinder
16
+ requirement: &2156681400 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 1.8.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *2156681400
25
+ - !ruby/object:Gem::Dependency
26
+ name: scoped_choices
27
+ requirement: &2156680920 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - =
31
+ - !ruby/object:Gem::Version
32
+ version: 0.0.3
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *2156680920
36
+ - !ruby/object:Gem::Dependency
37
+ name: resque
38
+ requirement: &2156680440 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 1.20.0
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *2156680440
47
+ - !ruby/object:Gem::Dependency
48
+ name: bundler
49
+ requirement: &2156679960 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.0.0
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *2156679960
58
+ - !ruby/object:Gem::Dependency
59
+ name: jeweler
60
+ requirement: &2156679480 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ version: 1.6.4
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *2156679480
69
+ description: Posts the resque failure messages to campfire
70
+ email: samer@onekingslane.com
71
+ executables: []
72
+ extensions: []
73
+ extra_rdoc_files:
74
+ - LICENSE.txt
75
+ - README
76
+ - README.rdoc
77
+ files:
78
+ - .rvmrc
79
+ - Gemfile
80
+ - Gemfile.lock
81
+ - LICENSE.txt
82
+ - README
83
+ - README.rdoc
84
+ - Rakefile
85
+ - VERSION
86
+ - lib/resque/failure/Campfire.rb
87
+ - lib/smokesignal.rb
88
+ - lib/smokesignal/engine.rb
89
+ - smokesignal.gemspec
90
+ - test/helper.rb
91
+ - test/test_resque-failure-campfire.rb
92
+ homepage: http://github.com/okl/smokesignal
93
+ licenses:
94
+ - MIT
95
+ post_install_message:
96
+ rdoc_options: []
97
+ require_paths:
98
+ - lib
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ none: false
101
+ requirements:
102
+ - - ! '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ required_rubygems_version: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ requirements: []
112
+ rubyforge_project:
113
+ rubygems_version: 1.8.17
114
+ signing_key:
115
+ specification_version: 3
116
+ summary: Campfire resque failure backend
117
+ test_files: []