Commit 5856b51

mo khan <mo@mokhan.ca>
2025-11-04 20:54:42
Tidy up and remove rubocop
1 parent d8812e6
bin/lint
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-set -e
-[ -n "$DEBUG" ] && set -x
-
-cd "$(dirname "$0")/.."
-
-bundle exec rubocop $@
lib/elelem/application.rb
@@ -3,10 +3,6 @@
 module Elelem
   class Application < Thor
     desc "chat", "Start the REPL"
-    method_option :help,
-                  aliases: "-h",
-                  type: :boolean,
-                  desc: "Display usage information"
     method_option :host,
                   aliases: "--host",
                   type: :string,
@@ -22,27 +18,18 @@ module Elelem
                   type: :string,
                   desc: "Ollama token",
                   default: ENV.fetch("OLLAMA_API_KEY", nil)
-    method_option :debug,
-                  aliases: "--debug",
-                  type: :boolean,
-                  desc: "Debug mode",
-                  default: false
+
     def chat(*)
-      if options[:help]
-        invoke :help, ["chat"]
-      else
-        configuration = Configuration.new(
-          host: options[:host],
-          model: options[:model],
-          token: options[:token],
-          debug: options[:debug]
-        )
-        say "Agent (#{configuration.model})", :green
-        say configuration.tools.banner.to_s, :green
+      configuration = Configuration.new(
+        host: options[:host],
+        model: options[:model],
+        token: options[:token],
+      )
+      say "Agent (#{configuration.model})", :green
+      say configuration.tools.banner.to_s, :green
 
-        agent = Agent.new(configuration)
-        agent.repl
-      end
+      agent = Agent.new(configuration)
+      agent.repl
     end
 
     desc "version", "The version of this CLI"
lib/elelem/configuration.rb
@@ -2,13 +2,12 @@
 
 module Elelem
   class Configuration
-    attr_reader :host, :model, :token, :debug
+    attr_reader :host, :model, :token
 
-    def initialize(host:, model:, token:, debug: false)
+    def initialize(host:, model:, token:)
       @host = host
       @model = model
       @token = token
-      @debug = debug
     end
 
     def tui
@@ -21,11 +20,7 @@ module Elelem
 
     def logger
       @logger ||= Logger.new("#{Time.now.strftime("%Y-%m-%d")}-elelem.log").tap do |logger|
-        if debug
-          logger.level = :debug
-        else
-          logger.level = ENV.fetch("LOG_LEVEL", "warn")
-        end
+        logger.level = ENV.fetch("LOG_LEVEL", "warn")
         logger.formatter = ->(severity, datetime, progname, message) {
           timestamp = datetime.strftime("%H:%M:%S.%3N")
           "[#{timestamp}] #{severity.ljust(5)} #{message.to_s.strip}\n"
.rubocop.yml
@@ -1,12 +0,0 @@
-AllCops:
-  SuggestExtensions: false
-  TargetRubyVersion: 3.4
-
-Style/Documentation:
-  Enabled: false
-
-Style/StringLiterals:
-  EnforcedStyle: double_quotes
-
-Style/StringLiteralsInInterpolation:
-  EnforcedStyle: double_quotes
Gemfile
@@ -8,4 +8,3 @@ gemspec
 gem "irb"
 gem "rake", "~> 13.0"
 gem "rspec", "~> 3.0"
-gem "rubocop", "~> 1.21"
Gemfile.lock
@@ -18,7 +18,6 @@ GEM
   specs:
     addressable (2.8.7)
       public_suffix (>= 2.0.2, < 7.0)
-    ast (2.4.3)
     base64 (0.3.0)
     bigdecimal (3.2.2)
     cli-ui (2.4.0)
@@ -34,8 +33,6 @@ GEM
     json-schema (6.0.0)
       addressable (~> 2.8)
       bigdecimal (~> 3.1)
-    language_server-protocol (3.17.0.5)
-    lint_roller (1.1.0)
     logger (1.7.0)
     net-hippie (1.4.0)
       base64 (~> 0.1)
@@ -51,25 +48,17 @@ GEM
       uri (~> 1.0)
     open3 (0.2.1)
     openssl (3.3.1)
-    parallel (1.27.0)
-    parser (3.3.9.0)
-      ast (~> 2.4.1)
-      racc
     pp (0.6.2)
       prettyprint
     prettyprint (0.2.0)
-    prism (1.4.0)
     psych (5.2.6)
       date
       stringio
     public_suffix (6.0.2)
-    racc (1.8.1)
-    rainbow (3.1.1)
     rake (13.3.0)
     rdoc (6.14.2)
       erb
       psych (>= 4.0.0)
-    regexp_parser (2.11.0)
     reline (0.6.2)
       io-console (~> 0.5)
     rspec (3.13.1)
@@ -85,27 +74,9 @@ GEM
       diff-lcs (>= 1.2.0, < 2.0)
       rspec-support (~> 3.13.0)
     rspec-support (3.13.4)
-    rubocop (1.79.2)
-      json (~> 2.3)
-      language_server-protocol (~> 3.17.0.2)
-      lint_roller (~> 1.1.0)
-      parallel (~> 1.10)
-      parser (>= 3.3.0.2)
-      rainbow (>= 2.2.2, < 4.0)
-      regexp_parser (>= 2.9.3, < 3.0)
-      rubocop-ast (>= 1.46.0, < 2.0)
-      ruby-progressbar (~> 1.7)
-      unicode-display_width (>= 2.4.0, < 4.0)
-    rubocop-ast (1.46.0)
-      parser (>= 3.3.7.2)
-      prism (~> 1.4)
-    ruby-progressbar (1.13.0)
     stringio (3.1.7)
     thor (1.3.2)
     timeout (0.4.3)
-    unicode-display_width (3.1.4)
-      unicode-emoji (~> 4.0, >= 4.0.4)
-    unicode-emoji (4.0.4)
     uri (1.0.3)
 
 PLATFORMS
@@ -117,7 +88,6 @@ DEPENDENCIES
   irb
   rake (~> 13.0)
   rspec (~> 3.0)
-  rubocop (~> 1.21)
 
 BUNDLED WITH
    2.7.2
Rakefile
@@ -2,9 +2,7 @@
 
 require "bundler/gem_tasks"
 require "rspec/core/rake_task"
-require "rubocop/rake_task"
 
 RSpec::Core::RakeTask.new(:spec)
-RuboCop::RakeTask.new
 
-task default: %i[spec rubocop]
+task default: %i[spec]