jobi 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +3 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +5 -0
  7. data/CHANGELOG.md +14 -0
  8. data/CODE_OF_CONDUCT.md +74 -0
  9. data/Gemfile +10 -0
  10. data/Gemfile.lock +45 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +132 -0
  13. data/Rakefile +6 -0
  14. data/bin/console +14 -0
  15. data/bin/jobi.log +31 -0
  16. data/bin/setup +8 -0
  17. data/examples/demo_app/.browserslistrc +1 -0
  18. data/examples/demo_app/.gitignore +35 -0
  19. data/examples/demo_app/.ruby-version +1 -0
  20. data/examples/demo_app/Gemfile +56 -0
  21. data/examples/demo_app/Gemfile.lock +237 -0
  22. data/examples/demo_app/README.md +24 -0
  23. data/examples/demo_app/Rakefile +6 -0
  24. data/examples/demo_app/app/assets/config/manifest.js +2 -0
  25. data/examples/demo_app/app/assets/images/.keep +0 -0
  26. data/examples/demo_app/app/assets/stylesheets/application.css +15 -0
  27. data/examples/demo_app/app/assets/stylesheets/home.scss +3 -0
  28. data/examples/demo_app/app/channels/application_cable/channel.rb +4 -0
  29. data/examples/demo_app/app/channels/application_cable/connection.rb +4 -0
  30. data/examples/demo_app/app/controllers/application_controller.rb +2 -0
  31. data/examples/demo_app/app/controllers/concerns/.keep +0 -0
  32. data/examples/demo_app/app/controllers/home_controller.rb +6 -0
  33. data/examples/demo_app/app/helpers/application_helper.rb +2 -0
  34. data/examples/demo_app/app/helpers/home_helper.rb +2 -0
  35. data/examples/demo_app/app/javascript/channels/consumer.js +6 -0
  36. data/examples/demo_app/app/javascript/channels/index.js +5 -0
  37. data/examples/demo_app/app/javascript/packs/application.js +17 -0
  38. data/examples/demo_app/app/jobs/application_job.rb +7 -0
  39. data/examples/demo_app/app/jobs/calculator_job.rb +14 -0
  40. data/examples/demo_app/app/mailers/application_mailer.rb +4 -0
  41. data/examples/demo_app/app/models/application_record.rb +3 -0
  42. data/examples/demo_app/app/models/concerns/.keep +0 -0
  43. data/examples/demo_app/app/views/layouts/application.html.erb +15 -0
  44. data/examples/demo_app/app/views/layouts/mailer.html.erb +13 -0
  45. data/examples/demo_app/app/views/layouts/mailer.text.erb +1 -0
  46. data/examples/demo_app/babel.config.js +72 -0
  47. data/examples/demo_app/bin/bundle +114 -0
  48. data/examples/demo_app/bin/rails +9 -0
  49. data/examples/demo_app/bin/rake +9 -0
  50. data/examples/demo_app/bin/setup +36 -0
  51. data/examples/demo_app/bin/spring +17 -0
  52. data/examples/demo_app/bin/webpack +18 -0
  53. data/examples/demo_app/bin/webpack-dev-server +18 -0
  54. data/examples/demo_app/bin/yarn +11 -0
  55. data/examples/demo_app/config.ru +5 -0
  56. data/examples/demo_app/config/application.rb +19 -0
  57. data/examples/demo_app/config/boot.rb +4 -0
  58. data/examples/demo_app/config/cable.yml +10 -0
  59. data/examples/demo_app/config/credentials.yml.enc +1 -0
  60. data/examples/demo_app/config/database.yml +25 -0
  61. data/examples/demo_app/config/environment.rb +5 -0
  62. data/examples/demo_app/config/environments/development.rb +62 -0
  63. data/examples/demo_app/config/environments/production.rb +112 -0
  64. data/examples/demo_app/config/environments/test.rb +48 -0
  65. data/examples/demo_app/config/initializers/application_controller_renderer.rb +8 -0
  66. data/examples/demo_app/config/initializers/assets.rb +14 -0
  67. data/examples/demo_app/config/initializers/backtrace_silencers.rb +7 -0
  68. data/examples/demo_app/config/initializers/content_security_policy.rb +30 -0
  69. data/examples/demo_app/config/initializers/cookies_serializer.rb +5 -0
  70. data/examples/demo_app/config/initializers/filter_parameter_logging.rb +4 -0
  71. data/examples/demo_app/config/initializers/inflections.rb +16 -0
  72. data/examples/demo_app/config/initializers/jobi.rb +8 -0
  73. data/examples/demo_app/config/initializers/mime_types.rb +4 -0
  74. data/examples/demo_app/config/initializers/wrap_parameters.rb +14 -0
  75. data/examples/demo_app/config/locales/en.yml +33 -0
  76. data/examples/demo_app/config/puma.rb +38 -0
  77. data/examples/demo_app/config/routes.rb +4 -0
  78. data/examples/demo_app/config/spring.rb +6 -0
  79. data/examples/demo_app/config/storage.yml +34 -0
  80. data/examples/demo_app/config/webpack/development.js +5 -0
  81. data/examples/demo_app/config/webpack/environment.js +3 -0
  82. data/examples/demo_app/config/webpack/production.js +5 -0
  83. data/examples/demo_app/config/webpack/test.js +5 -0
  84. data/examples/demo_app/config/webpacker.yml +96 -0
  85. data/examples/demo_app/db/seeds.rb +7 -0
  86. data/examples/demo_app/lib/assets/.keep +0 -0
  87. data/examples/demo_app/lib/tasks/.keep +0 -0
  88. data/examples/demo_app/log/.keep +0 -0
  89. data/examples/demo_app/package.json +15 -0
  90. data/examples/demo_app/postcss.config.js +12 -0
  91. data/examples/demo_app/public/404.html +67 -0
  92. data/examples/demo_app/public/422.html +67 -0
  93. data/examples/demo_app/public/500.html +66 -0
  94. data/examples/demo_app/public/apple-touch-icon-precomposed.png +0 -0
  95. data/examples/demo_app/public/apple-touch-icon.png +0 -0
  96. data/examples/demo_app/public/favicon.ico +0 -0
  97. data/examples/demo_app/public/robots.txt +1 -0
  98. data/examples/demo_app/storage/.keep +0 -0
  99. data/examples/demo_app/test/application_system_test_case.rb +5 -0
  100. data/examples/demo_app/test/channels/application_cable/connection_test.rb +11 -0
  101. data/examples/demo_app/test/controllers/.keep +0 -0
  102. data/examples/demo_app/test/controllers/home_controller_test.rb +7 -0
  103. data/examples/demo_app/test/fixtures/.keep +0 -0
  104. data/examples/demo_app/test/fixtures/files/.keep +0 -0
  105. data/examples/demo_app/test/helpers/.keep +0 -0
  106. data/examples/demo_app/test/integration/.keep +0 -0
  107. data/examples/demo_app/test/mailers/.keep +0 -0
  108. data/examples/demo_app/test/models/.keep +0 -0
  109. data/examples/demo_app/test/system/.keep +0 -0
  110. data/examples/demo_app/test/test_helper.rb +13 -0
  111. data/examples/demo_app/tmp/.keep +0 -0
  112. data/examples/demo_app/vendor/.keep +0 -0
  113. data/examples/demo_app/yarn.lock +7508 -0
  114. data/examples/normal_job.rb +39 -0
  115. data/jobi.gemspec +31 -0
  116. data/lib/jobi.rb +64 -0
  117. data/lib/jobi/clients/rabbitmq.rb +29 -0
  118. data/lib/jobi/config/rabbitmq.rb +58 -0
  119. data/lib/jobi/configuration.rb +66 -0
  120. data/lib/jobi/consumers/rabbitmq.rb +26 -0
  121. data/lib/jobi/job.rb +89 -0
  122. data/lib/jobi/message.rb +17 -0
  123. data/lib/jobi/runner.rb +25 -0
  124. data/lib/jobi/utils.rb +13 -0
  125. data/lib/jobi/version.rb +3 -0
  126. metadata +213 -0
