<commit_before># -*- encoding: utf-8 -*-

require 'minitest/autorun'
require 'vcr'
require 'webmock/minitest'
require 'flacky/scraper'

VCR.configure do |c|
  c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
  c.hook_into :webmock
end

describe Flacky::Scraper do
  WRAPPED_ERRORS = [
    Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError,
    Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
    SocketError, OpenSSL::SSL::SSLError, Errno::ECONNREFUSED
  ]

  ALBUM_DATA = {
    :rush_moving_pictures => {
      :url => "http://www.allmusic.com/album/moving-pictures-mw0000616962",
      :styles => [
        "Album Rock", "Arena Rock", "Hard Rock", "Prog-Rock"
      ],
      :moods => [
        "Aggressive", "Ambitious", "Atmospheric", "Cerebral", "Complex",
        "Confident", "Difficult", "Dramatic", "Earnest", "Elaborate",
        "Energetic", "Enigmatic", "Epic", "Fierce", "Fiery", "Intense",
        "Literate", "Lively", "Plaintive", "Provocative", "Reflective",
        "Sprawling", "Swaggering", "Tense/Anxious", "Theatrical", "Urgent",
        "Visceral", "Volatile"
      ]
    },<commit_msg>Update WebMock wiring for newer release(s).<commit_after># -*- encoding: utf-8 -*-

require 'minitest/autorun'
require 'vcr'
require 'webmock'
require 'flacky/scraper'

VCR.configure do |c|
  c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
  c.hook_into :webmock
end

describe Flacky::Scraper do
  include WebMock::API

  WRAPPED_ERRORS = [
    Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError,
    Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
    SocketError, OpenSSL::SSL::SSLError, Errno::ECONNREFUSED
  ]

  ALBUM_DATA = {
    :rush_moving_pictures => {
      :url => "http://www.allmusic.com/album/moving-pictures-mw0000616962",
      :styles => [
        "Album Rock", "Arena Rock", "Hard Rock", "Prog-Rock"
      ],
      :moods => [
        "Aggressive", "Ambitious", "Atmospheric", "Cerebral", "Complex",
        "Confident", "Difficult", "Dramatic", "Earnest", "Elaborate",
        "Energetic", "Enigmatic", "Epic", "Fierce", "Fiery", "Intense",
        "Literate", "Lively", "Plaintive", "Provocative", "Reflective",
        "Sprawling", "Swaggering", "Tense/Anxious", "Theatrical", "Urgent",
        "Visceral", "Volatile"
      ]
    },
{'fraction_non_alphanumeric': 0.16944801026957637, 'fraction_numerical': 0.009413778348309799, 'mean_word_length': 3.8810020876826723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7528892', 'n_tokens_mistral': 925, 'n_tokens_neox': 872, 'n_words': 155}