Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Ruby 3.0 #30

Merged
merged 4 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 0 additions & 118 deletions .changelog.old.md

This file was deleted.

3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = coverage,tmp,Gemfile.lock,sublime*,*.svg
; ignore-words-list = rouge
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

strategy:
matrix: { ruby: ['3.0', '3.1', '3.2', head] }
matrix: { ruby: ['3.1', '3.2', '3.3'] }

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install OS dependencies
run: sudo apt-get -y install libyaml-dev
Expand All @@ -35,7 +35,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

# Rush needed for easy installation of check-jsonschema
- name: Install rush
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inherit_gem:
- rspec.yml

AllCops:
TargetRubyVersion: 3.0
TargetRubyVersion: 3.1
SuggestExtensions: false
Exclude:
- debug.rb
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Change Log
========================================

Untagged - Latest
----------------------------------------

- Drop support for Ruby 2.x
- Drop support for Ruby 3.0


v0.2.7 - 2023-01-31
----------------------------------------

Expand All @@ -14,6 +21,7 @@ v0.2.6 - 2021-04-25
- Fix tty-prompt 0.23.1 breaking change


<!-- break v0.2.4 -->
## [v0.2.4](https://github.com/DannyBen/menu_commander/tree/v0.2.4) (2020-01-26)

[Full Changelog](https://github.com/DannyBen/menu_commander/compare/v0.2.3...v0.2.4)
Expand Down Expand Up @@ -131,4 +139,3 @@ v0.2.6 - 2021-04-25
**Merged pull requests:**

- Remove special treatment for single-item menus [\#1](https://github.com/DannyBen/menu_commander/pull/1) ([DannyBen](https://github.com/DannyBen))

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source 'https://rubygems.org'

git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

gem 'byebug'
gem 'debug'
gem 'lp'
gem 'rdoc'
gem 'rspec'
Expand Down
17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,6 @@ Easily create menus for any command line tool using simple YAML configuration.

---

* [Installation](#installation)
* [Usage](#usage)
* [Menu Navigation](#menu-navigation)
* [Menu Definition](#menu-definition)
* [Minimal menu requirements](#minimal-menu-requirements)
* [Argument sub-menus](#argument-sub-menus)
* [Free text input](#free-text-input)
* [Nested menus](#nested-menus)
* [Split menu into several files](#split-menu-into-several-files)
* [Multi-line commands](#multi-line-commands)
* [Menu Options](#menu-options)
* [Menu File Location](#menu-file-location)

---

![Demo](/demo/cast.svg)

---
Expand Down Expand Up @@ -294,7 +279,7 @@ options:
# When to show search filter
# yes = always show
# no = never show
# auto = show only when there aare more items than page_size (default)
# auto = show only when there are more items than page_size (default)
# <number> = show only when there are more items than <number>
filter: yes

Expand Down
9 changes: 1 addition & 8 deletions Runfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "byebug"
require 'debug'
require 'menu_commander/version'

title "MenuCommander Developer Toolbelt"
Expand All @@ -7,13 +7,6 @@ version MenuCommander::VERSION

import_gem 'runfile-tasks/gem', gemname: 'menu_commander'

help "Generate changelog and append old changelog"
action :changelog do
system "git changelog --save"
# append older changelog (prior to switching to git-changelog)
system "cat .changelog.old.md >> CHANGELOG.md"
end

help 'Test the schema against all examples'
action :schema do
Dir['examples/*.yml'].each do |file|
Expand Down
2 changes: 1 addition & 1 deletion examples/options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ options:
# When to show search filter
# yes = always show
# no = never show
# auto = show only when there aare more items than page_size (default)
# auto = show only when there are more items than page_size (default)
# <number> = show only when there are more items than <number>
filter: yes

Expand Down
5 changes: 0 additions & 5 deletions lib/menu_commander.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,3 @@
require 'menu_commander/command'
require 'menu_commander/cli'
require 'menu_commander/version'

if ENV['BYEBUG']
require 'byebug'
require 'lp'
end
2 changes: 1 addition & 1 deletion lib/menu_commander/menu_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def default_options
}
end

def method_missing(method, *_args, &_block)
def method_missing(method, *_args, &)
respond_to?(method) ? options[method] : super
end

Expand Down
10 changes: 5 additions & 5 deletions menu_commander.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ Gem::Specification.new do |s|
s.homepage = 'https://github.com/DannyBen/menu_commander'
s.license = 'MIT'

s.required_ruby_version = '>= 3.0'
s.required_ruby_version = '>= 3.1'

s.add_runtime_dependency 'colsole', '>= 0.8.1', '< 2'
s.add_runtime_dependency 'extended_yaml', '~> 0.2'
s.add_runtime_dependency 'mister_bin', '~> 0.7'
s.add_runtime_dependency 'tty-prompt', '~> 0.23'
s.add_dependency 'colsole', '~> 1.0'
s.add_dependency 'extended_yaml', '~> 0.2'
s.add_dependency 'mister_bin', '~> 0.7'
s.add_dependency 'tty-prompt', '~> 0.23'

s.metadata = {
'bug_tracker_uri' => 'https://github.com/DannyBen/menu_commander/issues',
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This folder contains additional examples used by the specs.

They are here to keep the examples folde rclen of noise.
They are here to keep the examples folder clean of noise.
10 changes: 5 additions & 5 deletions spec/spec_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ def capture_output
end
end

def interactive(*args, &block)
def interactive(...)
if ENV['DEBUG'] == '2'
# :nocov:
interactive!(*args, &block)
interactive!(...)
# :nocov:
else
capture_output { interactive!(*args, &block) }
capture_output { interactive!(...) }
end
end

def interactive!(*args, &block)
def interactive!(*args, &)
if args.any?
stdin_send(*args, &block)
stdin_send(*args, &)
else
# :nocov:
yield
Expand Down