Skip to content

Commit

Permalink
Modernize gem.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed May 2, 2024
1 parent 1986b33 commit 79d3868
Show file tree
Hide file tree
Showing 45 changed files with 74 additions and 55 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: bundle exec bake utopia:project:static --force no

- name: Upload documentation artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: docs

Expand All @@ -55,4 +55,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
uses: actions/deploy-pages@v4
1 change: 0 additions & 1 deletion .github/workflows/test-external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
- macos

ruby:
- "3.0"
- "3.1"
- "3.2"
- "3.3"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- macos

ruby:
- "3.0"
- "3.1"
- "3.2"
- "3.3"
Expand Down
8 changes: 6 additions & 2 deletions console.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ Gem::Specification.new do |spec|
spec.cert_chain = ['release.cert']
spec.signing_key = File.expand_path('~/.gem/release.pem')

spec.homepage = "https://socketry.github.io/console/"
spec.homepage = "https://socketry.github.io/console"

spec.metadata = {
"documentation_uri" => "https://socketry.github.io/console/",
}

spec.files = Dir.glob(['{bake,lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__)

spec.required_ruby_version = ">= 3.0"
spec.required_ruby_version = ">= 3.1"

spec.add_dependency "fiber-annotation"
spec.add_dependency "fiber-storage"
Expand Down
5 changes: 5 additions & 0 deletions fixtures/console/captured_output.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# frozen_string_literal: true

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

require 'sus/shared'

module Console
Expand Down
8 changes: 3 additions & 5 deletions gems.rb
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# frozen_string_literal: true

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

source "https://rubygems.org"

# Specify your gem's dependencies in console.gemspec
gemspec

group :maintenance, optional: true do
gem "bake-gem"
gem "bake-modernize"

gem "bake-github-pages"
gem "utopia-project"
end

group :test do
gem "covered", "~> 0.18.1"
gem "sus", "~> 0.14"
gem "sus"
gem "covered"

gem "bake-test"
gem "bake-test-external"
Expand Down
2 changes: 1 addition & 1 deletion lib/console.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2019-2023, by Samuel Williams.
# Copyright, 2019-2024, by Samuel Williams.
# Copyright, 2019, by Bryan Powell.
# Copyright, 2020, by Michael Adams.
# Copyright, 2021, by Cédric Boutillier.
Expand Down
2 changes: 1 addition & 1 deletion lib/console/adapter.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

module Console
# This namespace is reserved for logging adapters provided by other gems.
Expand Down
2 changes: 1 addition & 1 deletion lib/console/capture.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

require_relative 'filter'

Expand Down
2 changes: 1 addition & 1 deletion lib/console/compatible/logger.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

require 'logger'

Expand Down
2 changes: 1 addition & 1 deletion lib/console/event.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

require_relative 'event/spawn'
require_relative 'event/failure'
6 changes: 3 additions & 3 deletions lib/console/event/failure.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2019-2022, by Samuel Williams.
# Copyright, 2019-2024, by Samuel Williams.
# Copyright, 2021, by Robert Schulze.

require_relative 'generic'
Expand All @@ -11,8 +11,8 @@ module Event
# Represents a failure event.
#
# ```ruby
# Console.error(self, **Console::Event::Failure.for(exception))
# ````
# Console::Event::Failure.for(exception).emit(self)
# ```
class Failure < Generic
def self.default_root
Dir.getwd
Expand Down
2 changes: 1 addition & 1 deletion lib/console/event/generic.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

module Console
module Event
Expand Down
2 changes: 1 addition & 1 deletion lib/console/event/spawn.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

require_relative 'generic'
require_relative '../clock'
Expand Down
2 changes: 1 addition & 1 deletion lib/console/filter.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2019-2023, by Samuel Williams.
# Copyright, 2019-2024, by Samuel Williams.
# Copyright, 2019, by Bryan Powell.
# Copyright, 2020, by Michael Adams.
# Copyright, 2021, by Robert Schulze.
Expand Down
2 changes: 1 addition & 1 deletion lib/console/format.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

require_relative 'format/safe'

Expand Down
2 changes: 1 addition & 1 deletion lib/console/logger.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2019-2022, by Samuel Williams.
# Copyright, 2019-2024, by Samuel Williams.
# Copyright, 2021, by Bryan Powell.
# Copyright, 2021, by Robert Schulze.

Expand Down
2 changes: 1 addition & 1 deletion lib/console/output.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

require_relative 'output/default'
require_relative 'output/serialized'
Expand Down
2 changes: 1 addition & 1 deletion lib/console/output/default.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

require_relative 'terminal'
require_relative 'serialized'
Expand Down
2 changes: 1 addition & 1 deletion lib/console/output/null.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

module Console
module Output
Expand Down
2 changes: 1 addition & 1 deletion lib/console/output/sensitive.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

require_relative 'wrapper'

Expand Down
2 changes: 1 addition & 1 deletion lib/console/output/serialized.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

require_relative '../format'
require 'time'
Expand Down
2 changes: 1 addition & 1 deletion lib/console/output/split.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

module Console
module Output
Expand Down
2 changes: 1 addition & 1 deletion lib/console/output/terminal.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2019-2023, by Samuel Williams.
# Copyright, 2019-2024, by Samuel Williams.
# Copyright, 2021, by Robert Schulze.

require_relative '../clock'
Expand Down
4 changes: 2 additions & 2 deletions lib/console/output/wrapper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

module Console
module Output
Expand All @@ -19,4 +19,4 @@ def call(...)
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/console/progress.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2020-2023, by Samuel Williams.
# Copyright, 2020-2024, by Samuel Williams.
# Copyright, 2022, by Anton Sozontov.

require_relative 'clock'
Expand Down
3 changes: 1 addition & 2 deletions lib/console/terminal.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2019-2023, by Samuel Williams.
# Copyright, 2021, by Robert Schulze.
# Copyright, 2019-2024, by Samuel Williams.

require_relative 'terminal/text'
require_relative 'terminal/xterm'
Expand Down
3 changes: 1 addition & 2 deletions lib/console/terminal/formatter/failure.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2019-2022, by Samuel Williams.
# Copyright, 2021, by Robert Schulze.
# Copyright, 2024, by Samuel Williams.

module Console
module Terminal
Expand Down
4 changes: 3 additions & 1 deletion lib/console/terminal/formatter/progress.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

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

module Console
module Terminal
Expand Down
4 changes: 2 additions & 2 deletions lib/console/terminal/formatter/spawn.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

module Console
module Terminal
Expand Down Expand Up @@ -39,4 +39,4 @@ def chdir_string(options)
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/console/terminal/text.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

require 'io/console'

Expand Down
2 changes: 1 addition & 1 deletion lib/console/terminal/xterm.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

require 'io/console'

Expand Down
2 changes: 1 addition & 1 deletion lib/console/version.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

module Console
VERSION = "1.24.0"
Expand Down
4 changes: 4 additions & 0 deletions test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

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

require_relative 'lib/console'

Expand Down
2 changes: 1 addition & 1 deletion test/console.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2019-2023, by Samuel Williams.
# Copyright, 2019-2024, by Samuel Williams.
# Copyright, 2019, by Bryan Powell.
# Copyright, 2020, by Michael Adams.

Expand Down
2 changes: 1 addition & 1 deletion test/console/compatible/logger.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

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

require 'console/compatible/logger'
require 'console/output/terminal'
Expand Down
2 changes: 1 addition & 1 deletion test/console/event/failure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Released under the MIT License.
# Copyright, 2021, by Robert Schulze.
# Copyright, 2021-2022, by Samuel Williams.
# Copyright, 2021-2024, by Samuel Williams.

require 'console'
require 'console/capture'
Expand Down
Loading

0 comments on commit 79d3868

Please sign in to comment.