<commit_before># Copyright (c) 2008 RightScale, Inc, All Rights Reserved Worldwide.
#
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
# AND CONSTITUTES A VALUABLE TRADE SECRET.  Any unauthorized use,
# reproduction, modification, or disclosure of this program is
# strictly prohibited.  Any use of this program by an authorized
# licensee is strictly subject to the terms and conditions,
# including confidentiality obligations, set forth in the applicable
# License Agreement between RightScale.com, Inc. and
# the licensee.

module Apt

  module Ubuntu
    # The different generate classes will always generate an exception ("string") if there's anything that went wrong. If no exception, things went well.
    class Intrepid
      def self.generate(description, base_urls, frozen_date="latest")
        opts = {:repo_filename => "rightscale",
                :repo_name => "default",
                :description => description,
                :base_urls => base_urls,
                :enabled => true }
        opts[:frozen_date] = frozen_date || "latest" # Optional frozen date
        Apt::Ubuntu::abstract_generate(opts)
      end
    end

    class Hardy
      def self.generate(description, base_urls, frozen_date="latest")
        opts = {:repo_filename => "rightscale",
                :repo_name => "default",
                :description => description,
                :base_urls => base_urls,
                :frozen_date => frozen_date,
                :enabled => true }
        opts[:frozen_date] = frozen_date || "latest" # Optional frozen date
        Apt::Ubuntu::abstract_generate(opts)
      end
    end

    def self.path_to_sources_list
      "/etc/apt/sources.list.d"
    end

    ############## INTERNAL FUNCTIONS #######################################################
    def self.abstract_generate(params)
      platform = RightScale::Platform.new<commit_msg>Add support for Jaunty and Karmic Ubuntu distribution software repositories<commit_after># Copyright (c) 2008 RightScale, Inc, All Rights Reserved Worldwide.
#
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
# AND CONSTITUTES A VALUABLE TRADE SECRET.  Any unauthorized use,
# reproduction, modification, or disclosure of this program is
# strictly prohibited.  Any use of this program by an authorized
# licensee is strictly subject to the terms and conditions,
# including confidentiality obligations, set forth in the applicable
# License Agreement between RightScale.com, Inc. and
# the licensee.

module Apt

  module Ubuntu

    # The different generate classes will always generate an exception ("string") if there's anything that went wrong. If no exception, things went well.
    [ 'Hardy', 'Intrepid', 'Jaunty', 'Karmic' ].each do |c|
      module_eval <<-EOS
        class #{c}
          def self.generate(description, base_urls, frozen_date="latest")
            opts = { :repo_filename => "rightscale",
                     :repo_name     => "default",
                     :description   => description,
                     :base_urls     => base_urls,
                     :frozen_date   => frozen_date,
                     :enabled       => true }
            opts[:frozen_date] = frozen_date || "latest" # Optional frozen date
            Apt::Ubuntu::abstract_generate(opts)
          end
        end
      EOS
    end

    def self.path_to_sources_list
      "/etc/apt/sources.list.d"
    end

    ############## INTERNAL FUNCTIONS #######################################################
    def self.abstract_generate(params)
      platform = RightScale::Platform.new
{'fraction_non_alphanumeric': 0.11681465038845727, 'fraction_numerical': 0.0022197558268590455, 'mean_word_length': 2.8391906283280086, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, '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': '377209', 'n_tokens_mistral': 989, 'n_tokens_neox': 912, 'n_words': 313}