Skip to content

Commit

Permalink
RuboCop.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Nov 26, 2024
1 parent 6ad0f83 commit ff8efc0
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 29 deletions.
2 changes: 2 additions & 0 deletions examples/ruby/gems.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source "https://rubygems.org"

gem "async-discord", path: "../.."
Expand Down
5 changes: 3 additions & 2 deletions examples/ruby/server.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'async/discord/client'
require 'async/ollama'
require "async/discord/client"
require "async/ollama"

TOKEN = ENV["DISCORD_BOT_TOKEN"]
MODEL = ENV.fetch("OLLAMA_MODEL", "llama3.1")
Expand Down
2 changes: 2 additions & 0 deletions fixtures/async/discord/client_context.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "async/discord/client"
require "sus/fixtures/async/reactor_context"

Expand Down
2 changes: 2 additions & 0 deletions lib/async/discord/channels.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative "representation"

module Async
Expand Down
28 changes: 4 additions & 24 deletions lib/async/discord/client.rb
Original file line number Diff line number Diff line change
@@ -1,29 +1,9 @@
# frozen_string_literals: true
#
# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# frozen_string_literal: true

require_relative 'representation'
require_relative "representation"

require_relative 'guilds'
require_relative 'gateway'
require_relative "guilds"
require_relative "gateway"

module Async
module Discord
Expand Down
2 changes: 2 additions & 0 deletions lib/async/discord/gateway.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative "representation"

require "async/websocket"
Expand Down
2 changes: 2 additions & 0 deletions lib/async/discord/guilds.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative "representation"
require_relative "channels"

Expand Down
6 changes: 3 additions & 3 deletions lib/async/discord/representation.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# frozen_string_literals: true
# frozen_string_literal: true
#
# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
Expand All @@ -20,8 +20,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

require 'async/rest/representation'
require 'async/rest/wrapper/form'
require "async/rest/representation"
require "async/rest/wrapper/form"

module Async
module Discord
Expand Down
2 changes: 2 additions & 0 deletions test/async/discord/client.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "async/discord/client_context"

describe Async::Discord::Client do
Expand Down

0 comments on commit ff8efc0

Please sign in to comment.