<commit_before>require "tmpdir"
require "rubygems"
require "language_pack"
require "language_pack/base"
require "language_pack/bundler_lockfile"

# base Ruby Language Pack. This is for any base ruby app.
class LanguagePack::Ruby < LanguagePack::Base
  include LanguagePack::BundlerLockfile
  extend LanguagePack::BundlerLockfile::ClassMethods

  BUILDPACK_VERSION    = "v64"
  LIBYAML_VERSION      = "0.1.4"
  LIBYAML_PATH         = "libyaml-#{LIBYAML_VERSION}"
  BUNDLER_VERSION      = "1.3.2"
  BUNDLER_GEM_PATH     = "bundler-#{BUNDLER_VERSION}"
  #NODE_VERSION         = "0.4.7"
  NODE_JS_BINARY_PATH = "node"
  JVM_BASE_URL         = "http://heroku-jdk.s3.amazonaws.com"
  JVM_VERSION          = "openjdk7-latest"
  DEFAULT_RUBY_VERSION = "ruby-2.0.0"
  BOWER_VERSION        = "1.0.0"
  BOWER_BASE_URL       = "http://heroku-buildpack-ruby-bower.s3.amazonaws.com"

  # detects if this is a valid Ruby app
  # @return [Boolean] true if it's a Ruby app
  def self.use?
    File.exist?("Gemfile")
  end

  def self.gem_version(name)
    if gem = bundle.specs.detect {|g| g.name == name }
      gem.version
    end
  end

  def name
    "Ruby"
  end

  def default_addons
    add_dev_database_addon<commit_msg>Update bower to 1.1.2<commit_after>require "tmpdir"
require "rubygems"
require "language_pack"
require "language_pack/base"
require "language_pack/bundler_lockfile"

# base Ruby Language Pack. This is for any base ruby app.
class LanguagePack::Ruby < LanguagePack::Base
  include LanguagePack::BundlerLockfile
  extend LanguagePack::BundlerLockfile::ClassMethods

  BUILDPACK_VERSION    = "v64"
  LIBYAML_VERSION      = "0.1.4"
  LIBYAML_PATH         = "libyaml-#{LIBYAML_VERSION}"
  BUNDLER_VERSION      = "1.3.2"
  BUNDLER_GEM_PATH     = "bundler-#{BUNDLER_VERSION}"
  #NODE_VERSION         = "0.4.7"
  NODE_JS_BINARY_PATH = "node"
  JVM_BASE_URL         = "http://heroku-jdk.s3.amazonaws.com"
  JVM_VERSION          = "openjdk7-latest"
  DEFAULT_RUBY_VERSION = "ruby-2.0.0"
  BOWER_VERSION        = "1.1.2"
  BOWER_BASE_URL       = "http://heroku-buildpack-ruby-bower.s3.amazonaws.com"

  # detects if this is a valid Ruby app
  # @return [Boolean] true if it's a Ruby app
  def self.use?
    File.exist?("Gemfile")
  end

  def self.gem_version(name)
    if gem = bundle.specs.detect {|g| g.name == name }
      gem.version
    end
  end

  def name
    "Ruby"
  end

  def default_addons
    add_dev_database_addon
{'fraction_non_alphanumeric': 0.1094650205761317, 'fraction_numerical': 0.017695473251028805, 'mean_word_length': 3.176975945017182, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1042553', 'n_tokens_mistral': 948, 'n_tokens_neox': 910, 'n_words': 182}