Sha256: 78974fdf05999a42dc1254d9714bb9357add61a1bb4821757b735cfe7855eb48

Contents?: true

Size: 819 Bytes

Versions: 3

Compression:

Stored size: 819 Bytes

Contents

require "chandler/changelog"
require "chandler/git"
require "chandler/github"
require "chandler/logger"

module Chandler
  class Configuration
    attr_accessor :changelog_path, :git_path, :github_repository, :dry_run
    attr_accessor :logger

    def initialize
      @changelog_path = "CHANGELOG.md"
      @git_path = ".git"
      @logger = Chandler::Logger.new
      @dry_run = false
    end

    def dry_run?
      dry_run
    end

    def git
      @git ||= Chandler::Git.new(:path => git_path)
    end

    def github
      @github ||=
        Chandler::GitHub.new(:repository => github_repository, :config => self)
    end

    def changelog
      @changelog ||= Chandler::Changelog.new(:path => changelog_path)
    end

    def github_repository
      @github_repository || git.origin_remote
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
chandler-0.1.2 lib/chandler/configuration.rb
chandler-0.1.1 lib/chandler/configuration.rb
chandler-0.1.0 lib/chandler/configuration.rb