osbc 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.env +5 -0
- data/.rspec +1 -0
- data/.rubocop.yml +273 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Dockerfile +17 -0
- data/Gemfile +109 -0
- data/Gemfile.lock +343 -0
- data/LICENSE.md +21 -0
- data/LICENSE.txt +21 -0
- data/Procfile +3 -0
- data/Procfile.dev +2 -0
- data/README.md +185 -0
- data/Rakefile +6 -0
- data/app/assets/builds/.keep +0 -0
- data/app/assets/config/manifest.js +5 -0
- data/app/assets/images/.keep +0 -0
- data/app/assets/images/bg.png +0 -0
- data/app/assets/images/gimage.png +0 -0
- data/app/assets/images/image.png +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/outerspc.jpg +0 -0
- data/app/assets/images/proxy.jpg +0 -0
- data/app/assets/images/space.jpg +0 -0
- data/app/assets/images/space_four.jpg +0 -0
- data/app/assets/images/space_t.jpg +0 -0
- data/app/assets/images/space_th.jpg +0 -0
- data/app/assets/images/space_two.jpg +0 -0
- data/app/assets/images/th.jpg +0 -0
- data/app/assets/stylesheets/application.css +344 -0
- data/app/assets/stylesheets/application.tailwind.css +13 -0
- data/app/assets/stylesheets/home.css +0 -0
- data/app/channels/application_cable/channel.rb +6 -0
- data/app/channels/application_cable/connection.rb +6 -0
- data/app/controllers/api/v1/block_confirmations_controller.rb +65 -0
- data/app/controllers/application_controller.rb +72 -0
- data/app/controllers/blocks_controller.rb +20 -0
- data/app/controllers/chains_controller.rb +72 -0
- data/app/controllers/concerns/.keep +0 -0
- data/app/controllers/contracts_controller.rb +25 -0
- data/app/controllers/pools_controller.rb +73 -0
- data/app/controllers/signatures_controller.rb +25 -0
- data/app/controllers/tickets_controller.rb +76 -0
- data/app/controllers/transactions_controller.rb +48 -0
- data/app/controllers/users/confirmations_controller.rb +30 -0
- data/app/controllers/users/omniauth_callbacks_controller.rb +30 -0
- data/app/controllers/users/passwords_controller.rb +34 -0
- data/app/controllers/users/registrations_controller.rb +61 -0
- data/app/controllers/users/sessions_controller.rb +27 -0
- data/app/controllers/users/unlocks_controller.rb +30 -0
- data/app/controllers/wallets_controller.rb +18 -0
- data/app/helpers/application_helper.rb +4 -0
- data/app/helpers/blocks_helper.rb +4 -0
- data/app/helpers/chains_helper.rb +4 -0
- data/app/helpers/contracts_helper.rb +4 -0
- data/app/helpers/pools_helper.rb +4 -0
- data/app/helpers/signatures_helper.rb +4 -0
- data/app/helpers/tickets_helper.rb +4 -0
- data/app/helpers/transactions_helper.rb +4 -0
- data/app/helpers/wallets_helper.rb +4 -0
- data/app/javascript/application.js +3 -0
- data/app/javascript/controllers/application.js +9 -0
- data/app/javascript/controllers/hello_controller.js +7 -0
- data/app/javascript/controllers/index.js +11 -0
- data/app/jobs/application_job.rb +9 -0
- data/app/mailers/application_mailer.rb +6 -0
- data/app/models/acceptable_number_sequence.rb +4 -0
- data/app/models/acceptable_symbol_sequence.rb +4 -0
- data/app/models/acceptable_word.rb +4 -0
- data/app/models/application_record.rb +5 -0
- data/app/models/block.rb +17 -0
- data/app/models/chain.rb +10 -0
- data/app/models/concerns/.keep +0 -0
- data/app/models/concerns/sequences_validator.rb +30 -0
- data/app/models/concerns/wallet_exists_validator.rb +13 -0
- data/app/models/contract.rb +7 -0
- data/app/models/pool.rb +5 -0
- data/app/models/signature.rb +12 -0
- data/app/models/ticket.rb +11 -0
- data/app/models/transaction.rb +25 -0
- data/app/models/user.rb +44 -0
- data/app/models/wallet.rb +33 -0
- data/app/services/application_service.rb +23 -0
- data/app/services/assign_contracts_service.rb +162 -0
- data/app/services/create_ticket_service.rb +87 -0
- data/app/services/create_wallet_service.rb +20 -0
- data/app/services/transaction_to_block_service.rb +62 -0
- data/app/views/application/_featured_board.html.erb +77 -0
- data/app/views/application/home.html.slim +1 -0
- data/app/views/application/mining_profile.html.slim +59 -0
- data/app/views/application/privacy_policy.html.erb +0 -0
- data/app/views/application/terms.html.erb +0 -0
- data/app/views/blocks/_block.html.slim +13 -0
- data/app/views/blocks/_block.json.jbuilder +4 -0
- data/app/views/blocks/_form.html.slim +26 -0
- data/app/views/blocks/edit.html.slim +10 -0
- data/app/views/blocks/index.html.slim +12 -0
- data/app/views/blocks/index.json.jbuilder +3 -0
- data/app/views/blocks/new.html.slim +8 -0
- data/app/views/blocks/show.html.slim +8 -0
- data/app/views/blocks/show.json.jbuilder +3 -0
- data/app/views/chains/_chain.html.slim +16 -0
- data/app/views/chains/_chain.json.jbuilder +4 -0
- data/app/views/chains/_form.html.slim +30 -0
- data/app/views/chains/edit.html.slim +10 -0
- data/app/views/chains/index.html.slim +11 -0
- data/app/views/chains/index.json.jbuilder +3 -0
- data/app/views/chains/new.html.slim +8 -0
- data/app/views/chains/show.html.slim +10 -0
- data/app/views/chains/show.json.jbuilder +3 -0
- data/app/views/contracts/_contract.html.slim +8 -0
- data/app/views/contracts/_contract.json.jbuilder +4 -0
- data/app/views/contracts/_form.html.slim +34 -0
- data/app/views/contracts/edit.html.slim +10 -0
- data/app/views/contracts/index.html.slim +12 -0
- data/app/views/contracts/index.json.jbuilder +3 -0
- data/app/views/contracts/new.html.slim +8 -0
- data/app/views/contracts/show.html.slim +8 -0
- data/app/views/contracts/show.json.jbuilder +3 -0
- data/app/views/layouts/_alert.html.slim +6 -0
- data/app/views/layouts/_navbar.html.slim +27 -0
- data/app/views/layouts/_notice.html.slim +6 -0
- data/app/views/layouts/application.html.erb +32 -0
- data/app/views/layouts/mailer.html.erb +13 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/app/views/pools/_form.html.slim +30 -0
- data/app/views/pools/_pool.html.slim +16 -0
- data/app/views/pools/_pool.json.jbuilder +4 -0
- data/app/views/pools/edit.html.slim +10 -0
- data/app/views/pools/index.html.slim +12 -0
- data/app/views/pools/index.json.jbuilder +3 -0
- data/app/views/pools/new.html.slim +8 -0
- data/app/views/pools/show.html.slim +8 -0
- data/app/views/pools/show.json.jbuilder +3 -0
- data/app/views/signatures/_form.html.slim +46 -0
- data/app/views/signatures/_signature.html.slim +28 -0
- data/app/views/signatures/_signature.json.jbuilder +4 -0
- data/app/views/signatures/edit.html.slim +10 -0
- data/app/views/signatures/index.html.slim +10 -0
- data/app/views/signatures/index.json.jbuilder +3 -0
- data/app/views/signatures/new.html.slim +8 -0
- data/app/views/signatures/show.html.slim +10 -0
- data/app/views/signatures/show.json.jbuilder +3 -0
- data/app/views/tickets/_form.html.slim +26 -0
- data/app/views/tickets/_ticket.html.slim +10 -0
- data/app/views/tickets/_ticket.json.jbuilder +4 -0
- data/app/views/tickets/edit.html.slim +10 -0
- data/app/views/tickets/index.html.slim +16 -0
- data/app/views/tickets/index.json.jbuilder +3 -0
- data/app/views/tickets/new.html.slim +10 -0
- data/app/views/tickets/show.html.slim +8 -0
- data/app/views/tickets/show.json.jbuilder +3 -0
- data/app/views/transactions/_form.html.slim +16 -0
- data/app/views/transactions/_transaction.html.slim +24 -0
- data/app/views/transactions/_transaction.json.jbuilder +4 -0
- data/app/views/transactions/edit.html.slim +10 -0
- data/app/views/transactions/index.html.slim +19 -0
- data/app/views/transactions/index.json.jbuilder +3 -0
- data/app/views/transactions/new.html.slim +9 -0
- data/app/views/transactions/show.html.slim +8 -0
- data/app/views/transactions/show.json.jbuilder +3 -0
- data/app/views/users/confirmations/new.html.erb +16 -0
- data/app/views/users/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/users/mailer/email_changed.html.erb +7 -0
- data/app/views/users/mailer/password_change.html.erb +3 -0
- data/app/views/users/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/users/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/users/passwords/edit.html.erb +25 -0
- data/app/views/users/passwords/new.html.erb +16 -0
- data/app/views/users/registrations/edit.html.erb +43 -0
- data/app/views/users/registrations/new.html.erb +37 -0
- data/app/views/users/sessions/new.html.erb +30 -0
- data/app/views/users/shared/_error_messages.html.erb +15 -0
- data/app/views/users/shared/_links.html.erb +25 -0
- data/app/views/users/unlocks/new.html.erb +16 -0
- data/app/views/wallets/_form.html.slim +30 -0
- data/app/views/wallets/_wallet.html.slim +13 -0
- data/app/views/wallets/_wallet.json.jbuilder +4 -0
- data/app/views/wallets/edit.html.slim +10 -0
- data/app/views/wallets/index.html.slim +18 -0
- data/app/views/wallets/index.json.jbuilder +3 -0
- data/app/views/wallets/new.html.slim +8 -0
- data/app/views/wallets/show.html.slim +11 -0
- data/app/views/wallets/show.json.jbuilder +3 -0
- data/app/workers/application_worker.rb +82 -0
- data/app/workers/assign_contract_worker.rb +27 -0
- data/app/workers/create_ticket_worker.rb +23 -0
- data/app/workers/create_wallet_worker.rb +21 -0
- data/app/workers/transaction_to_block_worker.rb +48 -0
- data/bin/bundle +114 -0
- data/bin/console +15 -0
- data/bin/dev +9 -0
- data/bin/importmap +5 -0
- data/bin/osbc +77 -0
- data/bin/rails +6 -0
- data/bin/rake +6 -0
- data/bin/setup +35 -0
- data/config/application.rb +25 -0
- data/config/boot.rb +6 -0
- data/config/cable.yml +10 -0
- data/config/credentials.yml.enc +1 -0
- data/config/database.yml +21 -0
- data/config/environment.rb +7 -0
- data/config/environments/development.rb +73 -0
- data/config/environments/production.rb +95 -0
- data/config/environments/test.rb +62 -0
- data/config/importmap.rb +9 -0
- data/config/initializers/assets.rb +14 -0
- data/config/initializers/content_security_policy.rb +26 -0
- data/config/initializers/devise.rb +311 -0
- data/config/initializers/filter_parameter_logging.rb +10 -0
- data/config/initializers/inflections.rb +17 -0
- data/config/initializers/permissions_policy.rb +12 -0
- data/config/locales/devise.en.yml +65 -0
- data/config/locales/en.yml +33 -0
- data/config/puma.rb +45 -0
- data/config/routes/api.rb +9 -0
- data/config/routes.rb +30 -0
- data/config/sidekiq.yml +10 -0
- data/config/storage.yml +34 -0
- data/config/tailwind.config.js +23 -0
- data/config.ru +8 -0
- data/coverage/.last_run.json +5 -0
- data/coverage/.resultset.json +1853 -0
- data/coverage/.resultset.json.lock +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc.png +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_both.png +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_desc.png +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
- data/coverage/assets/0.12.3/application.css +1 -0
- data/coverage/assets/0.12.3/application.js +7 -0
- data/coverage/assets/0.12.3/colorbox/border.png +0 -0
- data/coverage/assets/0.12.3/colorbox/controls.png +0 -0
- data/coverage/assets/0.12.3/colorbox/loading.gif +0 -0
- data/coverage/assets/0.12.3/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.12.3/favicon_green.png +0 -0
- data/coverage/assets/0.12.3/favicon_red.png +0 -0
- data/coverage/assets/0.12.3/favicon_yellow.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/assets/0.12.3/loading.gif +0 -0
- data/coverage/assets/0.12.3/magnify.png +0 -0
- data/coverage/index.html +20731 -0
- data/db/migrate/20221018053949_devise_create_users.rb +45 -0
- data/db/migrate/20221019002956_create_chains.rb +13 -0
- data/db/migrate/20221020112137_create_blocks.rb +12 -0
- data/db/migrate/20221020123102_add_chain_to_blocks.rb +5 -0
- data/db/migrate/20221020150504_create_wallets.rb +13 -0
- data/db/migrate/20221022221059_create_transactions.rb +20 -0
- data/db/migrate/20221023011005_add_block_to_transactions.rb +5 -0
- data/db/migrate/20221023014707_create_contracts.rb +11 -0
- data/db/migrate/20221023040749_create_pools.rb +13 -0
- data/db/migrate/20221023041015_create_tickets.rb +11 -0
- data/db/migrate/20221023103509_add_contracts_count_to_block.rb +6 -0
- data/db/migrate/20221023110613_add_acceptable_word_list_to_users.rb +7 -0
- data/db/migrate/20221023113539_create_signatures.rb +19 -0
- data/db/migrate/20221023113750_create_acceptable_words.rb +9 -0
- data/db/migrate/20221023114152_create_acceptable_number_sequences.rb +9 -0
- data/db/migrate/20221023114203_create_acceptable_symbol_sequences.rb +9 -0
- data/db/migrate/20221023114324_add_user_acceptable_hash_to_tickets.rb +7 -0
- data/db/migrate/20221023114408_add_time_ref_to_tickets.rb +5 -0
- data/db/migrate/20221024125047_add_master_hash_to_blocks.rb +5 -0
- data/db/migrate/20221109161845_add_transactions_count_to_blocks.rb +5 -0
- data/db/migrate/20221117135003_add_balance_to_chains.rb +5 -0
- data/db/migrate/20221117203417_add_transaction_id_list_to_tickets.rb +5 -0
- data/db/migrate/20221118080357_add_api_keys_to_users.rb +6 -0
- data/db/schema.rb +179 -0
- data/db/seeds.rb +134 -0
- data/docker-compose.yml +53 -0
- data/entrypoint.sh +8 -0
- data/lib/assets/.keep +0 -0
- data/lib/osbc/osbc.rb +9 -0
- data/lib/outerspace/blockchain/version.rb +7 -0
- data/lib/outerspace/blockchain.rb +10 -0
- data/lib/tasks/.keep +0 -0
- data/lib/tasks/compose.rake +92 -0
- data/lib/tasks/compose_db.rake +71 -0
- data/lib/tasks/compose_logs.rake +95 -0
- data/lib/tasks/compose_test.rake +62 -0
- data/log/.keep +0 -0
- data/mining_concept.ipynb +284 -0
- data/outerspace-blockchain.gemspec +50 -0
- data/public/404.html +67 -0
- data/public/422.html +67 -0
- data/public/500.html +66 -0
- data/public/apple-touch-icon-precomposed.png +0 -0
- data/public/apple-touch-icon.png +0 -0
- data/public/favicon.ico +0 -0
- data/public/robots.txt +1 -0
- data/storage/.keep +0 -0
- data/tmp/.keep +0 -0
- data/tmp/pids/.keep +0 -0
- data/tmp/storage/.keep +0 -0
- data/vendor/.keep +0 -0
- data/vendor/javascript/.keep +0 -0
- metadata +643 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '0959a1f1814a23d86916f914b28842a0f009ddd8e22bdd8fecf14d2d0d29f659'
|
4
|
+
data.tar.gz: a8473f6072c95c8af77a9d402ab6988ace065ce177e688a35828275910c9d1b5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6a76df0d7eeb1f18f9ec34eee953a5fb1df36dab4375d514cd59a67e8ba3960486eb28dd9bf86ebba7755f666caa61b76d163f7a08fdfa33ba4b2fbb762b9d30
|
7
|
+
data.tar.gz: f778bf73d3de0a3d51f7f69e7e11796b5305756552681f4e82d39487ec932a13b87fe293842f75d1f160db8d64c77847259f5e1d6c9bc9faf13d2daa461b6210
|
data/.env
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,273 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-rspec
|
3
|
+
- rubocop-rails
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
TargetRubyVersion: 3.0
|
7
|
+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
8
|
+
# to ignore them, so only the ones explicitly set in this file are enabled.
|
9
|
+
DisabledByDefault: true
|
10
|
+
SuggestExtensions: false
|
11
|
+
Exclude:
|
12
|
+
- 'Rakefile'
|
13
|
+
- 'spec/factories/**/*'
|
14
|
+
- 'spec/rails_helper.rb'
|
15
|
+
- 'spec/spec_helper.rb'
|
16
|
+
- 'spec/support/**/*.rb'
|
17
|
+
- 'Gemfile'
|
18
|
+
- 'db/migrate/**/*'
|
19
|
+
- 'db/schema.rb'
|
20
|
+
- '**/tmp/**/*'
|
21
|
+
- '**/templates/**/*'
|
22
|
+
- '**/vendor/**/*'
|
23
|
+
- 'actionpack/lib/action_dispatch/journey/parser.rb'
|
24
|
+
- 'actionmailbox/test/dummy/**/*'
|
25
|
+
- 'actiontext/test/dummy/**/*'
|
26
|
+
- '**/node_modules/**/*'
|
27
|
+
|
28
|
+
# Prefer assert_not over assert !
|
29
|
+
Rails/AssertNot:
|
30
|
+
Include:
|
31
|
+
- '**/test/**/*'
|
32
|
+
|
33
|
+
# Prefer assert_not_x over refute_x
|
34
|
+
Rails/RefuteMethods:
|
35
|
+
Include:
|
36
|
+
- '**/test/**/*'
|
37
|
+
|
38
|
+
Rails/IndexBy:
|
39
|
+
Enabled: true
|
40
|
+
|
41
|
+
Rails/IndexWith:
|
42
|
+
Enabled: true
|
43
|
+
|
44
|
+
# Prefer &&/|| over and/or.
|
45
|
+
Style/AndOr:
|
46
|
+
Enabled: true
|
47
|
+
|
48
|
+
# Align `when` with `case`.
|
49
|
+
Layout/CaseIndentation:
|
50
|
+
Enabled: true
|
51
|
+
|
52
|
+
Layout/ClosingHeredocIndentation:
|
53
|
+
Enabled: true
|
54
|
+
|
55
|
+
Layout/ClosingParenthesisIndentation:
|
56
|
+
Enabled: true
|
57
|
+
|
58
|
+
# Align comments with method definitions.
|
59
|
+
Layout/CommentIndentation:
|
60
|
+
Enabled: true
|
61
|
+
|
62
|
+
Layout/ElseAlignment:
|
63
|
+
Enabled: true
|
64
|
+
|
65
|
+
# Align `end` with the matching keyword or starting expression except for
|
66
|
+
# assignments, where it should be aligned with the LHS.
|
67
|
+
Layout/EndAlignment:
|
68
|
+
Enabled: true
|
69
|
+
EnforcedStyleAlignWith: variable
|
70
|
+
AutoCorrect: true
|
71
|
+
|
72
|
+
Layout/EndOfLine:
|
73
|
+
Enabled: true
|
74
|
+
|
75
|
+
Layout/EmptyLineAfterMagicComment:
|
76
|
+
Enabled: true
|
77
|
+
|
78
|
+
Layout/EmptyLinesAroundAccessModifier:
|
79
|
+
Enabled: true
|
80
|
+
EnforcedStyle: only_before
|
81
|
+
|
82
|
+
Layout/EmptyLinesAroundBlockBody:
|
83
|
+
Enabled: true
|
84
|
+
|
85
|
+
# In a regular class definition, no empty lines around the body.
|
86
|
+
Layout/EmptyLinesAroundClassBody:
|
87
|
+
Enabled: true
|
88
|
+
|
89
|
+
# In a regular method definition, no empty lines around the body.
|
90
|
+
Layout/EmptyLinesAroundMethodBody:
|
91
|
+
Enabled: true
|
92
|
+
|
93
|
+
# In a regular module definition, no empty lines around the body.
|
94
|
+
Layout/EmptyLinesAroundModuleBody:
|
95
|
+
Enabled: true
|
96
|
+
|
97
|
+
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
98
|
+
Style/HashSyntax:
|
99
|
+
Enabled: true
|
100
|
+
|
101
|
+
# Method definitions after `private` or `protected` isolated calls need one
|
102
|
+
# extra level of indentation.
|
103
|
+
Layout/IndentationConsistency:
|
104
|
+
Enabled: true
|
105
|
+
EnforcedStyle: indented_internal_methods
|
106
|
+
|
107
|
+
# Two spaces, no tabs (for indentation).
|
108
|
+
Layout/IndentationWidth:
|
109
|
+
Enabled: true
|
110
|
+
|
111
|
+
Layout/LeadingCommentSpace:
|
112
|
+
Enabled: true
|
113
|
+
|
114
|
+
Layout/SpaceAfterColon:
|
115
|
+
Enabled: true
|
116
|
+
|
117
|
+
Layout/SpaceAfterComma:
|
118
|
+
Enabled: true
|
119
|
+
|
120
|
+
Layout/SpaceAfterSemicolon:
|
121
|
+
Enabled: true
|
122
|
+
|
123
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
124
|
+
Enabled: true
|
125
|
+
|
126
|
+
Layout/SpaceAroundKeyword:
|
127
|
+
Enabled: true
|
128
|
+
|
129
|
+
Layout/SpaceAroundOperators:
|
130
|
+
Enabled: true
|
131
|
+
|
132
|
+
Layout/SpaceBeforeComma:
|
133
|
+
Enabled: true
|
134
|
+
|
135
|
+
Layout/SpaceBeforeComment:
|
136
|
+
Enabled: true
|
137
|
+
|
138
|
+
Layout/SpaceBeforeFirstArg:
|
139
|
+
Enabled: true
|
140
|
+
|
141
|
+
Style/DefWithParentheses:
|
142
|
+
Enabled: true
|
143
|
+
|
144
|
+
# Defining a method with parameters needs parentheses.
|
145
|
+
Style/MethodDefParentheses:
|
146
|
+
Enabled: true
|
147
|
+
|
148
|
+
Style/ExplicitBlockArgument:
|
149
|
+
Enabled: true
|
150
|
+
|
151
|
+
Style/FrozenStringLiteralComment:
|
152
|
+
Enabled: true
|
153
|
+
EnforcedStyle: always
|
154
|
+
Exclude:
|
155
|
+
- 'actionview/test/**/*.builder'
|
156
|
+
- 'actionview/test/**/*.ruby'
|
157
|
+
- 'actionpack/test/**/*.builder'
|
158
|
+
- 'actionpack/test/**/*.ruby'
|
159
|
+
- 'activestorage/db/migrate/**/*.rb'
|
160
|
+
- 'activestorage/db/update_migrate/**/*.rb'
|
161
|
+
- 'actionmailbox/db/migrate/**/*.rb'
|
162
|
+
- 'actiontext/db/migrate/**/*.rb'
|
163
|
+
|
164
|
+
Style/MapToHash:
|
165
|
+
Enabled: true
|
166
|
+
|
167
|
+
Style/RedundantFreeze:
|
168
|
+
Enabled: true
|
169
|
+
|
170
|
+
# Use `foo {}` not `foo{}`.
|
171
|
+
Layout/SpaceBeforeBlockBraces:
|
172
|
+
Enabled: true
|
173
|
+
|
174
|
+
# Use `foo { bar }` not `foo {bar}`.
|
175
|
+
Layout/SpaceInsideBlockBraces:
|
176
|
+
Enabled: true
|
177
|
+
EnforcedStyleForEmptyBraces: space
|
178
|
+
|
179
|
+
# Use `{ a: 1 }` not `{a:1}`.
|
180
|
+
Layout/SpaceInsideHashLiteralBraces:
|
181
|
+
Enabled: true
|
182
|
+
|
183
|
+
Layout/SpaceInsideParens:
|
184
|
+
Enabled: true
|
185
|
+
|
186
|
+
# Check quotes usage according to lint rule below.
|
187
|
+
Style/StringLiterals:
|
188
|
+
Enabled: true
|
189
|
+
EnforcedStyle: double_quotes
|
190
|
+
|
191
|
+
# Detect hard tabs, no hard tabs.
|
192
|
+
Layout/IndentationStyle:
|
193
|
+
Enabled: true
|
194
|
+
|
195
|
+
# Empty lines should not have any spaces.
|
196
|
+
Layout/TrailingEmptyLines:
|
197
|
+
Enabled: true
|
198
|
+
|
199
|
+
# No trailing whitespace.
|
200
|
+
Layout/TrailingWhitespace:
|
201
|
+
Enabled: true
|
202
|
+
|
203
|
+
# Use quotes for string literals when they are enough.
|
204
|
+
Style/RedundantPercentQ:
|
205
|
+
Enabled: true
|
206
|
+
|
207
|
+
Lint/AmbiguousOperator:
|
208
|
+
Enabled: true
|
209
|
+
|
210
|
+
Lint/AmbiguousRegexpLiteral:
|
211
|
+
Enabled: true
|
212
|
+
|
213
|
+
Lint/DuplicateRequire:
|
214
|
+
Enabled: true
|
215
|
+
|
216
|
+
Lint/DuplicateMethods:
|
217
|
+
Enabled: true
|
218
|
+
|
219
|
+
Lint/ErbNewArguments:
|
220
|
+
Enabled: true
|
221
|
+
|
222
|
+
Lint/EnsureReturn:
|
223
|
+
Enabled: true
|
224
|
+
|
225
|
+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
226
|
+
Lint/RequireParentheses:
|
227
|
+
Enabled: true
|
228
|
+
|
229
|
+
Lint/RedundantStringCoercion:
|
230
|
+
Enabled: true
|
231
|
+
|
232
|
+
Lint/UriEscapeUnescape:
|
233
|
+
Enabled: true
|
234
|
+
|
235
|
+
Lint/UselessAssignment:
|
236
|
+
Enabled: true
|
237
|
+
|
238
|
+
Lint/DeprecatedClassMethods:
|
239
|
+
Enabled: true
|
240
|
+
|
241
|
+
Style/ParenthesesAroundCondition:
|
242
|
+
Enabled: true
|
243
|
+
|
244
|
+
Style/HashTransformKeys:
|
245
|
+
Enabled: true
|
246
|
+
|
247
|
+
Style/HashTransformValues:
|
248
|
+
Enabled: true
|
249
|
+
|
250
|
+
Style/RedundantBegin:
|
251
|
+
Enabled: true
|
252
|
+
|
253
|
+
Style/RedundantReturn:
|
254
|
+
Enabled: true
|
255
|
+
AllowMultipleReturnValues: true
|
256
|
+
|
257
|
+
Style/RedundantRegexpEscape:
|
258
|
+
Enabled: true
|
259
|
+
|
260
|
+
Style/Semicolon:
|
261
|
+
Enabled: true
|
262
|
+
AllowAsExpressionSeparator: true
|
263
|
+
|
264
|
+
# Prefer Foo.method over Foo::method
|
265
|
+
Style/ColonMethodCall:
|
266
|
+
Enabled: true
|
267
|
+
|
268
|
+
Style/TrivialAccessors:
|
269
|
+
Enabled: true
|
270
|
+
|
271
|
+
# Prefer a = b || c over a = b ? b : c
|
272
|
+
Style/RedundantCondition:
|
273
|
+
Enabled: true
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-3.0.3
|
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
+
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at TODO: Write your email address. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/Dockerfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# syntax=docker/dockerfile:1
|
2
|
+
FROM ruby:3.0.3
|
3
|
+
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
|
4
|
+
WORKDIR /myapp
|
5
|
+
COPY Gemfile /myapp/Gemfile
|
6
|
+
COPY Gemfile.lock /myapp/Gemfile.lock
|
7
|
+
RUN bundle install
|
8
|
+
RUN gem install foreman
|
9
|
+
|
10
|
+
# Add a script to be executed every time the container starts.
|
11
|
+
COPY entrypoint.sh /usr/bin/
|
12
|
+
RUN chmod +x /usr/bin/entrypoint.sh
|
13
|
+
ENTRYPOINT ["entrypoint.sh"]
|
14
|
+
EXPOSE 80
|
15
|
+
|
16
|
+
# Configure the main process to run when running the image
|
17
|
+
CMD ["rails", "server", "-b", "0.0.0.0"]
|
data/Gemfile
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
|
+
|
4
|
+
ruby "3.0.3"
|
5
|
+
|
6
|
+
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
7
|
+
gem "rails", "~> 7.0"
|
8
|
+
|
9
|
+
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
|
10
|
+
gem "sprockets-rails", "~> 3.4"
|
11
|
+
|
12
|
+
# Use postgresql as the database for Active Record
|
13
|
+
gem "pg", "~> 1.4"
|
14
|
+
|
15
|
+
# Use the Puma web server [https://github.com/puma/puma]
|
16
|
+
gem "puma", "~> 5.6"
|
17
|
+
|
18
|
+
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
|
19
|
+
gem "importmap-rails", "~> 1.1"
|
20
|
+
|
21
|
+
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
|
22
|
+
gem "turbo-rails", "~> 1.3"
|
23
|
+
|
24
|
+
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
|
25
|
+
gem "stimulus-rails", "~> 1.1"
|
26
|
+
|
27
|
+
# Use Tailwind CSS [https://github.com/rails/tailwindcss-rails]
|
28
|
+
gem "tailwindcss-rails", "~> 2.0"
|
29
|
+
|
30
|
+
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
|
31
|
+
gem "jbuilder", "~> 2.11"
|
32
|
+
|
33
|
+
# Use Redis adapter to run Action Cable in production
|
34
|
+
# gem "redis", "~> 4.0"
|
35
|
+
|
36
|
+
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
|
37
|
+
# gem "kredis"
|
38
|
+
|
39
|
+
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
|
40
|
+
# gem "bcrypt", "~> 3.1.7"
|
41
|
+
|
42
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
43
|
+
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
|
44
|
+
|
45
|
+
# Reduces boot times through caching; required in config/boot.rb
|
46
|
+
gem "bootsnap", "~> 1.13", require: false
|
47
|
+
|
48
|
+
# Rubocop Rails
|
49
|
+
gem "rubocop-rails", "~> 2.16", require: false
|
50
|
+
|
51
|
+
# Rubocop Rspec
|
52
|
+
gem "rubocop-rspec", "~> 2.13", require: false
|
53
|
+
|
54
|
+
# sidekiq
|
55
|
+
gem "sidekiq", "~> 6.5"
|
56
|
+
|
57
|
+
# Slim template
|
58
|
+
gem "slim-rails", "~> 3.5"
|
59
|
+
|
60
|
+
# Devise
|
61
|
+
gem "devise", "~> 4.8"
|
62
|
+
|
63
|
+
# Rails Controller Testing
|
64
|
+
gem "rails-controller-testing", "~> 1.0"
|
65
|
+
|
66
|
+
# Active Record Import
|
67
|
+
gem "activerecord-import"
|
68
|
+
|
69
|
+
|
70
|
+
# Use Sass to process CSS
|
71
|
+
# gem "sassc-rails"
|
72
|
+
|
73
|
+
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
|
74
|
+
# gem "image_processing", "~> 1.2"
|
75
|
+
|
76
|
+
group :development, :test do
|
77
|
+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
78
|
+
gem "debug", "~> 1.6", platforms: %i[ mri mingw x64_mingw ]
|
79
|
+
# Rspec for testing
|
80
|
+
gem "rspec-rails", "~> 6.0"
|
81
|
+
# FactoryBot for testing
|
82
|
+
gem "factory_bot_rails", "~> 6.2"
|
83
|
+
# Faker for testing
|
84
|
+
gem "faker", "~> 2.23"
|
85
|
+
# SimpleCov for testing
|
86
|
+
gem "simplecov", "~> 0.21"
|
87
|
+
# Shoulda Matchers for testing
|
88
|
+
gem "shoulda-matchers", "~> 5.0"
|
89
|
+
# Database Cleaner for testing
|
90
|
+
gem "database_cleaner-active_record", "~> 2.0"
|
91
|
+
end
|
92
|
+
|
93
|
+
group :development do
|
94
|
+
# Use console on exceptions pages [https://github.com/rails/web-console]
|
95
|
+
gem "web-console", "~> 4.2"
|
96
|
+
|
97
|
+
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
|
98
|
+
# gem "rack-mini-profiler"
|
99
|
+
|
100
|
+
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
|
101
|
+
# gem "spring"
|
102
|
+
end
|
103
|
+
|
104
|
+
group :test do
|
105
|
+
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
|
106
|
+
gem "capybara", "~> 3.37"
|
107
|
+
gem "selenium-webdriver", "~> 4.5"
|
108
|
+
gem "webdrivers", "~> 5.2"
|
109
|
+
end
|