From 9b15a05e347bc018da5579a26d90784dc0822aba Mon Sep 17 00:00:00 2001 From: "Ryan P. McKinnon" <15917743+mrhoribu@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:51:31 -0500 Subject: [PATCH 1/3] bugfix: NilClass Opts.char when none passed --- profanity.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profanity.rb b/profanity.rb index 8c84ce6..90f250c 100644 --- a/profanity.rb +++ b/profanity.rb @@ -54,7 +54,7 @@ def self.log_file @title = nil @status = nil - @char = Opts.char.capitalize + @char = Opts.char.nil? ? "Unknown" : Opts.char.capitalize @state = {} def self.fetch(key, default = nil) @@ -179,7 +179,7 @@ def add_prompt(window, prompt_text, cmd = "") ERROR end -Profanity.set_terminal_title(Opts.char.capitalize) +Profanity.set_terminal_title((Opts.char.nil? ? "Unknown" : Opts.char.capitalize)) unless defined?(CUSTOM_COLORS) CUSTOM_COLORS = Curses.can_change_color? From fcfc19e6e20e9d517b0a54730dd2ec6bac375c3d Mon Sep 17 00:00:00 2001 From: "Ryan P. McKinnon" <15917743+mrhoribu@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:55:23 -0500 Subject: [PATCH 2/3] Update profanity.rb --- profanity.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/profanity.rb b/profanity.rb index 90f250c..6e1cf1c 100644 --- a/profanity.rb +++ b/profanity.rb @@ -1,4 +1,6 @@ #!/usr/bin/env ruby +# encoding: US-ASCII + =begin ProfanityFE From 0cf8ed2e87a9d6af4fc239a15965e04efa60d68c Mon Sep 17 00:00:00 2001 From: "Ryan P. McKinnon" <15917743+mrhoribu@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:57:48 -0500 Subject: [PATCH 3/3] Update rubocop.yml --- .github/workflows/rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index c39ba93..79b9ea4 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -32,7 +32,7 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - bundler-cache: true + bundler-cache: false - name: Install ruby gem dependencies with bundler run: | gem install bundler