Sha256: 515ccb9114606d2a364f64d370d98bc1199243889d098a352c2136130be07107

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

require "brakeman"
require "octokit"
require "rails_best_practices"
require "rubocop"
require "rubocop-performance"
require "rubocop-platanus"
require "rubocop-rails"
require "rubocop-rspec"

require "repo_analyzer/engine"

module RepoAnalyzer
  extend self

  # You can add, in this module, your own configuration options as in the example below...
  #
  # attr_writer :my_option
  #
  # def my_option
  #   return "Default Value" unless @my_option
  #   @my_option
  # end
  #
  # Then, you can customize the default behaviour (typically in a Rails initializer) like this:
  #
  # RepoAnalyzer.setup do |config|
  #   config.root_url = "Another value"
  # end

  attr_writer :github_personal_token, :post_extracted_info_endpoint

  def github_personal_token
    return ENV["GITHUB_PERSONAL_TOKEN"] if @github_personal_token.blank?

    @github_personal_token
  end

  def post_extracted_info_endpoint
    return ENV["REPO_ANALYZER_URL"] if @post_extracted_info_endpoint.blank?

    @post_extracted_info_endpoint
  end

  def setup
    yield self
    require "repo_analyzer"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
repo_analyzer-1.3.0 lib/repo_analyzer.rb
repo_analyzer-1.2.0 lib/repo_analyzer.rb
repo_analyzer-1.1.0 lib/repo_analyzer.rb
repo_analyzer-1.0.0 lib/repo_analyzer.rb