sidejob 3.0.1 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/README.md +10 -14
- data/lib/sidejob.rb +29 -23
- data/lib/sidejob/job.rb +183 -213
- data/lib/sidejob/port.rb +112 -80
- data/lib/sidejob/server_middleware.rb +56 -50
- data/lib/sidejob/testing.rb +0 -2
- data/lib/sidejob/version.rb +1 -1
- data/lib/sidejob/worker.rb +28 -46
- data/spec/integration/fib_spec.rb +8 -4
- data/spec/integration/sum_spec.rb +0 -1
- data/spec/sidejob/job_spec.rb +323 -241
- data/spec/sidejob/port_spec.rb +152 -138
- data/spec/sidejob/server_middleware_spec.rb +27 -47
- data/spec/sidejob/worker_spec.rb +16 -84
- data/spec/sidejob_spec.rb +39 -16
- data/web/Gemfile +6 -0
- data/web/Gemfile.lock +43 -0
- data/web/app.rb +205 -0
- data/web/config.ru +14 -0
- metadata +6 -2
data/web/config.ru
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
require_relative './app.rb'
|
3
|
+
require 'rack/cors'
|
4
|
+
|
5
|
+
if ENV['SIDEJOB_API_CORS']
|
6
|
+
use Rack::Cors do
|
7
|
+
allow do
|
8
|
+
origins ENV['SIDEJOB_API_CORS'].split(' ')
|
9
|
+
resource '*', methods: [:get, :post, :put, :delete, :options], headers: :any
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
run SideJob::Web
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidejob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Che
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
@@ -113,6 +113,10 @@ files:
|
|
113
113
|
- spec/spec_helper.rb
|
114
114
|
- spec/support/test_sum.rb
|
115
115
|
- spec/support/test_worker.rb
|
116
|
+
- web/Gemfile
|
117
|
+
- web/Gemfile.lock
|
118
|
+
- web/app.rb
|
119
|
+
- web/config.ru
|
116
120
|
homepage:
|
117
121
|
licenses: []
|
118
122
|
metadata: {}
|