Skip to content

Commit

Permalink
Merge pull request #264 from mvz/update-supported-ruby-versions
Browse files Browse the repository at this point in the history
Support Ruby 3.1 through 3.4
  • Loading branch information
mvz authored Dec 31, 2024
2 parents 91a2717 + f93dc7f commit 01b7930
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3"]
ruby: ["3.1", "3.2", "3.3", "3.4"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ AllCops:
- 'lib/alexandria/default_preferences.rb'
- 'pkg/**/*'
NewCops: enable
TargetRubyVersion: 3.0
TargetRubyVersion: 3.1

# Put development dependencies in the gemspec so rubygems.org knows about them
Gemspec/DevelopmentDependencies:
Expand Down
5 changes: 2 additions & 3 deletions alexandria-book-collection-manager.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ Gem::Specification.new do |spec|
spec.email = ["[email protected]"]

spec.summary = "GNOME application for managing collections of books"

spec.homepage = "http://www.github.com/mvz/alexandria-book-collection-manager"
spec.license = "GPL-2.0-or-later"

spec.required_ruby_version = ">= 3.0"
spec.license = "GPL-2.0-or-later"
spec.required_ruby_version = ">= 3.1.0"

spec.metadata["rubygems_mfa_required"] = "true"

Expand Down
1 change: 0 additions & 1 deletion lib/alexandria/book_providers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ class Variable

def initialize(provider, name, description, default_value,
possible_values = nil, mandatory = true)

@provider = provider
@name = name
@description = description
Expand Down
4 changes: 2 additions & 2 deletions lib/alexandria/export_library.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def name
@library.name
end

def each(&block)
@sorted.each(&block)
def each(&)
@sorted.each(&)
end

def export_as_onix_xml_archive(filename)
Expand Down
40 changes: 20 additions & 20 deletions lib/alexandria/logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,24 @@ def add(severity, message = nil, source = nil, progname = nil, &block)
super(severity, message, category, &block)
end

def debug(source = nil, progname = nil, &block)
add(DEBUG, nil, source, progname, &block)
def debug(source = nil, progname = nil, &)
add(DEBUG, nil, source, progname, &)
end

def info(source = nil, progname = nil, &block)
add(INFO, nil, source, progname, &block)
def info(source = nil, progname = nil, &)
add(INFO, nil, source, progname, &)
end

def warn(source = nil, progname = nil, &block)
add(WARN, nil, source, progname, &block)
def warn(source = nil, progname = nil, &)
add(WARN, nil, source, progname, &)
end

def error(source = nil, progname = nil, &block)
add(ERROR, nil, source, progname, &block)
def error(source = nil, progname = nil, &)
add(ERROR, nil, source, progname, &)
end

def fatal(source = nil, progname = nil, &block)
add(FATAL, nil, source, progname, &block)
def fatal(source = nil, progname = nil, &)
add(FATAL, nil, source, progname, &)
end

def self.category(source)
Expand Down Expand Up @@ -90,24 +90,24 @@ def <<(msg)
end
end

def debug(progname = nil, &block)
@logger.debug(@source, progname, &block)
def debug(progname = nil, &)
@logger.debug(@source, progname, &)
end

def info(progname = nil, &block)
@logger.info(@source, progname, &block)
def info(progname = nil, &)
@logger.info(@source, progname, &)
end

def warn(progname = nil, &block)
@logger.warn(@source, progname, &block)
def warn(progname = nil, &)
@logger.warn(@source, progname, &)
end

def error(progname = nil, &block)
@logger.error(@source, progname, &block)
def error(progname = nil, &)
@logger.error(@source, progname, &)
end

def fatal(progname = nil, &block)
@logger.fatal(@source, progname, &block)
def fatal(progname = nil, &)
@logger.fatal(@source, progname, &)
end
end

Expand Down
1 change: 0 additions & 1 deletion lib/alexandria/models/book.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class Book

def initialize(title, authors, isbn, publisher, publishing_year,
edition)

@title = title
@authors = authors
@isbn = isbn
Expand Down
4 changes: 2 additions & 2 deletions lib/alexandria/scanners.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def self.find_scanner(name)
registry.find { |scanner| scanner.name == name }
end

def self.each_scanner(&block)
registry.each(&block)
def self.each_scanner(&)
registry.each(&)
end

private_class_method :registry
Expand Down

0 comments on commit 01b7930

Please sign in to comment.