Sha256: f41b3ddf83a073626cdcdd04fc7a5521387d17f02c698faf900f68d4dcf4cc97

Contents?: true

Size: 449 Bytes

Versions: 10

Compression:

Stored size: 449 Bytes

Contents

require 'yaml'

module GitHelper
  class GitConfigReader
    def gitlab_token
      config_file[:gitlab_token]
    end

    def github_token
      config_file[:github_token]
    end

    private def config_file
      YAML.load_file(git_config_file_path)
    end

    private def git_config_file_path
      Dir.pwd.scan(/\A\/[\w]*\/[\w]*\//).first << git_config_file
    end

    private def git_config_file
      '.git_config.yml'
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
git_helper-2.0.2 lib/git_helper/git_config_reader.rb
git_helper-2.0.1 lib/git_helper/git_config_reader.rb
git_helper-2.0.0 lib/git_helper/git_config_reader.rb
git_helper-1.3.1 lib/git_helper/git_config_reader.rb
git_helper-1.3.0 lib/git_helper/git_config_reader.rb
git_helper-1.2.0 lib/git_helper/git_config_reader.rb
git_helper-1.1.1 lib/git_helper/git_config_reader.rb
git_helper-1.1.0 lib/git_helper/git_config_reader.rb
git_helper-1.0.1 lib/git_helper/git_config_reader.rb
git_helper-1.0.0 lib/git_helper/git_config_reader.rb