Skip to content

Commit

Permalink
add commento gem, update gems
Browse files Browse the repository at this point in the history
  • Loading branch information
kortirso committed Aug 14, 2023
1 parent bbc09e4 commit 8078b96
Show file tree
Hide file tree
Showing 12 changed files with 117 additions and 104 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
yarn-debug.log*
.yarn-integrity
coverage
commento

.DS_Store

Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ gem 'redis-rails'
# reputation system
gem 'kudos'

# database comments
gem 'commento'

group :development, :test do
gem 'bullet', git: 'https://github.com/flyerhzm/bullet', branch: 'main'
gem 'rubocop', '~> 1.35', require: false
Expand Down
178 changes: 91 additions & 87 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GIT

GIT
remote: https://github.com/rails/sprockets
revision: 5dbb7f0f98f6d4ae2b3f1f65b86b140f58c03dd7
revision: 6554b6d82122c36134fc6f52fd19f008d6934f22
branch: main
specs:
sprockets (4.2.0)
Expand All @@ -30,84 +30,86 @@ GEM
specs:
action_policy (0.6.5)
ruby-next-core (>= 0.14.0)
actioncable (7.0.6)
actionpack (= 7.0.6)
activesupport (= 7.0.6)
actioncable (7.0.7)
actionpack (= 7.0.7)
activesupport (= 7.0.7)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.6)
actionpack (= 7.0.6)
activejob (= 7.0.6)
activerecord (= 7.0.6)
activestorage (= 7.0.6)
activesupport (= 7.0.6)
actionmailbox (7.0.7)
actionpack (= 7.0.7)
activejob (= 7.0.7)
activerecord (= 7.0.7)
activestorage (= 7.0.7)
activesupport (= 7.0.7)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.6)
actionpack (= 7.0.6)
actionview (= 7.0.6)
activejob (= 7.0.6)
activesupport (= 7.0.6)
actionmailer (7.0.7)
actionpack (= 7.0.7)
actionview (= 7.0.7)
activejob (= 7.0.7)
activesupport (= 7.0.7)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.6)
actionview (= 7.0.6)
activesupport (= 7.0.6)
actionpack (7.0.7)
actionview (= 7.0.7)
activesupport (= 7.0.7)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.6)
actionpack (= 7.0.6)
activerecord (= 7.0.6)
activestorage (= 7.0.6)
activesupport (= 7.0.6)
actiontext (7.0.7)
actionpack (= 7.0.7)
activerecord (= 7.0.7)
activestorage (= 7.0.7)
activesupport (= 7.0.7)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.6)
activesupport (= 7.0.6)
actionview (7.0.7)
activesupport (= 7.0.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.6)
activesupport (= 7.0.6)
activejob (7.0.7)
activesupport (= 7.0.7)
globalid (>= 0.3.6)
activemodel (7.0.6)
activesupport (= 7.0.6)
activerecord (7.0.6)
activemodel (= 7.0.6)
activesupport (= 7.0.6)
activestorage (7.0.6)
actionpack (= 7.0.6)
activejob (= 7.0.6)
activerecord (= 7.0.6)
activesupport (= 7.0.6)
activemodel (7.0.7)
activesupport (= 7.0.7)
activerecord (7.0.7)
activemodel (= 7.0.7)
activesupport (= 7.0.7)
activestorage (7.0.7)
actionpack (= 7.0.7)
activejob (= 7.0.7)
activerecord (= 7.0.7)
activesupport (= 7.0.7)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.6)
activesupport (7.0.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
aggregate_root (2.11.0)
ruby_event_store (= 2.11.0)
aggregate_root (2.11.1)
ruby_event_store (= 2.11.1)
arkency-command_bus (0.4.1)
concurrent-ruby
ast (2.4.2)
awesome_print (1.9.2)
base64 (0.1.1)
bcrypt (3.1.19)
bootsnap (1.16.0)
msgpack (~> 1.2)
brakeman (6.0.1)
builder (3.2.4)
commento (0.1.1)
concurrent-ruby (1.2.2)
crass (1.0.6)
database_cleaner (2.0.2)
Expand All @@ -122,7 +124,7 @@ GEM
dry-configurable (1.1.0)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-core (1.0.0)
dry-core (1.0.1)
concurrent-ruby (~> 1.0)
zeitwerk (~> 2.6)
dry-inflector (1.0.0)
Expand Down Expand Up @@ -197,11 +199,11 @@ GEM
net-smtp
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.1.2)
minitest (5.18.1)
mini_mime (1.1.5)
minitest (5.19.0)
msgpack (1.7.2)
multi_json (1.15.0)
net-imap (0.3.6)
net-imap (0.3.7)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -211,9 +213,9 @@ GEM
net-smtp (0.3.3)
net-protocol
nio4r (2.5.9)
nokogiri (1.15.3-arm64-darwin)
nokogiri (1.15.4-arm64-darwin)
racc (~> 1.4)
nokogiri (1.15.3-x86_64-darwin)
nokogiri (1.15.4-x86_64-darwin)
racc (~> 1.4)
pagy (6.0.4)
parallel (1.23.0)
Expand All @@ -228,48 +230,48 @@ GEM
nio4r (~> 2.0)
que (2.2.1)
racc (1.7.1)
rack (2.2.7)
rack (2.2.8)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.6)
actioncable (= 7.0.6)
actionmailbox (= 7.0.6)
actionmailer (= 7.0.6)
actionpack (= 7.0.6)
actiontext (= 7.0.6)
actionview (= 7.0.6)
activejob (= 7.0.6)
activemodel (= 7.0.6)
activerecord (= 7.0.6)
activestorage (= 7.0.6)
activesupport (= 7.0.6)
rails (7.0.7)
actioncable (= 7.0.7)
actionmailbox (= 7.0.7)
actionmailer (= 7.0.7)
actionpack (= 7.0.7)
actiontext (= 7.0.7)
actionview (= 7.0.7)
activejob (= 7.0.7)
activemodel (= 7.0.7)
activerecord (= 7.0.7)
activestorage (= 7.0.7)
activesupport (= 7.0.7)
bundler (>= 1.15.0)
railties (= 7.0.6)
railties (= 7.0.7)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.1.1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
rails_event_store (2.11.0)
rails_event_store (2.11.1)
activejob (>= 6.0)
activemodel (>= 6.0)
activesupport (>= 6.0)
aggregate_root (= 2.11.0)
aggregate_root (= 2.11.1)
arkency-command_bus (>= 0.4)
rails_event_store_active_record (= 2.11.0)
ruby_event_store (= 2.11.0)
ruby_event_store-browser (= 2.11.0)
rails_event_store_active_record (2.11.0)
ruby_event_store-active_record (= 2.11.0)
railties (7.0.6)
actionpack (= 7.0.6)
activesupport (= 7.0.6)
rails_event_store_active_record (= 2.11.1)
ruby_event_store (= 2.11.1)
ruby_event_store-browser (= 2.11.1)
rails_event_store_active_record (2.11.1)
ruby_event_store-active_record (= 2.11.1)
railties (7.0.7)
actionpack (= 7.0.7)
activesupport (= 7.0.7)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand All @@ -294,7 +296,7 @@ GEM
redis-store (1.9.2)
redis (>= 4, < 6)
regexp_parser (2.8.1)
rexml (3.2.5)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand All @@ -316,15 +318,16 @@ GEM
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-support (3.12.1)
rubocop (1.54.2)
rubocop (1.56.0)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
Expand All @@ -333,29 +336,29 @@ GEM
rubocop (~> 1.41)
rubocop-factory_bot (2.23.1)
rubocop (~> 1.33)
rubocop-performance (1.18.0)
rubocop-performance (1.19.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.20.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-rspec (2.22.0)
rubocop-rspec (2.23.2)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-next-core (0.15.3)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
ruby_event_store (2.11.0)
ruby_event_store (2.11.1)
concurrent-ruby (~> 1.0, >= 1.1.6)
ruby_event_store-active_record (2.11.0)
ruby_event_store-active_record (2.11.1)
activerecord (>= 6.0)
ruby_event_store (= 2.11.0)
ruby_event_store-browser (2.11.0)
ruby_event_store (= 2.11.1)
ruby_event_store-browser (2.11.1)
rack
ruby_event_store (= 2.11.0)
ruby_event_store-rspec (2.11.0)
ruby_event_store (= 2.11.1)
ruby_event_store-rspec (2.11.1)
rspec (~> 3.0)
sassc (2.4.0)
ffi (~> 1.9)
Expand All @@ -378,7 +381,7 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
strong_migrations (1.5.0)
strong_migrations (1.6.1)
activerecord (>= 5.2)
thor (1.2.2)
tilt (2.2.0)
Expand All @@ -387,14 +390,14 @@ GEM
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
uniform_notifier (1.16.0)
view_component (3.4.0)
view_component (3.5.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
websocket-driver (0.7.5)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.6.8)
zeitwerk (2.6.11)

PLATFORMS
arm64-darwin-22
Expand All @@ -407,6 +410,7 @@ DEPENDENCIES
bootsnap (>= 1.4.4)
brakeman
bullet!
commento
database_cleaner (~> 2.0)
dry-validation (~> 1.10)
emailbutler
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/concerns/cacheable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ module Cacheable

private

def cached_response(**args, &block)
Rails.cache.fetch(cache_key(**args), &block)
def cached_response(**, &block)
Rails.cache.fetch(cache_key(**), &block)
end

def cache_key(payload:, name:, version:)
Expand Down
2 changes: 2 additions & 0 deletions app/models/application_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

class ApplicationRecord < ActiveRecord::Base
primary_abstract_class

include Commento::Helpers
end
3 changes: 2 additions & 1 deletion app/services/teams/players/price/change_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def price_modified(teams_player_id)
def price_change(transfers_amount)
return PRICE_BIG_CHANGE if transfers_amount >= transfers_amount_for_big_price_change
return PRICE_MEDIUM_CHANGE if transfers_amount >= transfers_amount_for_medium_price_change
return PRICE_SMALL_CHANGE if transfers_amount >= transfers_amount_for_small_price_change

PRICE_SMALL_CHANGE if transfers_amount >= transfers_amount_for_small_price_change
end

def transfers_limit
Expand Down
Loading

0 comments on commit 8078b96

Please sign in to comment.