Skip to content

Commit

Permalink
Modernize code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Nov 26, 2024
1 parent ff8efc0 commit 23cb0d5
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 20 deletions.
7 changes: 7 additions & 0 deletions config/sus.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

require "covered/sus"
include Covered::Sus
3 changes: 3 additions & 0 deletions examples/ruby/gems.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

source "https://rubygems.org"

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

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

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

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

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

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

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

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

require_relative "representation"

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

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

require_relative "representation"

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

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

require_relative "representation"

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

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

require_relative "representation"
require_relative "channels"

Expand Down
23 changes: 3 additions & 20 deletions lib/async/discord/representation.rb
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
# frozen_string_literal: 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.

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

require "async/rest/representation"
require "async/rest/wrapper/form"
Expand Down
3 changes: 3 additions & 0 deletions test/async/discord/client.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

require "async/discord/client_context"

describe Async::Discord::Client do
Expand Down

0 comments on commit 23cb0d5

Please sign in to comment.