Skip to content

Commit

Permalink
Upgraded to use OAuth v2 and Slack events API with granular permissions.
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel (dB.) Doubrovkine <dblock@dblock.org>
  • Loading branch information
dblock committed Jun 22, 2024
1 parent 017876f commit d8f4858
Show file tree
Hide file tree
Showing 199 changed files with 2,180 additions and 1,940 deletions.
151 changes: 84 additions & 67 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-06-15 12:58:07 UTC using RuboCop version 1.64.1.
# on 2024-06-22 14:50:07 UTC using RuboCop version 1.64.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -29,50 +29,46 @@ Lint/AmbiguousBlockAssociation:
- 'spec/api/endpoints/matches_endpoint_spec.rb'

# Offense count: 1
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
# Configuration parameters: AllowedParentClasses.
Lint/MissingSuper:
Exclude:
- 'Rakefile.rb'
- 'slack-gamebot.rb'
- 'lib/commands/base.rb'

# Offense count: 6
# Offense count: 5
# Configuration parameters: ForbiddenDelimiters.
# ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
Naming/HeredocDelimiterNaming:
Exclude:
- 'slack-gamebot/app.rb'
- 'slack-gamebot/commands/help.rb'
- 'slack-gamebot/info.rb'
- 'slack-gamebot/models/team.rb'
- 'slack-gamebot/server.rb'
- 'lib/app.rb'
- 'lib/commands/help.rb'
- 'lib/info.rb'
- 'lib/models/team.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
Naming/MemoizedInstanceVariableName:
Exclude:
- 'slack-gamebot/models/match.rb'
- 'lib/models/match.rb'

# Offense count: 17
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
Naming/MethodParameterName:
Exclude:
- 'slack-gamebot/app.rb'
- 'slack-gamebot/commands/set.rb'
- 'slack-gamebot/models/team.rb'
- 'lib/app.rb'
- 'lib/commands/set.rb'
- 'lib/models/team.rb'

# Offense count: 16
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
# SupportedStyles: snake_case, normalcase, non_integer
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
Naming/VariableNumber:
Exclude:
- 'spec/slack-gamebot/commands/leaderboard_spec.rb'
- 'spec/slack-gamebot/commands/rank_spec.rb'
- 'spec/commands/leaderboard_spec.rb'
- 'spec/commands/rank_spec.rb'

# Offense count: 39
RSpec/AnyInstance:
Expand All @@ -81,27 +77,28 @@ RSpec/AnyInstance:
- 'spec/api/endpoints/status_endpoint_spec.rb'
- 'spec/api/endpoints/subscriptions_endpoint_spec.rb'
- 'spec/api/endpoints/teams_endpoint_spec.rb'
- 'spec/app_spec.rb'
- 'spec/commands/accept_spec.rb'
- 'spec/commands/draw_spec.rb'
- 'spec/commands/matches_spec.rb'
- 'spec/commands/sucks_spec.rb'
- 'spec/integration/add_to_slack_spec.rb'
- 'spec/integration/subscribe_spec.rb'
- 'spec/integration/teams_spec.rb'
- 'spec/models/team_spec.rb'
- 'spec/slack-gamebot/app_spec.rb'
- 'spec/slack-gamebot/commands/accept_spec.rb'
- 'spec/slack-gamebot/commands/draw_spec.rb'
- 'spec/slack-gamebot/commands/matches_spec.rb'
- 'spec/slack-gamebot/commands/sucks_spec.rb'

# Offense count: 130
# Offense count: 123
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Enabled: false

# Offense count: 99
# Offense count: 98
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
# SupportedStyles: described_class, explicit
RSpec/DescribedClass:
Exclude:
- 'spec/app_spec.rb'
- 'spec/initializers/giphy_spec.rb'
- 'spec/models/challenge_spec.rb'
- 'spec/models/elo_spec.rb'
Expand All @@ -112,15 +109,32 @@ RSpec/DescribedClass:
- 'spec/models/team_spec.rb'
- 'spec/models/user_rank_spec.rb'
- 'spec/models/user_spec.rb'
- 'spec/slack-gamebot/app_spec.rb'
- 'spec/slack-gamebot/server_spec.rb'
- 'spec/slack-gamebot/service_spec.rb'
- 'spec/service_spec.rb'

# Offense count: 93
# Offense count: 89
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 31

