<commit_before>require "icr"
require "cli"

module Amber::CLI
  class MainCommand < ::Cli::Supercommand
    command "r", aliased: "run"

    class Run < ::Cli::Command
      command_name "run"

      class Options
        string %w(-p --port), desc: "# PORT number to listen.", default: "3000"
        string %w(-e --environment), desc: "# AMBER_ENV environment (Production, Development, Staging).", default: "development"
        bool "--no-color", desc: "# Disable colored output", default: false
      end

      class Help
        caption "# Boots Amber server"
      end

      def run
        puts colorize("💎  Crystalizing...", :dark_gray)
        compile_command = "crystal build $(ls ./src/*.cr | sort -n | head -1) -o app"
        compile_command += " --release --no-debug" if %w(development test).includes?(options.e.downcase)
        system(compile_command)
        puts colorize("💎  Crystalization complete!", :dark_gray)
        Process.run(
          "PORT=#{options.p} AMBER_ENV=#{options.e} ./app",
          shell: true, output: true, error: true
        )
      end
    end
  end
end<commit_msg>changed if to unless for run command<commit_after>require "icr"
require "cli"

module Amber::CLI
  class MainCommand < ::Cli::Supercommand
    command "r", aliased: "run"

    class Run < ::Cli::Command
      command_name "run"

      class Options
        string %w(-p --port), desc: "# PORT number to listen.", default: "3000"
        string %w(-e --environment), desc: "# AMBER_ENV environment (Production, Development, Staging).", default: "development"
        bool "--no-color", desc: "# Disable colored output", default: false
      end

      class Help
        caption "# Boots Amber server"
      end

      def run
        puts colorize("💎  Crystalizing...", :dark_gray)
        compile_command = "crystal build $(ls ./src/*.cr | sort -n | head -1) -o app"
        compile_command += " --release --no-debug" unless %w(development test).includes?(options.e.downcase)
        system(compile_command)
        puts colorize("💎  Crystalization complete!", :dark_gray)
        Process.run(
          "PORT=#{options.p} AMBER_ENV=#{options.e} ./app",
          shell: true, output: true, error: true
        )
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.13747228381374724, 'fraction_numerical': 0.004434589800443459, 'mean_word_length': 2.50855365474339, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5143923', 'n_tokens_mistral': 693, 'n_tokens_neox': 674, 'n_words': 205}