<commit_before>describe "/activities" do
  describe "GET" do
    it "forbids access to sources for an unauthorized user" do
      get '/activities', :as => nil
      response.status_code.should == 401
      response.status_message.should == "Unauthorized"
      response.content_type.should == 'text/html'
    end

    it "allows access to sources for an authorized user" do
      get '/activities', :as => :juno

      response.status_code.should == 200
      response.status_message.should == "OK"
      response.content_type.should == 'text/xml'
      response.xml_attributes("source", "name").should include("Northwestern University")
    end

    it "allows access to a specific group of activity(s) by specifying a query parameter" do
      get '/activities/?q=x-ray', :as => :juno

      response.status_code.should == 200
      response.content_type.should == 'text/xml'
      response.xml_attributes("activity", "name").should include("X-Ray: Skeletal")
      response.xml_elements('//activity').should have(3).elements
    end
end<commit_msg>Fix syntax error introduced in r5670. #1211.<commit_after>describe "/activities" do
  describe "GET" do
    it "forbids access to sources for an unauthorized user" do
      get '/activities', :as => nil
      response.status_code.should == 401
      response.status_message.should == "Unauthorized"
      response.content_type.should == 'text/html'
    end

    it "allows access to sources for an authorized user" do
      get '/activities', :as => :juno

      response.status_code.should == 200
      response.status_message.should == "OK"
      response.content_type.should == 'text/xml'
      response.xml_attributes("source", "name").should include("Northwestern University")
    end

    it "allows access to a specific group of activity(s) by specifying a query parameter" do
      get '/activities/?q=x-ray', :as => :juno

      response.status_code.should == 200
      response.content_type.should == 'text/xml'
      response.xml_attributes("activity", "name").should include("X-Ray: Skeletal")
      response.xml_elements('//activity').should have(3).elements
    end
  end
end
{'fraction_non_alphanumeric': 0.1200373657169547, 'fraction_numerical': 0.013078000934142924, 'mean_word_length': 3.318548387096774, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, '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': '3392710', 'n_tokens_mistral': 647, 'n_tokens_neox': 598, 'n_words': 172}