<commit_before>require 'gh'

module Travis
  module Github
    autoload :Payload, 'travis/github/payload'

    class << self
      def repositories_for(user)
        GH.with(:token => user.github_oauth_token) do
          resources_for(user).map do |resource|
            GH["#{resource}?per_page=100"]
          end.flatten
        end
      end

      private

        def resources_for(user)
          ['user/repos'] + user.organizations.map { |org| "orgs/#{org.login}/repos" }
        end
    end
  end
end<commit_msg>gotta turn GH enumerables into arrays<commit_after>require 'gh'

module Travis
  module Github
    autoload :Payload, 'travis/github/payload'

    class << self
      def repositories_for(user)
        GH.with(:token => user.github_oauth_token) do
          resources_for(user).map do |resource|
            GH["#{resource}?per_page=100"].to_a
          end.flatten
        end
      end

      private

        def resources_for(user)
          ['user/repos'] + user.organizations.map { |org| "orgs/#{org.login}/repos" }
        end
    end
  end
end
{'fraction_non_alphanumeric': 0.11090400745573159, 'fraction_numerical': 0.005591798695246971, 'mean_word_length': 2.2447129909365557, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1161984', 'n_tokens_mistral': 358, 'n_tokens_neox': 334, 'n_words': 72}