<commit_before>get '/' do
  erb :index
end

get '/movie' do

  all_movies = Omdb::Api.new.search(params[:movie])

  # movies_info = all_movies[:movies]
  # first_movie = movies_info[0]

  if all_movies[:movies].size > 0
    # puts first_movie.title

  else
    puts "Non Existing movie name"
  end


  # p first_arr.to_json



  # p @movie.title
  # p @movie.year
  # p @movie.rated
  # p @movie.genre
  # p @movie.poster

  # erb :movie
end
<commit_msg>added error handling when no movie exists"<commit_after>get '/' do
  erb :index
end

get '/movie' do

  all_movies = Omdb::Api.new.search(params[:movie])
  movies_info = all_movies[:movies]

  if movies_info.size > 0
    @movie_list = []
    movies_info.each do |movie|
      @movie_list << movie
    end

    p @movie_list.first
    p "################"
    p @movie_list.last
  else
    puts "Non Existing movie name"
  end




  # p first_arr.to_json



  # p @movie.title
  # p @movie.year
  # p @movie.rated
  # p @movie.genre
  # p @movie.poster

  # erb :movie
end

{'fraction_non_alphanumeric': 0.13352826510721247, 'fraction_numerical': 0.0029239766081871343, 'mean_word_length': 2.775735294117647, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2608973', 'n_tokens_mistral': 437, 'n_tokens_neox': 392, 'n_words': 96}