<commit_before>require 'user_agent'

shared_examples 'Apple Podcasts with details' do |version, platform, os|
  it "returns 'Apple Podcasts' as its browser" do
    expect(useragent.browser).to eq('Apple Podcasts')
  end

  it "returns '#{version}' as its version" do
    expect(useragent.version).to eq(version)
  end

  it "returns '#{platform}' as its platform" do
    expect(useragent.platform).to eq(platform)
  end

  it "returns '#{os}' as its os" do
    expect(useragent.os).to eq(os)
  end

  if platform == 'iOS'
    it { expect(useragent).to be_mobile }
    it { expect(useragent).not_to be_desktop }
  else
    it { expect(useragent).not_to be_mobile }
    it { expect(useragent).to be_desktop }
  end
end

describe "%D8%A7%D9%84%D8%A8%D9%88%D8%AF%D9%83%D8%A7%D8%B3%D8%AA/1430.27 CFNetwork/1150 Darwin/20.0.0" do
  let!(:useragent) { UserAgent.parse("%D8%A7%D9%84%D8%A8%D9%88%D8%AF%D9%83%D8%A7%D8%B3%D8%AA/1430.27 CFNetwork/1150 Darwin/20.0.0") }

  it_behaves_like 'Apple Podcasts with details', '1430.27', 'iOS', 'iOS 14.0.x'
end

describe "Podcasty/1400.173.3 CFNetwork/1085.4 Darwin/19.0.0 (x86_64)" do
  let!(:useragent) { UserAgent.parse("Podcasty/1400.173.3 CFNetwork/1085.4 Darwin/19.0.0 (x86_64)") }

  it_behaves_like 'Apple Podcasts with details', '1400.173.3', 'Macintosh', 'macOS 10.15'
end

describe "Podcastit/1425.5 CFNetwork/1121.1.1 Darwin/19.2.0 (x86_64)" do<commit_msg>update Apple Podcasts<commit_after>require 'user_agent'

shared_examples 'Apple Podcasts with details' do |version, platform, os|
  it "returns 'Apple Podcasts' as its browser" do
    expect(useragent.browser).to eq('Apple Podcasts')
  end

  it "returns '#{version}' as its version" do
    expect(useragent.version).to eq(version)
  end

  it "returns '#{platform}' as its platform" do
    expect(useragent.platform).to eq(platform)
  end

  it "returns '#{os}' as its os" do
    expect(useragent.os).to eq(os)
  end

  if platform == 'iOS'
    it { expect(useragent).to be_mobile }
    it { expect(useragent).not_to be_desktop }
    it { expect(useragent).not_to be_speaker }
    it { expect(useragent).not_to be_bot }
  else
    it { expect(useragent).to be_desktop }
    it { expect(useragent).not_to be_mobile }
    it { expect(useragent).not_to be_speaker }
    it { expect(useragent).not_to be_bot }
  end
end

describe "%D8%A7%D9%84%D8%A8%D9%88%D8%AF%D9%83%D8%A7%D8%B3%D8%AA/1430.27 CFNetwork/1150 Darwin/20.0.0" do
  let!(:useragent) { UserAgent.parse("%D8%A7%D9%84%D8%A8%D9%88%D8%AF%D9%83%D8%A7%D8%B3%D8%AA/1430.27 CFNetwork/1150 Darwin/20.0.0") }

  it_behaves_like 'Apple Podcasts with details', '1430.27', 'iOS', 'iOS 14.0.x'
end

describe "Podcasty/1400.173.3 CFNetwork/1085.4 Darwin/19.0.0 (x86_64)" do
  let!(:useragent) { UserAgent.parse("Podcasty/1400.173.3 CFNetwork/1085.4 Darwin/19.0.0 (x86_64)") }

  it_behaves_like 'Apple Podcasts with details', '1400.173.3', 'Macintosh', 'macOS 10.15'
end

describe "Podcastit/1425.5 CFNetwork/1121.1.1 Darwin/19.2.0 (x86_64)" do
{'fraction_non_alphanumeric': 0.1539491298527443, 'fraction_numerical': 0.09906291834002677, 'mean_word_length': 4.36624775583483, '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': '4256324', 'n_tokens_mistral': 1387, 'n_tokens_neox': 1221, 'n_words': 247}