ruby-clock 2.0.0.beta5 → 2.0.0.beta6
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/CHANGELOG.md +5 -2
- data/README.md +31 -5
- data/example-app/Clockfile +10 -6
- data/example-app/Gemfile +2 -0
- data/example-app/Gemfile.lock +3 -0
- data/example-rails-6-app/.browserslistrc +1 -0
- data/example-rails-6-app/.gitattributes +10 -0
- data/example-rails-6-app/.gitignore +40 -0
- data/example-rails-6-app/.ruby-version +1 -0
- data/{example-rails-app → example-rails-6-app}/Clockfile +1 -1
- data/example-rails-6-app/Gemfile +62 -0
- data/example-rails-6-app/Gemfile.lock +270 -0
- data/example-rails-6-app/README.md +24 -0
- data/{example-rails-app → example-rails-6-app}/Rakefile +0 -0
- data/example-rails-6-app/app/assets/config/manifest.js +2 -0
- data/{example-rails-app → example-rails-6-app}/app/assets/images/.keep +0 -0
- data/example-rails-6-app/app/assets/stylesheets/application.css +15 -0
- data/{example-rails-app → example-rails-6-app}/app/channels/application_cable/channel.rb +0 -0
- data/{example-rails-app → example-rails-6-app}/app/channels/application_cable/connection.rb +0 -0
- data/{example-rails-app → example-rails-6-app}/app/controllers/application_controller.rb +0 -0
- data/{example-rails-app → example-rails-6-app}/app/controllers/concerns/.keep +0 -0
- data/{example-rails-app → example-rails-6-app}/app/helpers/application_helper.rb +0 -0
- data/example-rails-6-app/app/javascript/channels/consumer.js +6 -0
- data/example-rails-6-app/app/javascript/channels/index.js +5 -0
- data/example-rails-6-app/app/javascript/packs/application.js +13 -0
- data/{example-rails-app → example-rails-6-app}/app/jobs/application_job.rb +0 -0
- data/example-rails-6-app/app/mailers/application_mailer.rb +4 -0
- data/example-rails-6-app/app/models/application_record.rb +3 -0
- data/{example-rails-app → example-rails-6-app}/app/models/concerns/.keep +0 -0
- data/{example-rails-app → example-rails-6-app}/app/models/example.rb +4 -4
- data/example-rails-6-app/app/views/layouts/application.html.erb +16 -0
- data/{example-rails-app → example-rails-6-app}/app/views/layouts/mailer.html.erb +0 -0
- data/{example-rails-app → example-rails-6-app}/app/views/layouts/mailer.text.erb +0 -0
- data/example-rails-6-app/babel.config.js +82 -0
- data/{example-rails-app → example-rails-6-app}/bin/bundle +0 -0
- data/example-rails-6-app/bin/rails +5 -0
- data/example-rails-6-app/bin/rake +5 -0
- data/example-rails-6-app/bin/setup +36 -0
- data/example-rails-6-app/bin/spring +14 -0
- data/example-rails-6-app/bin/webpack +18 -0
- data/example-rails-6-app/bin/webpack-dev-server +18 -0
- data/example-rails-6-app/bin/yarn +17 -0
- data/example-rails-6-app/config/application.rb +22 -0
- data/example-rails-6-app/config/boot.rb +4 -0
- data/example-rails-6-app/config/cable.yml +10 -0
- data/example-rails-6-app/config/credentials.yml.enc +1 -0
- data/example-rails-6-app/config/database.yml +25 -0
- data/{example-rails-app → example-rails-6-app}/config/environment.rb +0 -0
- data/example-rails-6-app/config/environments/development.rb +76 -0
- data/example-rails-6-app/config/environments/production.rb +120 -0
- data/example-rails-6-app/config/environments/test.rb +60 -0
- data/example-rails-6-app/config/initializers/application_controller_renderer.rb +8 -0
- data/example-rails-6-app/config/initializers/assets.rb +14 -0
- data/example-rails-6-app/config/initializers/backtrace_silencers.rb +8 -0
- data/example-rails-6-app/config/initializers/content_security_policy.rb +30 -0
- data/example-rails-6-app/config/initializers/cookies_serializer.rb +5 -0
- data/example-rails-6-app/config/initializers/filter_parameter_logging.rb +6 -0
- data/example-rails-6-app/config/initializers/inflections.rb +16 -0
- data/example-rails-6-app/config/initializers/mime_types.rb +4 -0
- data/{example-rails-app → example-rails-6-app}/config/initializers/permissions_policy.rb +0 -0
- data/example-rails-6-app/config/initializers/wrap_parameters.rb +14 -0
- data/example-rails-6-app/config/locales/en.yml +33 -0
- data/example-rails-6-app/config/puma.rb +43 -0
- data/example-rails-6-app/config/routes.rb +3 -0
- data/example-rails-6-app/config/spring.rb +6 -0
- data/example-rails-6-app/config/storage.yml +34 -0
- data/example-rails-6-app/config/webpack/development.js +5 -0
- data/example-rails-6-app/config/webpack/environment.js +3 -0
- data/example-rails-6-app/config/webpack/production.js +5 -0
- data/example-rails-6-app/config/webpack/test.js +5 -0
- data/example-rails-6-app/config/webpacker.yml +92 -0
- data/{example-rails-app → example-rails-6-app}/config.ru +0 -0
- data/example-rails-6-app/db/migrate/20221102224703_create_examples.rb +8 -0
- data/example-rails-6-app/db/schema.rb +20 -0
- data/example-rails-6-app/db/seeds.rb +7 -0
- data/{example-rails-app → example-rails-6-app}/lib/assets/.keep +0 -0
- data/{example-rails-app → example-rails-6-app}/lib/tasks/.keep +0 -0
- data/{example-rails-app → example-rails-6-app}/log/.keep +0 -0
- data/example-rails-6-app/package.json +17 -0
- data/example-rails-6-app/postcss.config.js +12 -0
- data/{example-rails-app → example-rails-6-app}/public/404.html +0 -0
- data/{example-rails-app → example-rails-6-app}/public/422.html +0 -0
- data/{example-rails-app → example-rails-6-app}/public/500.html +0 -0
- data/{example-rails-app → example-rails-6-app}/public/apple-touch-icon-precomposed.png +0 -0
- data/{example-rails-app → example-rails-6-app}/public/apple-touch-icon.png +0 -0
- data/{example-rails-app → example-rails-6-app}/public/favicon.ico +0 -0
- data/{example-rails-app → example-rails-6-app}/public/robots.txt +0 -0
- data/{example-rails-app → example-rails-6-app}/storage/.keep +0 -0
- data/{example-rails-app → example-rails-6-app}/test/application_system_test_case.rb +0 -0
- data/{example-rails-app → example-rails-6-app}/test/channels/application_cable/connection_test.rb +0 -0
- data/{example-rails-app → example-rails-6-app}/test/controllers/.keep +0 -0
- data/{example-rails-app → example-rails-6-app}/test/fixtures/files/.keep +0 -0
- data/{example-rails-app → example-rails-6-app}/test/helpers/.keep +0 -0
- data/{example-rails-app → example-rails-6-app}/test/integration/.keep +0 -0
- data/{example-rails-app → example-rails-6-app}/test/mailers/.keep +0 -0
- data/{example-rails-app → example-rails-6-app}/test/models/.keep +0 -0
- data/{example-rails-app → example-rails-6-app}/test/system/.keep +0 -0
- data/example-rails-6-app/test/test_helper.rb +13 -0
- data/{example-rails-app → example-rails-6-app}/tmp/.keep +0 -0
- data/{example-rails-app → example-rails-6-app}/tmp/pids/.keep +0 -0
- data/{example-rails-app/tmp/storage → example-rails-6-app/vendor}/.keep +0 -0
- data/example-rails-6-app/yarn.lock +7108 -0
- data/{example-rails-app → example-rails-7-app}/.gitattributes +0 -0
- data/{example-rails-app → example-rails-7-app}/.gitignore +0 -0
- data/{example-rails-app → example-rails-7-app}/.ruby-version +0 -0
- data/example-rails-7-app/Clockfile +19 -0
- data/{example-rails-app → example-rails-7-app}/Gemfile +1 -1
- data/example-rails-7-app/Gemfile.lock +247 -0
- data/{example-rails-app → example-rails-7-app}/README.md +0 -0
- data/example-rails-7-app/Rakefile +6 -0
- data/{example-rails-app → example-rails-7-app}/app/assets/config/manifest.js +0 -0
- data/{example-rails-app/vendor → example-rails-7-app/app/assets/images}/.keep +0 -0
- data/{example-rails-app → example-rails-7-app}/app/assets/stylesheets/application.css +0 -0
- data/example-rails-7-app/app/channels/application_cable/channel.rb +4 -0
- data/example-rails-7-app/app/channels/application_cable/connection.rb +4 -0
- data/example-rails-7-app/app/controllers/application_controller.rb +2 -0
- data/{example-rails-app/vendor/javascript → example-rails-7-app/app/controllers/concerns}/.keep +0 -0
- data/example-rails-7-app/app/helpers/application_helper.rb +2 -0
- data/{example-rails-app → example-rails-7-app}/app/javascript/application.js +0 -0
- data/{example-rails-app → example-rails-7-app}/app/javascript/controllers/application.js +0 -0
- data/{example-rails-app → example-rails-7-app}/app/javascript/controllers/hello_controller.js +0 -0
- data/{example-rails-app → example-rails-7-app}/app/javascript/controllers/index.js +0 -0
- data/example-rails-7-app/app/jobs/application_job.rb +7 -0
- data/{example-rails-app → example-rails-7-app}/app/mailers/application_mailer.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/app/models/application_record.rb +0 -0
- data/example-rails-7-app/app/models/concerns/.keep +0 -0
- data/example-rails-7-app/app/models/example.rb +18 -0
- data/{example-rails-app → example-rails-7-app}/app/views/layouts/application.html.erb +0 -0
- data/example-rails-7-app/app/views/layouts/mailer.html.erb +13 -0
- data/example-rails-7-app/app/views/layouts/mailer.text.erb +1 -0
- data/example-rails-7-app/bin/bundle +114 -0
- data/{example-rails-app → example-rails-7-app}/bin/importmap +0 -0
- data/{example-rails-app → example-rails-7-app}/bin/rails +0 -0
- data/{example-rails-app → example-rails-7-app}/bin/rake +0 -0
- data/{example-rails-app → example-rails-7-app}/bin/setup +0 -0
- data/{example-rails-app → example-rails-7-app}/config/application.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/config/boot.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/config/cable.yml +0 -0
- data/{example-rails-app → example-rails-7-app}/config/credentials.yml.enc +0 -0
- data/{example-rails-app → example-rails-7-app}/config/database.yml +0 -0
- data/example-rails-7-app/config/environment.rb +5 -0
- data/{example-rails-app → example-rails-7-app}/config/environments/development.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/config/environments/production.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/config/environments/test.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/config/importmap.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/config/initializers/assets.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/config/initializers/content_security_policy.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/config/initializers/filter_parameter_logging.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/config/initializers/inflections.rb +0 -0
- data/example-rails-7-app/config/initializers/permissions_policy.rb +11 -0
- data/{example-rails-app → example-rails-7-app}/config/locales/en.yml +0 -0
- data/{example-rails-app → example-rails-7-app}/config/puma.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/config/routes.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/config/storage.yml +0 -0
- data/example-rails-7-app/config.ru +6 -0
- data/{example-rails-app → example-rails-7-app}/db/migrate/20221001175928_create_examples.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/db/schema.rb +0 -0
- data/{example-rails-app → example-rails-7-app}/db/seeds.rb +0 -0
- data/example-rails-7-app/lib/assets/.keep +0 -0
- data/example-rails-7-app/lib/tasks/.keep +0 -0
- data/example-rails-7-app/log/.keep +0 -0
- data/example-rails-7-app/public/404.html +67 -0
- data/example-rails-7-app/public/422.html +67 -0
- data/example-rails-7-app/public/500.html +66 -0
- data/example-rails-7-app/public/apple-touch-icon-precomposed.png +0 -0
- data/example-rails-7-app/public/apple-touch-icon.png +0 -0
- data/example-rails-7-app/public/favicon.ico +0 -0
- data/example-rails-7-app/public/robots.txt +1 -0
- data/example-rails-7-app/storage/.keep +0 -0
- data/example-rails-7-app/test/application_system_test_case.rb +5 -0
- data/example-rails-7-app/test/channels/application_cable/connection_test.rb +11 -0
- data/example-rails-7-app/test/controllers/.keep +0 -0
- data/example-rails-7-app/test/fixtures/files/.keep +0 -0
- data/example-rails-7-app/test/helpers/.keep +0 -0
- data/example-rails-7-app/test/integration/.keep +0 -0
- data/example-rails-7-app/test/mailers/.keep +0 -0
- data/example-rails-7-app/test/models/.keep +0 -0
- data/example-rails-7-app/test/system/.keep +0 -0
- data/{example-rails-app → example-rails-7-app}/test/test_helper.rb +0 -0
- data/example-rails-7-app/tmp/.keep +0 -0
- data/example-rails-7-app/tmp/pids/.keep +0 -0
- data/example-rails-7-app/tmp/storage/.keep +0 -0
- data/example-rails-7-app/vendor/.keep +0 -0
- data/example-rails-7-app/vendor/javascript/.keep +0 -0
- data/exe/clock +1 -0
- data/lib/ruby-clock/dsl.rb +16 -0
- data/lib/ruby-clock/version.rb +1 -1
- data/lib/ruby-clock.rb +0 -3
- data/ruby-clock.gemspec +1 -1
- metadata +182 -85
- data/lib/ruby-clock/runners.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 748f887bbd3b6076b86585e8734f2fc131ec3312bd10c330e5adc867643d7776
|
4
|
+
data.tar.gz: 8c449e3389930814e009ad6850e1a5e4a049ffe0e50364f834dc0b1e1cef1def
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85af8021686f2148b0f295fdd4b0c0e3eba7457a3a060f34d1f9fed67ff17ab6ba2f62983912ee481dea45db14a547ffe6b496a6fea59986e271e66f768a0212
|
7
|
+
data.tar.gz: da361427d50908de9c9a4a949a284831536fbf2e0f1980a9906f23d19e80150d3f1f4085031df06850a63529a23eddb7d48956de7352ff2679d6c026eced8e2e
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -12,22 +12,25 @@
|
|
12
12
|
will be reported to the error handler
|
13
13
|
|
14
14
|
### Anti-Features
|
15
|
-
*
|
15
|
+
* ruby 3.0 is now the minimum version
|
16
16
|
|
17
17
|
### Code Improvements
|
18
18
|
* The code which implements the rails reloader/executor is now less complicated
|
19
19
|
* Code reorganization so there are no unnecessary methods in top-level Kernel namespace
|
20
|
+
* top-level DSL methods are now implemented with refinements, so they don't polute other code
|
20
21
|
|
21
22
|
|
22
23
|
### Migrating from ruby-clock version 1 to version 2
|
23
24
|
|
25
|
+
* The minimum ruby version is 3.0
|
24
26
|
* The top of every Clockfile must begin with `using RubyClock::DSL`
|
25
|
-
* rake and shell runners must be invoked like so: `RubyClock::Runners.rake`, `RubyClock::Runners.shell`, etc.
|
26
27
|
* If you have an existing `def schedule.around_trigger`, you will need to change it to use the new
|
27
28
|
`around_action` method.
|
28
29
|
* Your existing Clockfile will still work, but you now have the option to use
|
29
30
|
`every`, `cron`, and `on_error` at the top-level, without referencing `schedule`.
|
30
31
|
See the readme for examples.
|
32
|
+
* You now have the option of catching and reporting errors encountered when parsing the Clockfile.
|
33
|
+
See the readme.
|
31
34
|
* There is no longer a need to have a binstub in rails. You can delete bin/clock from your app.
|
32
35
|
* The invocations (in Procfile, or wherever else you start ruby-clock) should change from
|
33
36
|
|
data/README.md
CHANGED
@@ -92,7 +92,7 @@ You may wish to
|
|
92
92
|
for your jobs. You can do so with the around trigger:
|
93
93
|
|
94
94
|
```ruby
|
95
|
-
around_action
|
95
|
+
around_action do |job_proc|
|
96
96
|
ActiveRecord::Base.uncached do
|
97
97
|
job_proc.call
|
98
98
|
end
|
@@ -200,13 +200,39 @@ instead of `around_action`.
|
|
200
200
|
Read [the rufus-scheduler documentation](https://github.com/jmettraux/rufus-scheduler/#callbacks)
|
201
201
|
to learn how to do this. Where the documentation references `s`, you should use `schedule`.
|
202
202
|
|
203
|
+
### Variables
|
204
|
+
|
205
|
+
Like all rufus-scheduler features,
|
206
|
+
[local variables](https://github.com/jmettraux/rufus-scheduler/#--key-has_key-keys-values-and-entries)
|
207
|
+
can be defined per job. These can be used
|
208
|
+
in various ways, notably accessible by around actions and error handlers.
|
209
|
+
|
210
|
+
```ruby
|
211
|
+
cron '5 0 * * *', locals: { app_area: 'reports' } do
|
212
|
+
DailyActivitySummary.generate_and_send
|
213
|
+
end
|
214
|
+
|
215
|
+
around_action do |job_proc, job_info|
|
216
|
+
StatsTracker.increment("#{job_info[:app_area]} jobs")
|
217
|
+
job_proc.call
|
218
|
+
end
|
219
|
+
on_error do |job, error|
|
220
|
+
case job
|
221
|
+
when String # this means there was a problem parsing the Clockfile while starting
|
222
|
+
ErrorReporter.track_exception(error, tag: ['clock', job[:app_area]], severity: 'high')
|
223
|
+
else
|
224
|
+
ErrorReporter.track_exception(error, tag: ['clock', job[:app_area]], custom_attribute: {job_name: job.identifier})
|
225
|
+
end
|
226
|
+
end
|
227
|
+
```
|
228
|
+
|
203
229
|
### Shell commands
|
204
230
|
|
205
231
|
You can run shell commands in your jobs.
|
206
232
|
|
207
233
|
```ruby
|
208
234
|
every '1 day' do
|
209
|
-
|
235
|
+
shell('sh scripts/process_stuff.sh')
|
210
236
|
end
|
211
237
|
```
|
212
238
|
|
@@ -252,11 +278,11 @@ needing to shell out and start another process.
|
|
252
278
|
|
253
279
|
```ruby
|
254
280
|
every '1 day' do
|
255
|
-
|
281
|
+
rake('reports:daily')
|
256
282
|
end
|
257
283
|
```
|
258
284
|
|
259
|
-
There
|
285
|
+
There are also `rake_execute` and `rake_async`.
|
260
286
|
See [the code](https://github.com/jjb/ruby-clock/blob/main/lib/rake.rb)
|
261
287
|
and [this article](https://code.jjb.cc/running-rake-tasks-from-within-ruby-on-rails-code) for more info.
|
262
288
|
|
@@ -295,7 +321,7 @@ This can be used for keeping track of job behavior in logs or a
|
|
295
321
|
stats tracker. For example:
|
296
322
|
|
297
323
|
```ruby
|
298
|
-
around_action
|
324
|
+
around_action do |job_proc, job_info|
|
299
325
|
trigger_time = Time.now
|
300
326
|
job_proc.call
|
301
327
|
duration = Time.now-trigger_time.to_t
|
data/example-app/Clockfile
CHANGED
@@ -30,11 +30,11 @@ every('2 seconds') do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
every('2 seconds') do
|
33
|
-
|
33
|
+
shell 'say hello'
|
34
34
|
end
|
35
35
|
|
36
36
|
every('2 seconds') do
|
37
|
-
raise "
|
37
|
+
raise "😅 this error is expected, to test the error catcher"
|
38
38
|
end
|
39
39
|
|
40
40
|
cron('*/10 * * * * *') do
|
@@ -42,14 +42,18 @@ cron('*/10 * * * * *') do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
every('2 seconds') do
|
45
|
-
if defined?(schedule)
|
46
|
-
raise "💥 we
|
45
|
+
if !defined?(schedule)
|
46
|
+
raise "💥 we expect the ruby-clock DSL to be available inside a job, but it is not"
|
47
|
+
else
|
48
|
+
puts '✅'
|
47
49
|
end
|
48
50
|
end
|
49
51
|
|
50
52
|
every('2 seconds') do
|
51
|
-
if defined?(shell) || defined?(rake)
|
52
|
-
puts "💥 we
|
53
|
+
if !defined?(shell) || !defined?(rake)
|
54
|
+
puts "💥 we expect runners to be available inside a job, but they are not"
|
55
|
+
else
|
56
|
+
puts '✅'
|
53
57
|
end
|
54
58
|
end
|
55
59
|
|
data/example-app/Gemfile
CHANGED
data/example-app/Gemfile.lock
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
defaults
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# See https://git-scm.com/docs/gitattributes for more about git attribute files.
|
2
|
+
|
3
|
+
# Mark the database schema as having been generated.
|
4
|
+
db/schema.rb linguist-generated
|
5
|
+
|
6
|
+
# Mark the yarn lockfile as having been generated.
|
7
|
+
yarn.lock linguist-generated
|
8
|
+
|
9
|
+
# Mark any vendored files as having been vendored.
|
10
|
+
vendor/* linguist-vendored
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
+
|
7
|
+
# Ignore bundler config.
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the default SQLite database.
|
11
|
+
/db/*.sqlite3
|
12
|
+
/db/*.sqlite3-*
|
13
|
+
|
14
|
+
# Ignore all logfiles and tempfiles.
|
15
|
+
/log/*
|
16
|
+
/tmp/*
|
17
|
+
!/log/.keep
|
18
|
+
!/tmp/.keep
|
19
|
+
|
20
|
+
# Ignore pidfiles, but keep the directory.
|
21
|
+
/tmp/pids/*
|
22
|
+
!/tmp/pids/
|
23
|
+
!/tmp/pids/.keep
|
24
|
+
|
25
|
+
# Ignore uploaded files in development.
|
26
|
+
/storage/*
|
27
|
+
!/storage/.keep
|
28
|
+
|
29
|
+
/public/assets
|
30
|
+
.byebug_history
|
31
|
+
|
32
|
+
# Ignore master key for decrypting credentials and more.
|
33
|
+
/config/master.key
|
34
|
+
|
35
|
+
/public/packs
|
36
|
+
/public/packs-test
|
37
|
+
/node_modules
|
38
|
+
/yarn-error.log
|
39
|
+
yarn-debug.log*
|
40
|
+
.yarn-integrity
|
@@ -0,0 +1 @@
|
|
1
|
+
3.1.2
|
@@ -0,0 +1,62 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
|
+
|
4
|
+
ruby '>= 3.0'
|
5
|
+
|
6
|
+
gem 'ruby-clock', path: '../', require: false
|
7
|
+
|
8
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
|
9
|
+
gem 'rails', '~> 6.1.7'
|
10
|
+
# Use sqlite3 as the database for Active Record
|
11
|
+
gem 'sqlite3', '~> 1.4'
|
12
|
+
# Use Puma as the app server
|
13
|
+
gem 'puma', '~> 5.0'
|
14
|
+
# Use SCSS for stylesheets
|
15
|
+
gem 'sass-rails', '>= 6'
|
16
|
+
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
|
17
|
+
gem 'webpacker', '~> 5.0'
|
18
|
+
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
19
|
+
gem 'turbolinks', '~> 5'
|
20
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
21
|
+
gem 'jbuilder', '~> 2.7'
|
22
|
+
# Use Redis adapter to run Action Cable in production
|
23
|
+
# gem 'redis', '~> 4.0'
|
24
|
+
# Use Active Model has_secure_password
|
25
|
+
# gem 'bcrypt', '~> 3.1.7'
|
26
|
+
|
27
|
+
# Use Active Storage variant
|
28
|
+
# gem 'image_processing', '~> 1.2'
|
29
|
+
|
30
|
+
# Reduces boot times through caching; required in config/boot.rb
|
31
|
+
gem 'bootsnap', '>= 1.4.4', require: false
|
32
|
+
|
33
|
+
group :development, :test do
|
34
|
+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
35
|
+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
36
|
+
end
|
37
|
+
|
38
|
+
group :development do
|
39
|
+
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
|
40
|
+
gem 'web-console', '>= 4.1.0'
|
41
|
+
# Display performance information such as SQL time and flame graphs for each request in your browser.
|
42
|
+
# Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
|
43
|
+
gem 'rack-mini-profiler', '~> 2.0'
|
44
|
+
gem 'listen', '~> 3.3'
|
45
|
+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
46
|
+
gem 'spring'
|
47
|
+
end
|
48
|
+
|
49
|
+
group :test do
|
50
|
+
# Adds support for Capybara system testing and selenium driver
|
51
|
+
gem 'capybara', '>= 3.26'
|
52
|
+
gem 'selenium-webdriver', '>= 4.0.0.rc1'
|
53
|
+
# Easy installation and use of web drivers to run system tests with browsers
|
54
|
+
gem 'webdrivers'
|
55
|
+
end
|
56
|
+
|
57
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
58
|
+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
59
|
+
|
60
|
+
gem 'net-smtp'
|
61
|
+
gem 'net-pop'
|
62
|
+
gem 'net-imap'
|
@@ -0,0 +1,270 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
ruby-clock (2.0.0.beta5)
|
5
|
+
method_source
|
6
|
+
rufus-scheduler (~> 3.8)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actioncable (6.1.7)
|
12
|
+
actionpack (= 6.1.7)
|
13
|
+
activesupport (= 6.1.7)
|
14
|
+
nio4r (~> 2.0)
|
15
|
+
websocket-driver (>= 0.6.1)
|
16
|
+
actionmailbox (6.1.7)
|
17
|
+
actionpack (= 6.1.7)
|
18
|
+
activejob (= 6.1.7)
|
19
|
+
activerecord (= 6.1.7)
|
20
|
+
activestorage (= 6.1.7)
|
21
|
+
activesupport (= 6.1.7)
|
22
|
+
mail (>= 2.7.1)
|
23
|
+
actionmailer (6.1.7)
|
24
|
+
actionpack (= 6.1.7)
|
25
|
+
actionview (= 6.1.7)
|
26
|
+
activejob (= 6.1.7)
|
27
|
+
activesupport (= 6.1.7)
|
28
|
+
mail (~> 2.5, >= 2.5.4)
|
29
|
+
rails-dom-testing (~> 2.0)
|
30
|
+
actionpack (6.1.7)
|
31
|
+
actionview (= 6.1.7)
|
32
|
+
activesupport (= 6.1.7)
|
33
|
+
rack (~> 2.0, >= 2.0.9)
|
34
|
+
rack-test (>= 0.6.3)
|
35
|
+
rails-dom-testing (~> 2.0)
|
36
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
37
|
+
actiontext (6.1.7)
|
38
|
+
actionpack (= 6.1.7)
|
39
|
+
activerecord (= 6.1.7)
|
40
|
+
activestorage (= 6.1.7)
|
41
|
+
activesupport (= 6.1.7)
|
42
|
+
nokogiri (>= 1.8.5)
|
43
|
+
actionview (6.1.7)
|
44
|
+
activesupport (= 6.1.7)
|
45
|
+
builder (~> 3.1)
|
46
|
+
erubi (~> 1.4)
|
47
|
+
rails-dom-testing (~> 2.0)
|
48
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
49
|
+
activejob (6.1.7)
|
50
|
+
activesupport (= 6.1.7)
|
51
|
+
globalid (>= 0.3.6)
|
52
|
+
activemodel (6.1.7)
|
53
|
+
activesupport (= 6.1.7)
|
54
|
+
activerecord (6.1.7)
|
55
|
+
activemodel (= 6.1.7)
|
56
|
+
activesupport (= 6.1.7)
|
57
|
+
activestorage (6.1.7)
|
58
|
+
actionpack (= 6.1.7)
|
59
|
+
activejob (= 6.1.7)
|
60
|
+
activerecord (= 6.1.7)
|
61
|
+
activesupport (= 6.1.7)
|
62
|
+
marcel (~> 1.0)
|
63
|
+
mini_mime (>= 1.1.0)
|
64
|
+
activesupport (6.1.7)
|
65
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
66
|
+
i18n (>= 1.6, < 2)
|
67
|
+
minitest (>= 5.1)
|
68
|
+
tzinfo (~> 2.0)
|
69
|
+
zeitwerk (~> 2.3)
|
70
|
+
addressable (2.8.1)
|
71
|
+
public_suffix (>= 2.0.2, < 6.0)
|
72
|
+
bindex (0.8.1)
|
73
|
+
bootsnap (1.13.0)
|
74
|
+
msgpack (~> 1.2)
|
75
|
+
builder (3.2.4)
|
76
|
+
byebug (11.1.3)
|
77
|
+
capybara (3.37.1)
|
78
|
+
addressable
|
79
|
+
matrix
|
80
|
+
mini_mime (>= 0.1.3)
|
81
|
+
nokogiri (~> 1.8)
|
82
|
+
rack (>= 1.6.0)
|
83
|
+
rack-test (>= 0.6.3)
|
84
|
+
regexp_parser (>= 1.5, < 3.0)
|
85
|
+
xpath (~> 3.2)
|
86
|
+
childprocess (4.1.0)
|
87
|
+
concurrent-ruby (1.1.10)
|
88
|
+
crass (1.0.6)
|
89
|
+
digest (3.1.0)
|
90
|
+
erubi (1.11.0)
|
91
|
+
et-orbi (1.2.7)
|
92
|
+
tzinfo
|
93
|
+
ffi (1.15.5)
|
94
|
+
fugit (1.7.1)
|
95
|
+
et-orbi (~> 1, >= 1.2.7)
|
96
|
+
raabro (~> 1.4)
|
97
|
+
globalid (1.0.0)
|
98
|
+
activesupport (>= 5.0)
|
99
|
+
i18n (1.12.0)
|
100
|
+
concurrent-ruby (~> 1.0)
|
101
|
+
jbuilder (2.11.5)
|
102
|
+
actionview (>= 5.0.0)
|
103
|
+
activesupport (>= 5.0.0)
|
104
|
+
listen (3.7.1)
|
105
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
106
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
107
|
+
loofah (2.19.0)
|
108
|
+
crass (~> 1.0.2)
|
109
|
+
nokogiri (>= 1.5.9)
|
110
|
+
mail (2.7.1)
|
111
|
+
mini_mime (>= 0.1.1)
|
112
|
+
marcel (1.0.2)
|
113
|
+
matrix (0.4.2)
|
114
|
+
method_source (1.0.0)
|
115
|
+
mini_mime (1.1.2)
|
116
|
+
mini_portile2 (2.8.0)
|
117
|
+
minitest (5.16.3)
|
118
|
+
msgpack (1.6.0)
|
119
|
+
net-imap (0.3.1)
|
120
|
+
net-protocol
|
121
|
+
net-pop (0.1.2)
|
122
|
+
net-protocol
|
123
|
+
net-protocol (0.1.3)
|
124
|
+
timeout
|
125
|
+
net-smtp (0.3.1)
|
126
|
+
digest
|
127
|
+
net-protocol
|
128
|
+
timeout
|
129
|
+
nio4r (2.5.8)
|
130
|
+
nokogiri (1.13.9)
|
131
|
+
mini_portile2 (~> 2.8.0)
|
132
|
+
racc (~> 1.4)
|
133
|
+
nokogiri (1.13.9-arm64-darwin)
|
134
|
+
racc (~> 1.4)
|
135
|
+
public_suffix (5.0.0)
|
136
|
+
puma (5.6.5)
|
137
|
+
nio4r (~> 2.0)
|
138
|
+
raabro (1.4.0)
|
139
|
+
racc (1.6.0)
|
140
|
+
rack (2.2.4)
|
141
|
+
rack-mini-profiler (2.3.4)
|
142
|
+
rack (>= 1.2.0)
|
143
|
+
rack-proxy (0.7.4)
|
144
|
+
rack
|
145
|
+
rack-test (2.0.2)
|
146
|
+
rack (>= 1.3)
|
147
|
+
rails (6.1.7)
|
148
|
+
actioncable (= 6.1.7)
|
149
|
+
actionmailbox (= 6.1.7)
|
150
|
+
actionmailer (= 6.1.7)
|
151
|
+
actionpack (= 6.1.7)
|
152
|
+
actiontext (= 6.1.7)
|
153
|
+
actionview (= 6.1.7)
|
154
|
+
activejob (= 6.1.7)
|
155
|
+
activemodel (= 6.1.7)
|
156
|
+
activerecord (= 6.1.7)
|
157
|
+
activestorage (= 6.1.7)
|
158
|
+
activesupport (= 6.1.7)
|
159
|
+
bundler (>= 1.15.0)
|
160
|
+
railties (= 6.1.7)
|
161
|
+
sprockets-rails (>= 2.0.0)
|
162
|
+
rails-dom-testing (2.0.3)
|
163
|
+
activesupport (>= 4.2.0)
|
164
|
+
nokogiri (>= 1.6)
|
165
|
+
rails-html-sanitizer (1.4.3)
|
166
|
+
loofah (~> 2.3)
|
167
|
+
railties (6.1.7)
|
168
|
+
actionpack (= 6.1.7)
|
169
|
+
activesupport (= 6.1.7)
|
170
|
+
method_source
|
171
|
+
rake (>= 12.2)
|
172
|
+
thor (~> 1.0)
|
173
|
+
rake (13.0.6)
|
174
|
+
rb-fsevent (0.11.2)
|
175
|
+
rb-inotify (0.10.1)
|
176
|
+
ffi (~> 1.0)
|
177
|
+
regexp_parser (2.6.0)
|
178
|
+
rexml (3.2.5)
|
179
|
+
rubyzip (2.3.2)
|
180
|
+
rufus-scheduler (3.8.2)
|
181
|
+
fugit (~> 1.1, >= 1.1.6)
|
182
|
+
sass-rails (6.0.0)
|
183
|
+
sassc-rails (~> 2.1, >= 2.1.1)
|
184
|
+
sassc (2.4.0)
|
185
|
+
ffi (~> 1.9)
|
186
|
+
sassc-rails (2.1.2)
|
187
|
+
railties (>= 4.0.0)
|
188
|
+
sassc (>= 2.0)
|
189
|
+
sprockets (> 3.0)
|
190
|
+
sprockets-rails
|
191
|
+
tilt
|
192
|
+
selenium-webdriver (4.5.0)
|
193
|
+
childprocess (>= 0.5, < 5.0)
|
194
|
+
rexml (~> 3.2, >= 3.2.5)
|
195
|
+
rubyzip (>= 1.2.2, < 3.0)
|
196
|
+
websocket (~> 1.0)
|
197
|
+
semantic_range (3.0.0)
|
198
|
+
spring (4.1.0)
|
199
|
+
sprockets (4.1.1)
|
200
|
+
concurrent-ruby (~> 1.0)
|
201
|
+
rack (> 1, < 3)
|
202
|
+
sprockets-rails (3.4.2)
|
203
|
+
actionpack (>= 5.2)
|
204
|
+
activesupport (>= 5.2)
|
205
|
+
sprockets (>= 3.0.0)
|
206
|
+
sqlite3 (1.5.3)
|
207
|
+
mini_portile2 (~> 2.8.0)
|
208
|
+
sqlite3 (1.5.3-arm64-darwin)
|
209
|
+
thor (1.2.1)
|
210
|
+
tilt (2.0.11)
|
211
|
+
timeout (0.3.0)
|
212
|
+
turbolinks (5.2.1)
|
213
|
+
turbolinks-source (~> 5.2)
|
214
|
+
turbolinks-source (5.2.0)
|
215
|
+
tzinfo (2.0.5)
|
216
|
+
concurrent-ruby (~> 1.0)
|
217
|
+
web-console (4.2.0)
|
218
|
+
actionview (>= 6.0.0)
|
219
|
+
activemodel (>= 6.0.0)
|
220
|
+
bindex (>= 0.4.0)
|
221
|
+
railties (>= 6.0.0)
|
222
|
+
webdrivers (5.2.0)
|
223
|
+
nokogiri (~> 1.6)
|
224
|
+
rubyzip (>= 1.3.0)
|
225
|
+
selenium-webdriver (~> 4.0)
|
226
|
+
webpacker (5.4.3)
|
227
|
+
activesupport (>= 5.2)
|
228
|
+
rack-proxy (>= 0.6.1)
|
229
|
+
railties (>= 5.2)
|
230
|
+
semantic_range (>= 2.3.0)
|
231
|
+
websocket (1.2.9)
|
232
|
+
websocket-driver (0.7.5)
|
233
|
+
websocket-extensions (>= 0.1.0)
|
234
|
+
websocket-extensions (0.1.5)
|
235
|
+
xpath (3.2.0)
|
236
|
+
nokogiri (~> 1.8)
|
237
|
+
zeitwerk (2.6.4)
|
238
|
+
|
239
|
+
PLATFORMS
|
240
|
+
arm64-darwin-21
|
241
|
+
ruby
|
242
|
+
|
243
|
+
DEPENDENCIES
|
244
|
+
bootsnap (>= 1.4.4)
|
245
|
+
byebug
|
246
|
+
capybara (>= 3.26)
|
247
|
+
jbuilder (~> 2.7)
|
248
|
+
listen (~> 3.3)
|
249
|
+
net-imap
|
250
|
+
net-pop
|
251
|
+
net-smtp
|
252
|
+
puma (~> 5.0)
|
253
|
+
rack-mini-profiler (~> 2.0)
|
254
|
+
rails (~> 6.1.7)
|
255
|
+
ruby-clock!
|
256
|
+
sass-rails (>= 6)
|
257
|
+
selenium-webdriver (>= 4.0.0.rc1)
|
258
|
+
spring
|
259
|
+
sqlite3 (~> 1.4)
|
260
|
+
turbolinks (~> 5)
|
261
|
+
tzinfo-data
|
262
|
+
web-console (>= 4.1.0)
|
263
|
+
webdrivers
|
264
|
+
webpacker (~> 5.0)
|
265
|
+
|
266
|
+
RUBY VERSION
|
267
|
+
ruby 3.1.2p20
|
268
|
+
|
269
|
+
BUNDLED WITH
|
270
|
+
2.3.10
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
File without changes
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
|
6
|
+
* vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
// Action Cable provides the framework to deal with WebSockets in Rails.
|
2
|
+
// You can generate new channels where WebSocket features live using the `bin/rails generate channel` command.
|
3
|
+
|
4
|
+
import { createConsumer } from "@rails/actioncable"
|
5
|
+
|
6
|
+
export default createConsumer()
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// This file is automatically compiled by Webpack, along with any other files
|
2
|
+
// present in this directory. You're encouraged to place your actual application logic in
|
3
|
+
// a relevant structure within app/javascript and only use these pack files to reference
|
4
|
+
// that code so it'll be compiled.
|
5
|
+
|
6
|
+
import Rails from "@rails/ujs"
|
7
|
+
import Turbolinks from "turbolinks"
|
8
|
+
import * as ActiveStorage from "@rails/activestorage"
|
9
|
+
import "channels"
|
10
|
+
|
11
|
+
Rails.start()
|
12
|
+
Turbolinks.start()
|
13
|
+
ActiveStorage.start()
|
File without changes
|