jobi 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +5 -0
- data/CHANGELOG.md +14 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +45 -0
- data/LICENSE.txt +21 -0
- data/README.md +132 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/jobi.log +31 -0
- data/bin/setup +8 -0
- data/examples/demo_app/.browserslistrc +1 -0
- data/examples/demo_app/.gitignore +35 -0
- data/examples/demo_app/.ruby-version +1 -0
- data/examples/demo_app/Gemfile +56 -0
- data/examples/demo_app/Gemfile.lock +237 -0
- data/examples/demo_app/README.md +24 -0
- data/examples/demo_app/Rakefile +6 -0
- data/examples/demo_app/app/assets/config/manifest.js +2 -0
- data/examples/demo_app/app/assets/images/.keep +0 -0
- data/examples/demo_app/app/assets/stylesheets/application.css +15 -0
- data/examples/demo_app/app/assets/stylesheets/home.scss +3 -0
- data/examples/demo_app/app/channels/application_cable/channel.rb +4 -0
- data/examples/demo_app/app/channels/application_cable/connection.rb +4 -0
- data/examples/demo_app/app/controllers/application_controller.rb +2 -0
- data/examples/demo_app/app/controllers/concerns/.keep +0 -0
- data/examples/demo_app/app/controllers/home_controller.rb +6 -0
- data/examples/demo_app/app/helpers/application_helper.rb +2 -0
- data/examples/demo_app/app/helpers/home_helper.rb +2 -0
- data/examples/demo_app/app/javascript/channels/consumer.js +6 -0
- data/examples/demo_app/app/javascript/channels/index.js +5 -0
- data/examples/demo_app/app/javascript/packs/application.js +17 -0
- data/examples/demo_app/app/jobs/application_job.rb +7 -0
- data/examples/demo_app/app/jobs/calculator_job.rb +14 -0
- data/examples/demo_app/app/mailers/application_mailer.rb +4 -0
- data/examples/demo_app/app/models/application_record.rb +3 -0
- data/examples/demo_app/app/models/concerns/.keep +0 -0
- data/examples/demo_app/app/views/layouts/application.html.erb +15 -0
- data/examples/demo_app/app/views/layouts/mailer.html.erb +13 -0
- data/examples/demo_app/app/views/layouts/mailer.text.erb +1 -0
- data/examples/demo_app/babel.config.js +72 -0
- data/examples/demo_app/bin/bundle +114 -0
- data/examples/demo_app/bin/rails +9 -0
- data/examples/demo_app/bin/rake +9 -0
- data/examples/demo_app/bin/setup +36 -0
- data/examples/demo_app/bin/spring +17 -0
- data/examples/demo_app/bin/webpack +18 -0
- data/examples/demo_app/bin/webpack-dev-server +18 -0
- data/examples/demo_app/bin/yarn +11 -0
- data/examples/demo_app/config.ru +5 -0
- data/examples/demo_app/config/application.rb +19 -0
- data/examples/demo_app/config/boot.rb +4 -0
- data/examples/demo_app/config/cable.yml +10 -0
- data/examples/demo_app/config/credentials.yml.enc +1 -0
- data/examples/demo_app/config/database.yml +25 -0
- data/examples/demo_app/config/environment.rb +5 -0
- data/examples/demo_app/config/environments/development.rb +62 -0
- data/examples/demo_app/config/environments/production.rb +112 -0
- data/examples/demo_app/config/environments/test.rb +48 -0
- data/examples/demo_app/config/initializers/application_controller_renderer.rb +8 -0
- data/examples/demo_app/config/initializers/assets.rb +14 -0
- data/examples/demo_app/config/initializers/backtrace_silencers.rb +7 -0
- data/examples/demo_app/config/initializers/content_security_policy.rb +30 -0
- data/examples/demo_app/config/initializers/cookies_serializer.rb +5 -0
- data/examples/demo_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/examples/demo_app/config/initializers/inflections.rb +16 -0
- data/examples/demo_app/config/initializers/jobi.rb +8 -0
- data/examples/demo_app/config/initializers/mime_types.rb +4 -0
- data/examples/demo_app/config/initializers/wrap_parameters.rb +14 -0
- data/examples/demo_app/config/locales/en.yml +33 -0
- data/examples/demo_app/config/puma.rb +38 -0
- data/examples/demo_app/config/routes.rb +4 -0
- data/examples/demo_app/config/spring.rb +6 -0
- data/examples/demo_app/config/storage.yml +34 -0
- data/examples/demo_app/config/webpack/development.js +5 -0
- data/examples/demo_app/config/webpack/environment.js +3 -0
- data/examples/demo_app/config/webpack/production.js +5 -0
- data/examples/demo_app/config/webpack/test.js +5 -0
- data/examples/demo_app/config/webpacker.yml +96 -0
- data/examples/demo_app/db/seeds.rb +7 -0
- data/examples/demo_app/lib/assets/.keep +0 -0
- data/examples/demo_app/lib/tasks/.keep +0 -0
- data/examples/demo_app/log/.keep +0 -0
- data/examples/demo_app/package.json +15 -0
- data/examples/demo_app/postcss.config.js +12 -0
- data/examples/demo_app/public/404.html +67 -0
- data/examples/demo_app/public/422.html +67 -0
- data/examples/demo_app/public/500.html +66 -0
- data/examples/demo_app/public/apple-touch-icon-precomposed.png +0 -0
- data/examples/demo_app/public/apple-touch-icon.png +0 -0
- data/examples/demo_app/public/favicon.ico +0 -0
- data/examples/demo_app/public/robots.txt +1 -0
- data/examples/demo_app/storage/.keep +0 -0
- data/examples/demo_app/test/application_system_test_case.rb +5 -0
- data/examples/demo_app/test/channels/application_cable/connection_test.rb +11 -0
- data/examples/demo_app/test/controllers/.keep +0 -0
- data/examples/demo_app/test/controllers/home_controller_test.rb +7 -0
- data/examples/demo_app/test/fixtures/.keep +0 -0
- data/examples/demo_app/test/fixtures/files/.keep +0 -0
- data/examples/demo_app/test/helpers/.keep +0 -0
- data/examples/demo_app/test/integration/.keep +0 -0
- data/examples/demo_app/test/mailers/.keep +0 -0
- data/examples/demo_app/test/models/.keep +0 -0
- data/examples/demo_app/test/system/.keep +0 -0
- data/examples/demo_app/test/test_helper.rb +13 -0
- data/examples/demo_app/tmp/.keep +0 -0
- data/examples/demo_app/vendor/.keep +0 -0
- data/examples/demo_app/yarn.lock +7508 -0
- data/examples/normal_job.rb +39 -0
- data/jobi.gemspec +31 -0
- data/lib/jobi.rb +64 -0
- data/lib/jobi/clients/rabbitmq.rb +29 -0
- data/lib/jobi/config/rabbitmq.rb +58 -0
- data/lib/jobi/configuration.rb +66 -0
- data/lib/jobi/consumers/rabbitmq.rb +26 -0
- data/lib/jobi/job.rb +89 -0
- data/lib/jobi/message.rb +17 -0
- data/lib/jobi/runner.rb +25 -0
- data/lib/jobi/utils.rb +13 -0
- data/lib/jobi/version.rb +3 -0
- metadata +213 -0
@@ -0,0 +1,96 @@
|
|
1
|
+
# Note: You must restart bin/webpack-dev-server for changes to take effect
|
2
|
+
|
3
|
+
default: &default
|
4
|
+
source_path: app/javascript
|
5
|
+
source_entry_path: packs
|
6
|
+
public_root_path: public
|
7
|
+
public_output_path: packs
|
8
|
+
cache_path: tmp/cache/webpacker
|
9
|
+
check_yarn_integrity: false
|
10
|
+
webpack_compile_output: true
|
11
|
+
|
12
|
+
# Additional paths webpack should lookup modules
|
13
|
+
# ['app/assets', 'engine/foo/app/assets']
|
14
|
+
resolved_paths: []
|
15
|
+
|
16
|
+
# Reload manifest.json on all requests so we reload latest compiled packs
|
17
|
+
cache_manifest: false
|
18
|
+
|
19
|
+
# Extract and emit a css file
|
20
|
+
extract_css: false
|
21
|
+
|
22
|
+
static_assets_extensions:
|
23
|
+
- .jpg
|
24
|
+
- .jpeg
|
25
|
+
- .png
|
26
|
+
- .gif
|
27
|
+
- .tiff
|
28
|
+
- .ico
|
29
|
+
- .svg
|
30
|
+
- .eot
|
31
|
+
- .otf
|
32
|
+
- .ttf
|
33
|
+
- .woff
|
34
|
+
- .woff2
|
35
|
+
|
36
|
+
extensions:
|
37
|
+
- .mjs
|
38
|
+
- .js
|
39
|
+
- .sass
|
40
|
+
- .scss
|
41
|
+
- .css
|
42
|
+
- .module.sass
|
43
|
+
- .module.scss
|
44
|
+
- .module.css
|
45
|
+
- .png
|
46
|
+
- .svg
|
47
|
+
- .gif
|
48
|
+
- .jpeg
|
49
|
+
- .jpg
|
50
|
+
|
51
|
+
development:
|
52
|
+
<<: *default
|
53
|
+
compile: true
|
54
|
+
|
55
|
+
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
|
56
|
+
check_yarn_integrity: true
|
57
|
+
|
58
|
+
# Reference: https://webpack.js.org/configuration/dev-server/
|
59
|
+
dev_server:
|
60
|
+
https: false
|
61
|
+
host: localhost
|
62
|
+
port: 3035
|
63
|
+
public: localhost:3035
|
64
|
+
hmr: false
|
65
|
+
# Inline should be set to true if using HMR
|
66
|
+
inline: true
|
67
|
+
overlay: true
|
68
|
+
compress: true
|
69
|
+
disable_host_check: true
|
70
|
+
use_local_ip: false
|
71
|
+
quiet: false
|
72
|
+
pretty: false
|
73
|
+
headers:
|
74
|
+
'Access-Control-Allow-Origin': '*'
|
75
|
+
watch_options:
|
76
|
+
ignored: '**/node_modules/**'
|
77
|
+
|
78
|
+
|
79
|
+
test:
|
80
|
+
<<: *default
|
81
|
+
compile: true
|
82
|
+
|
83
|
+
# Compile test packs to a separate directory
|
84
|
+
public_output_path: packs-test
|
85
|
+
|
86
|
+
production:
|
87
|
+
<<: *default
|
88
|
+
|
89
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
90
|
+
compile: false
|
91
|
+
|
92
|
+
# Extract and emit a css file
|
93
|
+
extract_css: true
|
94
|
+
|
95
|
+
# Cache manifest.json for performance
|
96
|
+
cache_manifest: true
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
+
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
|
3
|
+
#
|
4
|
+
# Examples:
|
5
|
+
#
|
6
|
+
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
|
7
|
+
# Character.create(name: 'Luke', movie: movies.first)
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"name": "demo_app",
|
3
|
+
"private": true,
|
4
|
+
"dependencies": {
|
5
|
+
"@rails/actioncable": "^6.0.0-alpha",
|
6
|
+
"@rails/activestorage": "^6.0.0-alpha",
|
7
|
+
"@rails/ujs": "^6.0.0-alpha",
|
8
|
+
"@rails/webpacker": "4.2.2",
|
9
|
+
"turbolinks": "^5.2.0"
|
10
|
+
},
|
11
|
+
"version": "0.1.0",
|
12
|
+
"devDependencies": {
|
13
|
+
"webpack-dev-server": "^3.11.0"
|
14
|
+
}
|
15
|
+
}
|
@@ -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
|
+
.rails-default-error-page {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
.rails-default-error-page div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.rails-default-error-page 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
|
+
.rails-default-error-page h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
.rails-default-error-page 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 class="rails-default-error-page">
|
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
|
+
.rails-default-error-page {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
.rails-default-error-page div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.rails-default-error-page 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
|
+
.rails-default-error-page h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
.rails-default-error-page 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 class="rails-default-error-page">
|
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
|
+
.rails-default-error-page {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
.rails-default-error-page div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.rails-default-error-page 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
|
+
.rails-default-error-page h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
.rails-default-error-page 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 class="rails-default-error-page">
|
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
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
ENV['RAILS_ENV'] ||= 'test'
|
2
|
+
require_relative '../config/environment'
|
3
|
+
require 'rails/test_help'
|
4
|
+
|
5
|
+
class ActiveSupport::TestCase
|
6
|
+
# Run tests in parallel with specified workers
|
7
|
+
parallelize(workers: :number_of_processors)
|
8
|
+
|
9
|
+
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
10
|
+
fixtures :all
|
11
|
+
|
12
|
+
# Add more helper methods to be used by all tests here...
|
13
|
+
end
|
File without changes
|
File without changes
|