# Offense count: 98
# This cop supports safe autocorrection (--autocorrect).
RSpec/ExpectActual:
Exclude:
- '**/spec/routing/**/*'
- 'spec/commands/hi_spec.rb'
- 'spec/commands/leaderboard_spec.rb'
- 'spec/commands/register_spec.rb'
- 'spec/commands/reset_spec.rb'
- 'spec/commands/season_spec.rb'
- 'spec/commands/seasons_spec.rb'
- 'spec/commands/set_spec.rb'
- 'spec/commands/subscription_spec.rb'
- 'spec/commands/sucks_spec.rb'
- 'spec/commands/team_spec.rb'
- 'spec/commands/unknown_spec.rb'
- 'spec/commands/unregister_spec.rb'
- 'spec/commands/unsubscribe_spec.rb'

# Offense count: 4
RSpec/ExpectInHook:
Exclude:
Expand All @@ -134,28 +148,23 @@ RSpec/IndexedLet:
Exclude:
- 'spec/api/endpoints/teams_endpoint_spec.rb'
- 'spec/api/endpoints/users_endpoint_spec.rb'
- 'spec/slack-gamebot/commands/leaderboard_spec.rb'
- 'spec/slack-gamebot/commands/lost_spec.rb'
- 'spec/slack-gamebot/commands/matches_spec.rb'
- 'spec/slack-gamebot/commands/rank_spec.rb'
- 'spec/commands/leaderboard_spec.rb'
- 'spec/commands/lost_spec.rb'
- 'spec/commands/matches_spec.rb'
- 'spec/commands/rank_spec.rb'

# Offense count: 2
# Configuration parameters: AssignmentOnly.
RSpec/InstanceVariable:
Exclude:
- 'spec/slack-gamebot/service_spec.rb'
- 'spec/service_spec.rb'
- 'spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb'

# Offense count: 48
RSpec/LetSetup:
Enabled: false

# Offense count: 1
RSpec/MessageChain:
Exclude:
- 'spec/slack-gamebot/server_spec.rb'

# Offense count: 56
# Offense count: 54
# Configuration parameters: .
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
Expand All @@ -165,18 +174,18 @@ RSpec/MessageSpies:
RSpec/MultipleExpectations:
Max: 18

# Offense count: 23
# Offense count: 13
# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
Max: 10
Max: 9

# Offense count: 10
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
# SupportedStyles: always, named_only
RSpec/NamedSubject:
Exclude:
- 'spec/api/swagger_documentation_spec.rb'
- 'spec/slack-gamebot/app_spec.rb'
- 'spec/app_spec.rb'

# Offense count: 21
# Configuration parameters: AllowedGroups.
Expand All @@ -191,12 +200,12 @@ RSpec/OverwritingSetup:
# Offense count: 12
RSpec/RepeatedDescription:
Exclude:
- 'spec/slack-gamebot/commands/set_spec.rb'
- 'spec/commands/set_spec.rb'

# Offense count: 12
RSpec/RepeatedExample:
Exclude:
- 'spec/slack-gamebot/commands/set_spec.rb'
- 'spec/commands/set_spec.rb'

# Offense count: 2
RSpec/RepeatedExampleGroupBody:
Expand All @@ -209,9 +218,9 @@ RSpec/RepeatedExampleGroupDescription:
- 'spec/api/endpoints/games_endpoint_spec.rb'
- 'spec/api/endpoints/matches_endpoint_spec.rb'
- 'spec/api/endpoints/teams_endpoint_spec.rb'
- 'spec/slack-gamebot/commands/set_spec.rb'
- 'spec/commands/set_spec.rb'

# Offense count: 38
# Offense count: 37
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
# Include: **/*_spec.rb
RSpec/SpecFilePathFormat:
Expand All @@ -223,11 +232,11 @@ RSpec/StubbedMock:
- 'spec/api/endpoints/status_endpoint_spec.rb'
- 'spec/api/endpoints/subscriptions_endpoint_spec.rb'
- 'spec/api/endpoints/teams_endpoint_spec.rb'
- 'spec/app_spec.rb'
- 'spec/integration/subscribe_spec.rb'
- 'spec/integration/update_cc_spec.rb'
- 'spec/slack-gamebot/app_spec.rb'

# Offense count: 11
# Offense count: 8
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
RSpec/VerifiedDoubles:
Exclude:
Expand All @@ -240,7 +249,7 @@ RSpec/VerifiedDoubles:
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/GlobalStdStream:
Exclude:
- 'slack-gamebot/api/middleware.rb'
- 'lib/api/middleware.rb'
- 'tasks/logger.rb'

