Module: API

Defined in:
lib/api.rb,
lib/api/mq.rb,
lib/api/github.rb,
lib/api/helper.rb,
lib/api/spider.rb,
lib/api/gradle2.rb,
lib/api/pattern.rb,
lib/api/gem_data.rb,
lib/api/j_center.rb,
lib/api/bitbucket.rb,
lib/api/go_pkg_in.rb,
lib/api/golang_org.rb,
lib/api/excel_export.rb,
lib/api/npm_registry.rb,
lib/api/git_kernel_org.rb,
lib/api/code_google_com.rb,
lib/api/google_source_com.rb,
lib/api/remote_source_package.rb,
lib/api/maven_central_repository.rb

Defined Under Namespace

Classes: Bitbucket, CodeGoogleCom, ExcelExport, GemData, GitKernelOrg, Github, GoPkgIn, GolangOrg, GoogleSourceCom, Gradle, Helper, JCenter, Launchpad, ManifestPackage, MavenCentralRepository, NpmRegistry, RabbitMQ, RemoteSourcePackage, RemoteSourceVCS, Spider

Constant Summary collapse

SOURCE_URL_PATTERN =
{
  :github => /(?<protocol>(http[s]?|git))(:\/\/|@)(?<host>(www\.)?github\.com)(\/|:)(?<owner>.+)\/(?<repo>[^\/.]+)(?<ext>\.git)?/,
  :git_kernel_org => /(?<protocol>http[s]?):\/\/(?<host>git\.kernel\.org)\/.+\/(?<owner>.+)\/(?<repo>[^\/.]+)(?<ext>\.git)?/,
  # DOC: https://docs.npmjs.com/files/package.json#git-urls-as-dependencies
  :npm_urls => /(?<protocol>git):\/\/(?<host>.*\..*)\/(?<owner>.+)\/(?<repo>[^\/#]+(\.git)?)(#(?<ref>.*))?/,
  :bitbucket => /(?<protocol>http[s]?):\/\/(?<host>bitbucket\.org)\/(?<owner>.+)\/(?<repo>.+)(?<ext>\.git)?/,
  :github_html_page => /(?<protocol>http[s]?):\/\/(?<host>(www\.)?github\.com)\/(?<owner>.+)\/(?<repo>[^\/]+)\/blob\/(?<branch>.+)\/(?<file_pathname>.+)?/,
  :github_dot_com => /github\.com/,
  :rubygems_org => /rubygems\.org/,
  :google_source_com => /(?<protocol>http[s]?):\/\/(?<owner>.+)\.(?<host>googlesource\.com)\/(?<repo>[^\/.]+)(?<ext>\.git)?/,
  :code_google_com => /(?<protocol>http[s]?):\/\/(?<host>code\.google\.com)\/(?<owner>p)\/(?<repo>[^\/.]+)?/,
  :go_pkg_in => /(?<protocol>http[s]?):\/\/(?<host>gopkg\.in)\/((?<owner>[^\/.]+)\/(?<repo>[^\/.]+)\.(?<ref>.+)|(?<repo>[^\/.]+)\.(?<ref>[^\/.]+))/,
  :golang_org => /(?<protocol>http[s]?):\/\/(?<host>.*golang\.org)\/(?<owner>[^\/.]+)\/(?<repo>[^\/.]+)/
}
FILE_NAME_PATTERN =
{
  :license_file => /(licen[sc]e|copying)+/i,
  :readme_file => /readme/i,
  :components_yml => /components\.yml/,
  :notice_file => /(notice|copyright)/i,
  :debian_copyright_file => /^[^\/]+\/debian\/copyright$/
}
FILE_TYPE_PATTERN =
{
  :tar_gz => /(tar\.gz|\.tgz)$/,
  :tar_xz => /tar\.xz$/,
  :tar_bz2 => /tar\.bz2$/
}
OS_PATTERN =
{
  :ubuntu => /^(?<distribution>(Ubuntu))-(?<distro_series>(Trusty))/i,
  :centos => /^(?<distribution>(CentOS))-(?<distro_series>(7\.x))/i,
}