Sha256: bb6074f07167fd1503086283e068540603f866c618cbb071eaae6ff0f33f7015

Contents?: true

Size: 820 Bytes

Versions: 3

Compression:

Stored size: 820 Bytes

Contents

require "organization_audit/version"

module OrganizationAudit
  autoload :Repo, 'organization_audit/repo'

  class << self
    def all(options={})
      Repo.all(options).reject do |repo|
        ignored = (options[:ignore] || [])
        ignored.include?(repo.url) or ignored.include?(repo.name)
      end
    end

    def optparse(parser, options)
      parser.on("--user USER", "Use this github user") { |user| options[:user] = user }
      parser.on("--organization ORGANIZATION", "Use this github organization") { |organization| options[:organization] = organization }
      parser.on("--token TOKEN", "Use this github token") { |token| options[:token] = token }
      parser.on("--ignore REPO", "Ignore given repo name or url (use multiple times)") { |repo_name| options[:ignore] << repo_name }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
organization_audit-1.0.2 lib/organization_audit.rb
organization_audit-1.0.1 lib/organization_audit.rb
organization_audit-1.0.0 lib/organization_audit.rb