@@ -0,0 +1,13 @@
1
+ require 'securerandom'
2
+
3
+ module Jobi
4
+ module Utils
5
+ def constantize(string)
6
+ Object::const_get(string)
7
+ end
8
+
9
+ def generate_job_id
10
+ SecureRandom.uuid
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,3 @@
1
+ module Jobi
2
+ VERSION = "0.1.1"
3
+ end
metadata ADDED
@@ -0,0 +1,213 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jobi
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Rudy Zidan
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-08-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bunny
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.14.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.14.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: logger
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ description: Jobi provides a full interaction between your app/micro-service and message
56
+ brokers.
57
+ email:
58
+ - rz.zidan@gmail.com
59
+ executables: []
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - ".gitignore"
64
+ - ".rspec"
65
+ - ".ruby-gemset"
66
+ - ".ruby-version"
67
+ - ".travis.yml"
68
+ - CHANGELOG.md
69
+ - CODE_OF_CONDUCT.md
70
+ - Gemfile
71
+ - Gemfile.lock
72
+ - LICENSE.txt
73
+ - README.md
74
+ - Rakefile
75
+ - bin/console
76
+ - bin/jobi.log
77
+ - bin/setup
78
+ - examples/demo_app/.browserslistrc
79
+ - examples/demo_app/.gitignore
80
+ - examples/demo_app/.ruby-version
81
+ - examples/demo_app/Gemfile
82
+ - examples/demo_app/Gemfile.lock
83
+ - examples/demo_app/README.md
84
+ - examples/demo_app/Rakefile
85
+ - examples/demo_app/app/assets/config/manifest.js
86
+ - examples/demo_app/app/assets/images/.keep
87
+ - examples/demo_app/app/assets/stylesheets/application.css
88
+ - examples/demo_app/app/assets/stylesheets/home.scss
89
+ - examples/demo_app/app/channels/application_cable/channel.rb
90
+ - examples/demo_app/app/channels/application_cable/connection.rb
91
+ - examples/demo_app/app/controllers/application_controller.rb
92
+ - examples/demo_app/app/controllers/concerns/.keep
93
+ - examples/demo_app/app/controllers/home_controller.rb
94
+ - examples/demo_app/app/helpers/application_helper.rb
95
+ - examples/demo_app/app/helpers/home_helper.rb
96
+ - examples/demo_app/app/javascript/channels/consumer.js
97
+ - examples/demo_app/app/javascript/channels/index.js
98
+ - examples/demo_app/app/javascript/packs/application.js
99
+ - examples/demo_app/app/jobs/application_job.rb
100
+ - examples/demo_app/app/jobs/calculator_job.rb
101
+ - examples/demo_app/app/mailers/application_mailer.rb
102
+ - examples/demo_app/app/models/application_record.rb
103
+ - examples/demo_app/app/models/concerns/.keep
104
+ - examples/demo_app/app/views/layouts/application.html.erb
105
+ - examples/demo_app/app/views/layouts/mailer.html.erb
106
+ - examples/demo_app/app/views/layouts/mailer.text.erb
107
+ - examples/demo_app/babel.config.js
108
+ - examples/demo_app/bin/bundle
109
+ - examples/demo_app/bin/rails
110
+ - examples/demo_app/bin/rake
111
+ - examples/demo_app/bin/setup
112
+ - examples/demo_app/bin/spring
113
+ - examples/demo_app/bin/webpack
114
+ - examples/demo_app/bin/webpack-dev-server
115
+ - examples/demo_app/bin/yarn
116
+ - examples/demo_app/config.ru
117
+ - examples/demo_app/config/application.rb
118
+ - examples/demo_app/config/boot.rb
119
+ - examples/demo_app/config/cable.yml
120
+ - examples/demo_app/config/credentials.yml.enc
121
+ - examples/demo_app/config/database.yml
122
+ - examples/demo_app/config/environment.rb
123
+ - examples/demo_app/config/environments/development.rb
124
+ - examples/demo_app/config/environments/production.rb
125
+ - examples/demo_app/config/environments/test.rb
126
+ - examples/demo_app/config/initializers/application_controller_renderer.rb
127
+ - examples/demo_app/config/initializers/assets.rb
128
+ - examples/demo_app/config/initializers/backtrace_silencers.rb
129
+ - examples/demo_app/config/initializers/content_security_policy.rb
130
+ - examples/demo_app/config/initializers/cookies_serializer.rb
131
+ - examples/demo_app/config/initializers/filter_parameter_logging.rb
132
+ - examples/demo_app/config/initializers/inflections.rb
133
+ - examples/demo_app/config/initializers/jobi.rb
134
+ - examples/demo_app/config/initializers/mime_types.rb
135
+ - examples/demo_app/config/initializers/wrap_parameters.rb
136
+ - examples/demo_app/config/locales/en.yml
137
+ - examples/demo_app/config/puma.rb
138
+ - examples/demo_app/config/routes.rb
139
+ - examples/demo_app/config/spring.rb
140
+ - examples/demo_app/config/storage.yml
141
+ - examples/demo_app/config/webpack/development.js
142
+ - examples/demo_app/config/webpack/environment.js
143
+ - examples/demo_app/config/webpack/production.js
144
+ - examples/demo_app/config/webpack/test.js
145
+ - examples/demo_app/config/webpacker.yml
146
+ - examples/demo_app/db/seeds.rb
147
+ - examples/demo_app/lib/assets/.keep
148
+ - examples/demo_app/lib/tasks/.keep
149
+ - examples/demo_app/log/.keep
150
+ - examples/demo_app/package.json
151
+ - examples/demo_app/postcss.config.js
152
+ - examples/demo_app/public/404.html
153
+ - examples/demo_app/public/422.html
154
+ - examples/demo_app/public/500.html
155
+ - examples/demo_app/public/apple-touch-icon-precomposed.png
156
+ - examples/demo_app/public/apple-touch-icon.png
157
+ - examples/demo_app/public/favicon.ico
158
+ - examples/demo_app/public/robots.txt
159
+ - examples/demo_app/storage/.keep
160
+ - examples/demo_app/test/application_system_test_case.rb
161
+ - examples/demo_app/test/channels/application_cable/connection_test.rb
162
+ - examples/demo_app/test/controllers/.keep
163
+ - examples/demo_app/test/controllers/home_controller_test.rb
164
+ - examples/demo_app/test/fixtures/.keep
165
+ - examples/demo_app/test/fixtures/files/.keep
166
+ - examples/demo_app/test/helpers/.keep
167
+ - examples/demo_app/test/integration/.keep
168
+ - examples/demo_app/test/mailers/.keep
169
+ - examples/demo_app/test/models/.keep
170
+ - examples/demo_app/test/system/.keep
171
+ - examples/demo_app/test/test_helper.rb
172
+ - examples/demo_app/tmp/.keep
173
+ - examples/demo_app/vendor/.keep
174
+ - examples/demo_app/yarn.lock
175
+ - examples/normal_job.rb
176
+ - jobi.gemspec
177
+ - lib/jobi.rb
178
+ - lib/jobi/clients/rabbitmq.rb
179
+ - lib/jobi/config/rabbitmq.rb
180
+ - lib/jobi/configuration.rb
181
+ - lib/jobi/consumers/rabbitmq.rb
182
+ - lib/jobi/job.rb
183
+ - lib/jobi/message.rb
184
+ - lib/jobi/runner.rb
185
+ - lib/jobi/utils.rb
186
+ - lib/jobi/version.rb
187
+ homepage: https://www.github.com/Rudy-Zidan/jobi
188
+ licenses:
189
+ - MIT
190
+ metadata:
191
+ homepage_uri: https://www.github.com/Rudy-Zidan/jobi
192
+ source_code_uri: https://www.github.com/Rudy-Zidan/jobi
193
+ changelog_uri: https://www.github.com/Rudy-Zidan/jobi/blob/master/CHANGELOG.md
194
+ post_install_message:
195
+ rdoc_options: []
196
+ require_paths:
197
+ - lib
198
+ required_ruby_version: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: 2.3.0
203
+ required_rubygems_version: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '0'
208
+ requirements: []
209
+ rubygems_version: 3.1.4
210
+ signing_key:
211
+ specification_version: 4
212
+ summary: A simple message brokers framework for Ruby.
213
+ test_files: []