# Offense count: 1
Expand All @@ -249,25 +258,25 @@ Style/GlobalStdStream:
# AllowedReceivers: Thread.current
Style/HashEachMethods:
Exclude:
- 'slack-gamebot/models/challenge.rb'
- 'lib/models/challenge.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/HashTransformKeys:
Exclude:
- 'slack-gamebot/api/helpers/error_helpers.rb'
- 'lib/api/helpers/error_helpers.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/HashTransformValues:
Exclude:
- 'slack-gamebot/api/helpers/error_helpers.rb'
- 'lib/api/helpers/error_helpers.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/MapIntoArray:
Exclude:
- 'slack-gamebot/models/score.rb'
- 'lib/models/score.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
Expand All @@ -288,33 +297,41 @@ Style/MultilineBlockChain:
Style/NumericPredicate:
Exclude:
- 'spec/**/*'
- 'slack-gamebot/app.rb'
- 'slack-gamebot/commands/season.rb'
- 'slack-gamebot/models/score.rb'
- 'slack-gamebot/models/user.rb'
- 'lib/app.rb'
- 'lib/commands/season.rb'
- 'lib/models/score.rb'
- 'lib/models/user.rb'

# Offense count: 1
# Configuration parameters: AllowedMethods.
# AllowedMethods: respond_to_missing?
Style/OptionalBooleanParameter:
Exclude:
- 'slack-gamebot/models/team.rb'
- 'lib/models/team.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
# AllowedMethods: present?, blank?, presence, try, try!
Style/SafeNavigation:
Exclude:
- 'config/initializers/slack_ruby_client.rb'

# Offense count: 3
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/SlicingWithRange:
Exclude:
- 'slack-gamebot/api/helpers/sort_helpers.rb'
- 'slack-gamebot/commands/leaderboard.rb'
- 'slack-gamebot/commands/set.rb'
- 'lib/api/helpers/sort_helpers.rb'
- 'lib/commands/leaderboard.rb'
- 'lib/commands/set.rb'

# Offense count: 7
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Mode.
Style/StringConcatenation:
Exclude:
- 'slack-gamebot.rb'
- 'slack-gamebot/api/helpers/error_helpers.rb'
- 'slack-gamebot/commands/set.rb'
- 'app.rb'
- 'lib/api/helpers/error_helpers.rb'
- 'lib/commands/set.rb'
- 'spec/fabricators/game_fabricator.rb'
- 'tasks/db.rake'
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ gem 'rack-robotz'
gem 'rack-server-pages'
gem 'roar'
gem 'ruby-enum'
gem 'slack-ruby-bot-server'
gem 'slack-ruby-bot-server-events'
gem 'slack-ruby-bot-server-mailchimp'
gem 'slack-ruby-bot-server-rtm'
gem 'slack-ruby-client'
gem 'stripe', '1.58.0'
gem 'time_ago_in_words'
Expand Down
18 changes: 4 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ GEM
console (~> 1.10)
nio4r (~> 2.3)
timers (~> 4.1)
async-io (1.43.2)
async
async-websocket (0.8.0)
async-io
websocket-driver (~> 0.7.0)
base64 (0.2.0)
bigdecimal (3.1.8)
bson (4.15.0)
Expand Down Expand Up @@ -259,10 +254,6 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
slack-ruby-bot (0.16.1)
activesupport
hashie
slack-ruby-client (>= 0.14.0)
slack-ruby-bot-server (2.1.1)
async
foreman
Expand All @@ -274,13 +265,11 @@ GEM
rack-rewrite
rack-server-pages
slack-ruby-client
slack-ruby-bot-server-events (0.3.2)
slack-ruby-bot-server (>= 0.12.0)
slack-ruby-bot-server-mailchimp (0.3.0)
mailchimp_api_v3
slack-ruby-bot-server (>= 2.0.1)
slack-ruby-bot-server-rtm (0.2.0)
async-websocket (~> 0.8.0)
slack-ruby-bot (>= 0.12.0)
slack-ruby-bot-server (>= 1.0.0)
slack-ruby-client (1.0.0)
faraday (>= 1.0)
faraday_middleware
Expand Down Expand Up @@ -358,8 +347,9 @@ DEPENDENCIES
rubocop-rspec
ruby-enum
selenium-webdriver
slack-ruby-bot-server
slack-ruby-bot-server-events
slack-ruby-bot-server-mailchimp
slack-ruby-bot-server-rtm
slack-ruby-client
stripe (= 1.58.0)
stripe-ruby-mock (~> 2.4.1)
Expand Down
Loading

0 comments on commit d8f4858

Please sign in to comment.