resque_lifting_weights 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ .rvmrc
2
+ doc/
3
+ .yardoc/
4
+ *.gem
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/LICENSE.md ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2013 K$
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.md ADDED
@@ -0,0 +1,47 @@
1
+ resque-lifting-weights
2
+ ====================
3
+ A gem that combines all the goodness resque has to offer including:
4
+
5
+ * [resque](https://github.com/defunkt/resque)
6
+ * [resque_mailer](https://github.com/zapnap/resque_mailer)
7
+ * [resque-scheduler](https://github.com/bvandenbos/resque-scheduler)
8
+ * [resque-retry](https://github.com/lantins/resque-retry)
9
+ * [resque-cleaner](https://github.com/ono/resque-cleaner)
10
+ * [resque-delay-with-mongoid](https://github.com/kdmny/resque-delay-with-mongoid)
11
+
12
+
13
+ Installation Gemspec
14
+ ------------
15
+ gem 'resque-lifting-weights'
16
+
17
+
18
+ Sample Use
19
+ ------------------
20
+
21
+ Submitting an Issue
22
+ -------------------
23
+ We use the [GitHub issue tracker](http://github.com/kdmny/resque-lifting-weights/issues) to track bugs and
24
+ features. Before submitting a bug report or feature request, check to make sure it hasn't already
25
+ been submitted. You can indicate support for an existing issuse by voting it up. When submitting a
26
+ bug report, please include a [Gist](http://gist.github.com/) that includes a stack trace and any
27
+ details that may be necessary to reproduce the bug, including your gem version, Ruby version, and
28
+ operating system. Ideally, a bug report should include a pull request with failing specs.
29
+
30
+
31
+ Submitting a Pull Request
32
+ -------------------------
33
+ 1. Fork the project.
34
+ 2. Create a topic branch.
35
+ 3. Implement your feature or bug fix.
36
+ 4. Add documentation for your feature or bug fix.
37
+ 5. Run <tt>rake doc:yard</tt>. If your changes are not 100% documented, go back to step 4.
38
+ 6. Add specs for your feature or bug fix.
39
+ 7. Run <tt>rake spec</tt>. If your changes are not 100% covered, go back to step 6.
40
+ 8. Commit and push your changes.
41
+ 9. Submit a pull request. Please do not include changes to the gemspec, version, or history file. (If you want to create your own version for some reason, please do so in a separate commit.)
42
+
43
+
44
+ Copyright
45
+ ---------
46
+ Copyright (c) 2013 K$.
47
+ See [LICENSE](https://github.com/kdmny/resque-lifting-weights/blob/master/LICENSE.md) for details.
data/Rakefile ADDED
@@ -0,0 +1,27 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require 'rspec/core/rake_task'
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task :default => :spec
8
+
9
+ namespace :doc do
10
+ begin
11
+ require 'yard'
12
+ rescue LoadError
13
+ # ignore
14
+ else
15
+ YARD::Rake::YardocTask.new do |task|
16
+ task.files = ['HISTORY.mkd', 'LICENSE.mkd', 'lib/**/*.rb']
17
+ task.options = [
18
+ '--protected',
19
+ '--output-dir', 'doc/yard',
20
+ '--tag', 'format:Supported formats',
21
+ '--tag', 'authenticated:Requires Authentication',
22
+ '--tag', 'rate_limited:Rate Limited',
23
+ '--markup', 'markdown',
24
+ ]
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,14 @@
1
+ require 'resque_scheduler/server'
2
+ # Resque.schedule = YAML.load_file("#{Rails.root}/config/resque_schedule.yml")
3
+ ENV["REDISTOGO_URL"] ||= "redis://localhost:6379/"
4
+ uri = URI.parse(ENV["REDISTOGO_URL"])
5
+ Resque.redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password, :thread_safe => true)
6
+ Dir["#{Rails.root}/app/jobs/*.rb"].each { |file| require file }
7
+ require 'resque-retry'
8
+ require 'resque/failure/redis'
9
+ require 'resque/failure/airbrake'
10
+
11
+ # require your jobs & application code.
12
+ Resque::Failure::MultipleWithRetrySuppression.classes = [Resque::Failure::Redis, Resque::Failure::Airbrake]
13
+ Resque::Failure.backend = Resque::Failure::MultipleWithRetrySuppression
14
+ Resque.after_fork = Proc.new { ActiveRecord::Base.establish_connection }
data/config/routes.rb ADDED
@@ -0,0 +1,3 @@
1
+ Rails.application.routes.draw do
2
+ mount Resque::Server, :at => '/resque'
3
+ end
@@ -0,0 +1,5 @@
1
+ module ResqueLiftingWeights
2
+ class Engine < Rails::Engine
3
+ isolate_namespace ResqueLiftingWeights
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module ResqueLiftingWeights
2
+ VERSION="0.0.1"
3
+ end
@@ -0,0 +1,3 @@
1
+ require "resque_lifting_weights/engine"
2
+ module ResqueLiftingWeights
3
+ end
@@ -0,0 +1,21 @@
1
+ require 'resque/tasks'
2
+ require 'resque_scheduler/tasks'
3
+ # ResqueScheduler.schedule = YAML.load_file(File.join(Rails.root, 'config/resque_schedule.yml'))
4
+ task "resque:setup" => :environment do
5
+ require 'resque'
6
+ require 'resque_scheduler'
7
+ require 'resque/scheduler'
8
+
9
+ # ONLY on Heroku, since they are still running PostgreSql 8 on their shared plan.
10
+ # This block of code is not needed on PostgreSql 9, as tested on local environment.
11
+ # Issue: My best guess is that master resque process establishes connection to db,
12
+ # while loading rails app classes, models, etc, and that connection becomes corrupted
13
+ # in fork()ed process (on exit?). Possible fix is to reestablish the connection the AR
14
+ # after a Resque fork.
15
+ Resque.after_fork do |job|
16
+ ActiveRecord::Base.establish_connection
17
+ end
18
+ end
19
+
20
+ desc "Alias for resque:work (To run workers on Heroku)"
21
+ task "jobs:work" => "resque:work"
@@ -0,0 +1,30 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/resque_lifting_weights/version', __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.add_development_dependency('rspec', '~> 2.4')
6
+ s.add_development_dependency('yard')
7
+ s.add_development_dependency('resque_unit')
8
+
9
+ s.add_runtime_dependency('resque')
10
+ s.add_runtime_dependency('resque_mailer')
11
+ s.add_runtime_dependency('resque-scheduler')
12
+ s.add_runtime_dependency('resque-retry')
13
+ s.add_runtime_dependency('resque-cleaner')
14
+ s.add_runtime_dependency('resque-delay-with-mongoid')
15
+ s.add_runtime_dependency('airbrake')
16
+
17
+ s.authors = ["K$"]
18
+ s.description = %q{A gem that combines all the goodness resque has to offer.}
19
+ s.email = ['kdmny30@gmail.com']
20
+ s.files = `git ls-files`.split("\n")
21
+ s.homepage = 'https://github.com/kdmny/resque_lifting_weights'
22
+ s.name = 'resque_lifting_weights'
23
+ s.platform = Gem::Platform::RUBY
24
+ s.require_paths = ['lib', 'config']
25
+ s.required_rubygems_version = Gem::Requirement.new('>= 1.3.6') if s.respond_to? :required_rubygems_version=
26
+ s.rubyforge_project = s.name
27
+ s.summary = %q{A gem that combines all the goodness resque has to offer.}
28
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
29
+ s.version = ResqueLiftingWeights::VERSION
30
+ end
metadata ADDED
@@ -0,0 +1,169 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: resque_lifting_weights
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - K$
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-03-29 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: &70334598645340 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '2.4'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *70334598645340
25
+ - !ruby/object:Gem::Dependency
26
+ name: yard
27
+ requirement: &70334598644800 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *70334598644800
36
+ - !ruby/object:Gem::Dependency
37
+ name: resque_unit
38
+ requirement: &70334598644080 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *70334598644080
47
+ - !ruby/object:Gem::Dependency
48
+ name: resque
49
+ requirement: &70334598643420 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *70334598643420
58
+ - !ruby/object:Gem::Dependency
59
+ name: resque_mailer
60
+ requirement: &70334598642820 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: *70334598642820
69
+ - !ruby/object:Gem::Dependency
70
+ name: resque-scheduler
71
+ requirement: &70334598642280 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: *70334598642280
80
+ - !ruby/object:Gem::Dependency
81
+ name: resque-retry
82
+ requirement: &70334598627920 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :runtime
89
+ prerelease: false
90
+ version_requirements: *70334598627920
91
+ - !ruby/object:Gem::Dependency
92
+ name: resque-cleaner
93
+ requirement: &70334598627440 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ type: :runtime
100
+ prerelease: false
101
+ version_requirements: *70334598627440
102
+ - !ruby/object:Gem::Dependency
103
+ name: resque-delay-with-mongoid
104
+ requirement: &70334598626820 !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :runtime
111
+ prerelease: false
112
+ version_requirements: *70334598626820
113
+ - !ruby/object:Gem::Dependency
114
+ name: airbrake
115
+ requirement: &70334598626320 !ruby/object:Gem::Requirement
116
+ none: false
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ type: :runtime
122
+ prerelease: false
123
+ version_requirements: *70334598626320
124
+ description: A gem that combines all the goodness resque has to offer.
125
+ email:
126
+ - kdmny30@gmail.com
127
+ executables: []
128
+ extensions: []
129
+ extra_rdoc_files: []
130
+ files:
131
+ - .gitignore
132
+ - Gemfile
133
+ - LICENSE.md
134
+ - README.md
135
+ - Rakefile
136
+ - config/initializers/resque.rb
137
+ - config/routes.rb
138
+ - lib/resque_lifting_weights.rb
139
+ - lib/resque_lifting_weights/engine.rb
140
+ - lib/resque_lifting_weights/version.rb
141
+ - lib/tasks/resque.rake
142
+ - resque_lifting_weights.gemspec
143
+ homepage: https://github.com/kdmny/resque_lifting_weights
144
+ licenses: []
145
+ post_install_message:
146
+ rdoc_options: []
147
+ require_paths:
148
+ - lib
149
+ - config
150
+ required_ruby_version: !ruby/object:Gem::Requirement
151
+ none: false
152
+ requirements:
153
+ - - ! '>='
154
+ - !ruby/object:Gem::Version
155
+ version: '0'
156
+ required_rubygems_version: !ruby/object:Gem::Requirement
157
+ none: false
158
+ requirements:
159
+ - - ! '>='
160
+ - !ruby/object:Gem::Version
161
+ version: 1.3.6
162
+ requirements: []
163
+ rubyforge_project: resque_lifting_weights
164
+ rubygems_version: 1.8.15
165
+ signing_key:
166
+ specification_version: 3
167
+ summary: A gem that combines all the goodness resque has to offer.
168
+ test_files: []
169
+ has_rdoc: