async_request 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +37 -0
- data/app/assets/javascripts/async_request/application.js +13 -0
- data/app/assets/stylesheets/async_request/application.css +15 -0
- data/app/controllers/async_request/application_controller.rb +4 -0
- data/app/controllers/async_request/jobs_controller.rb +19 -0
- data/app/helpers/async_request/application_helper.rb +15 -0
- data/app/models/async_request/job.rb +6 -0
- data/app/views/layouts/async_request/application.html.erb +14 -0
- data/app/workers/async_request/job_processor.rb +16 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20160411190611_create_async_request_jobs.rb +16 -0
- data/lib/async_request.rb +4 -0
- data/lib/async_request/engine.rb +23 -0
- data/lib/async_request/version.rb +3 -0
- data/lib/tasks/async_request_tasks.rake +4 -0
- data/spec/controllers/async_request/jobs_controller_spec.rb +47 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +10 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/workers/test.rb +7 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +26 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +19 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/schema.rb +33 -0
- data/spec/dummy/log/development.log +827 -0
- data/spec/dummy/log/test.log +5076 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/factories/async_request_job.rb +23 -0
- data/spec/helpers/async_request/application_helper_spec.rb +39 -0
- data/spec/spec_helper.rb +68 -0
- data/spec/support/parsed_response_helper.rb +7 -0
- data/spec/workers/async_request/job_processor_spec.rb +32 -0
- metadata +293 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/404.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
62
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/422.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The change you wanted was rejected.</h1>
|
62
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
File without changes
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module AsyncRequest
|
2
|
+
FactoryGirl.define do
|
3
|
+
factory :async_request_job, class: 'AsyncRequest::Job' do
|
4
|
+
worker { Faker::Lorem.word }
|
5
|
+
status_code 200
|
6
|
+
response { { a: Faker::Lorem.word, b: Faker::Lorem.word, c: Faker::Lorem.word }.to_json }
|
7
|
+
uid { Faker::Lorem.word }
|
8
|
+
params [Faker::Lorem.word, { a: 'a' }]
|
9
|
+
end
|
10
|
+
|
11
|
+
trait :waiting do
|
12
|
+
status Job.statuses[:waiting]
|
13
|
+
end
|
14
|
+
|
15
|
+
trait :processing do
|
16
|
+
status Job.statuses[:processing]
|
17
|
+
end
|
18
|
+
|
19
|
+
trait :processed do
|
20
|
+
status Job.statuses[:processed]
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module AsyncRequest
|
4
|
+
describe ApplicationHelper do
|
5
|
+
describe '.execute_async' do
|
6
|
+
context 'When no worker class is passed' do
|
7
|
+
it 'fails with ArgumentError' do
|
8
|
+
expect { execute_async(nil, []) }.to raise_error(ArgumentError)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
context 'When called with valid params' do
|
13
|
+
it 'creates a new job object' do
|
14
|
+
expect { execute_async(Test, 'a') }.to change { Job.count }.by(1)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'creates a new job object with Test as worker' do
|
18
|
+
job = Job.find_by(uid: execute_async(Test, 'a'))
|
19
|
+
expect(job.worker).to eq 'Test'
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'creates a new job object with [\'a\'] as params' do
|
23
|
+
job = Job.find_by(uid: execute_async(Test, 'a'))
|
24
|
+
expect(job.params).to eq ['a']
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'creates a new job object with [\'a\'] as params' do
|
28
|
+
job = Job.find_by(uid: execute_async(Test, 'a'))
|
29
|
+
expect(job.waiting?).to be_truthy
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'serializes complex params' do
|
33
|
+
job = Job.find_by(uid: execute_async(Test, { a: 'a' }, 3, 'a'))
|
34
|
+
expect(job.params).to eq [{ a: 'a' }, 3, 'a']
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
|
+
ENV["RAILS_ENV"] ||= 'test'
|
3
|
+
require 'factory_girl'
|
4
|
+
require 'faker'
|
5
|
+
require 'database_cleaner'
|
6
|
+
require 'pry'
|
7
|
+
require File.expand_path("../dummy/config/environment", __FILE__)
|
8
|
+
require 'rspec/rails'
|
9
|
+
require 'rspec/autorun'
|
10
|
+
|
11
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
12
|
+
# in spec/support/ and its subdirectories.
|
13
|
+
ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
|
14
|
+
Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
|
15
|
+
|
16
|
+
ActiveRecord::Migration.maintain_test_schema!
|
17
|
+
|
18
|
+
require "codeclimate-test-reporter"
|
19
|
+
CodeClimate::TestReporter.start
|
20
|
+
|
21
|
+
RSpec.configure do |config|
|
22
|
+
|
23
|
+
config.infer_spec_type_from_file_location!
|
24
|
+
|
25
|
+
config.include FactoryGirl::Syntax::Methods
|
26
|
+
|
27
|
+
config.before(:all) do
|
28
|
+
FactoryGirl.reload
|
29
|
+
end
|
30
|
+
|
31
|
+
config.expect_with :rspec do |c|
|
32
|
+
c.syntax = :expect
|
33
|
+
end
|
34
|
+
|
35
|
+
config.before(:suite) do
|
36
|
+
DatabaseCleaner.strategy = :transaction
|
37
|
+
DatabaseCleaner.clean_with(:truncation)
|
38
|
+
end
|
39
|
+
|
40
|
+
config.before(:each) do
|
41
|
+
DatabaseCleaner.start
|
42
|
+
end
|
43
|
+
|
44
|
+
config.after(:each) do
|
45
|
+
DatabaseCleaner.clean
|
46
|
+
end
|
47
|
+
|
48
|
+
config.include Response::JSONParser, type: :controller
|
49
|
+
|
50
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
51
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
52
|
+
|
53
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
54
|
+
# examples within a transaction, remove the following line or assign false
|
55
|
+
# instead of true.
|
56
|
+
config.use_transactional_fixtures = true
|
57
|
+
|
58
|
+
# If true, the base class of anonymous controllers will be inferred
|
59
|
+
# automatically. This will be the default behavior in future versions of
|
60
|
+
# rspec-rails.
|
61
|
+
config.infer_base_class_for_anonymous_controllers = false
|
62
|
+
|
63
|
+
# Run specs in random order to surface order dependencies. If you find an
|
64
|
+
# order dependency and want to debug it, you can fix the order by providing
|
65
|
+
# the seed, which is printed after each run.
|
66
|
+
# --seed 1234
|
67
|
+
config.order = "random"
|
68
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module AsyncRequest
|
4
|
+
describe JobProcessor do
|
5
|
+
include AsyncRequest::Engine.helpers
|
6
|
+
describe '.perform' do
|
7
|
+
let(:uid) { execute_async(Test, { a: 'a' }, 3, 'a') }
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
Test.any_instance.stub(:execute).and_return([200, { status: 'success' }])
|
11
|
+
end
|
12
|
+
|
13
|
+
context 'When executing the worker' do
|
14
|
+
it 'calls Test class' do
|
15
|
+
expect_any_instance_of(Test).to receive(:execute).with({ a: 'a' }, 3, 'a')
|
16
|
+
JobProcessor.new.perform(Job.find_by(uid: uid).id)
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'saves the worker status code' do
|
20
|
+
JobProcessor.new.perform(Job.find_by(uid: uid).id)
|
21
|
+
expect(Job.find_by(uid: uid).status_code).to eq 200
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'saves the worker response' do
|
25
|
+
JobProcessor.new.perform(Job.find_by(uid: uid).id)
|
26
|
+
response = Job.find_by(uid: uid).response
|
27
|
+
expect(response).to eq({ status: 'success' }.to_json)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,293 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: async_request
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matias De Santi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.2.5
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.2.5
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sidekiq
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pg
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec-rails
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: factory_girl_rails
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '4.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '4.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: faker
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: database_cleaner
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: codeclimate-test-reporter
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
description: At [Wolox](http://www.wolox.com.ar) we build Rails Apps. Some of them
|
154
|
+
need heavy computing when a request is received. In order to make the App scalable,
|
155
|
+
we perform those heavy actions in background. We return a job-id and the client
|
156
|
+
asks for it's state a few seconds after. `async_request` gives us the possibility
|
157
|
+
of handling these type of requests in a simple way.
|
158
|
+
email:
|
159
|
+
- matias.desanti@wolox.com.ar
|
160
|
+
executables: []
|
161
|
+
extensions: []
|
162
|
+
extra_rdoc_files: []
|
163
|
+
files:
|
164
|
+
- Rakefile
|
165
|
+
- app/assets/javascripts/async_request/application.js
|
166
|
+
- app/assets/stylesheets/async_request/application.css
|
167
|
+
- app/controllers/async_request/application_controller.rb
|
168
|
+
- app/controllers/async_request/jobs_controller.rb
|
169
|
+
- app/helpers/async_request/application_helper.rb
|
170
|
+
- app/models/async_request/job.rb
|
171
|
+
- app/views/layouts/async_request/application.html.erb
|
172
|
+
- app/workers/async_request/job_processor.rb
|
173
|
+
- config/routes.rb
|
174
|
+
- db/migrate/20160411190611_create_async_request_jobs.rb
|
175
|
+
- lib/async_request.rb
|
176
|
+
- lib/async_request/engine.rb
|
177
|
+
- lib/async_request/version.rb
|
178
|
+
- lib/tasks/async_request_tasks.rake
|
179
|
+
- spec/controllers/async_request/jobs_controller_spec.rb
|
180
|
+
- spec/dummy/README.rdoc
|
181
|
+
- spec/dummy/Rakefile
|
182
|
+
- spec/dummy/app/assets/javascripts/application.js
|
183
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
184
|
+
- spec/dummy/app/controllers/application_controller.rb
|
185
|
+
- spec/dummy/app/helpers/application_helper.rb
|
186
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
187
|
+
- spec/dummy/app/workers/test.rb
|
188
|
+
- spec/dummy/bin/bundle
|
189
|
+
- spec/dummy/bin/rails
|
190
|
+
- spec/dummy/bin/rake
|
191
|
+
- spec/dummy/bin/setup
|
192
|
+
- spec/dummy/config.ru
|
193
|
+
- spec/dummy/config/application.rb
|
194
|
+
- spec/dummy/config/boot.rb
|
195
|
+
- spec/dummy/config/database.yml
|
196
|
+
- spec/dummy/config/environment.rb
|
197
|
+
- spec/dummy/config/environments/development.rb
|
198
|
+
- spec/dummy/config/environments/production.rb
|
199
|
+
- spec/dummy/config/environments/test.rb
|
200
|
+
- spec/dummy/config/initializers/assets.rb
|
201
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
202
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
203
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
204
|
+
- spec/dummy/config/initializers/inflections.rb
|
205
|
+
- spec/dummy/config/initializers/mime_types.rb
|
206
|
+
- spec/dummy/config/initializers/session_store.rb
|
207
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
208
|
+
- spec/dummy/config/locales/en.yml
|
209
|
+
- spec/dummy/config/routes.rb
|
210
|
+
- spec/dummy/config/secrets.yml
|
211
|
+
- spec/dummy/db/schema.rb
|
212
|
+
- spec/dummy/log/development.log
|
213
|
+
- spec/dummy/log/test.log
|
214
|
+
- spec/dummy/public/404.html
|
215
|
+
- spec/dummy/public/422.html
|
216
|
+
- spec/dummy/public/500.html
|
217
|
+
- spec/dummy/public/favicon.ico
|
218
|
+
- spec/factories/async_request_job.rb
|
219
|
+
- spec/helpers/async_request/application_helper_spec.rb
|
220
|
+
- spec/spec_helper.rb
|
221
|
+
- spec/support/parsed_response_helper.rb
|
222
|
+
- spec/workers/async_request/job_processor_spec.rb
|
223
|
+
homepage: https://github.com/Wolox/async-requests
|
224
|
+
licenses:
|
225
|
+
- MIT
|
226
|
+
metadata: {}
|
227
|
+
post_install_message:
|
228
|
+
rdoc_options: []
|
229
|
+
require_paths:
|
230
|
+
- lib
|
231
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
232
|
+
requirements:
|
233
|
+
- - ">="
|
234
|
+
- !ruby/object:Gem::Version
|
235
|
+
version: '0'
|
236
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
|
+
requirements:
|
238
|
+
- - ">="
|
239
|
+
- !ruby/object:Gem::Version
|
240
|
+
version: '0'
|
241
|
+
requirements: []
|
242
|
+
rubyforge_project:
|
243
|
+
rubygems_version: 2.5.1
|
244
|
+
signing_key:
|
245
|
+
specification_version: 4
|
246
|
+
summary: async_request gives us the possibility of handling these type of requests
|
247
|
+
in a simple way.
|
248
|
+
test_files:
|
249
|
+
- spec/controllers/async_request/jobs_controller_spec.rb
|
250
|
+
- spec/dummy/app/assets/javascripts/application.js
|
251
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
252
|
+
- spec/dummy/app/controllers/application_controller.rb
|
253
|
+
- spec/dummy/app/helpers/application_helper.rb
|
254
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
255
|
+
- spec/dummy/app/workers/test.rb
|
256
|
+
- spec/dummy/bin/bundle
|
257
|
+
- spec/dummy/bin/rails
|
258
|
+
- spec/dummy/bin/rake
|
259
|
+
- spec/dummy/bin/setup
|
260
|
+
- spec/dummy/config/application.rb
|
261
|
+
- spec/dummy/config/boot.rb
|
262
|
+
- spec/dummy/config/database.yml
|
263
|
+
- spec/dummy/config/environment.rb
|
264
|
+
- spec/dummy/config/environments/development.rb
|
265
|
+
- spec/dummy/config/environments/production.rb
|
266
|
+
- spec/dummy/config/environments/test.rb
|
267
|
+
- spec/dummy/config/initializers/assets.rb
|
268
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
269
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
270
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
271
|
+
- spec/dummy/config/initializers/inflections.rb
|
272
|
+
- spec/dummy/config/initializers/mime_types.rb
|
273
|
+
- spec/dummy/config/initializers/session_store.rb
|
274
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
275
|
+
- spec/dummy/config/locales/en.yml
|
276
|
+
- spec/dummy/config/routes.rb
|
277
|
+
- spec/dummy/config/secrets.yml
|
278
|
+
- spec/dummy/config.ru
|
279
|
+
- spec/dummy/db/schema.rb
|
280
|
+
- spec/dummy/log/development.log
|
281
|
+
- spec/dummy/log/test.log
|
282
|
+
- spec/dummy/public/404.html
|
283
|
+
- spec/dummy/public/422.html
|
284
|
+
- spec/dummy/public/500.html
|
285
|
+
- spec/dummy/public/favicon.ico
|
286
|
+
- spec/dummy/Rakefile
|
287
|
+
- spec/dummy/README.rdoc
|
288
|
+
- spec/factories/async_request_job.rb
|
289
|
+
- spec/helpers/async_request/application_helper_spec.rb
|
290
|
+
- spec/spec_helper.rb
|
291
|
+
- spec/support/parsed_response_helper.rb
|
292
|
+
- spec/workers/async_request/job_processor_spec.rb
|
293
|
+
has_rdoc:
|