<commit_before>module PivoFlow
  class Cli

    def initialize *args
      if args.length.zero?
        puts "You forgot method name"
        exit 1
      end
      parse_argv(*args)
    end

    def stories
      PivoFlow::Pivotal.new.show_stories
    end

    def start story_id
      PivoFlow::Pivotal.new.pick_up_story(story_id)
    end

    def finish story_id=nil
      file_story_path = File.join(Dir.pwd, "/tmp/.pivotal_story_id")
      if File.exists? file_story_path
        story_id = File.open(file_story_path).read.strip
      end
      PivoFlow::Pivotal.new.finish_story(story_id)
    end

    private<commit_msg>clear command for removing current ticket<commit_after>module PivoFlow
  class Cli

    def initialize *args
      if args.length.zero?
        puts "You forgot method name"
        exit 1
      end
      parse_argv(*args)
    end

    def stories
      PivoFlow::Pivotal.new.show_stories
    end

    def start story_id
      PivoFlow::Pivotal.new.pick_up_story(story_id)
    end

    def finish story_id=nil
      file_story_path = File.join(Dir.pwd, "/tmp/.pivotal_story_id")
      if File.exists? file_story_path
        story_id = File.open(file_story_path).read.strip
      end
      PivoFlow::Pivotal.new.finish_story(story_id)
    end

    def clear
      file_story_path = File.join(Dir.pwd, "/tmp/.pivotal_story_id")
      if File.exists? file_story_path
        FileUtils.remove_file(file_story_path)
      end
      puts "Current pivotal story id cleared."
    end

    private
{'fraction_non_alphanumeric': 0.0758575197889182, 'fraction_numerical': 0.0013192612137203166, 'mean_word_length': 2.471395881006865, 'pattern_counts': {'":': 0, '<': 3, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1161947', 'n_tokens_mistral': 518, 'n_tokens_neox': 503, 'n_words': 107}