Class: Git2PdfBash
- Inherits:
-
Thor
- Object
- Thor
- Git2PdfBash
- Defined in:
- bin/git2pdf
Overview
require ‘password’
Instance Method Summary collapse
Instance Method Details
#gen(repositories = "") ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'bin/git2pdf', line 13 def gen(repositories="") repos = repositories.split(',').collect { |r| r.strip } if repos.empty? repos = [:repos].split(',').collect { |r| r.strip } unless [:repos] == "repos" end puts "Creating a PDF of GitHub issues for repos: #{repos.join(', ')}" puts "Using organisation #{options[:organisation]}" if [:organisation] pass = [:password] if [:password] == "password" or [:password].nil? or [:password].strip.length == 0 #option[:password] = Password.get("GitHub Password:") puts "Password: " pass = STDIN.noecho(&:gets) pass = pass.strip.gsub(/\n/,'') end g = Git2Pdf.new repos: repos, basic_auth: [[:user],pass], org: [:organisation], user: [:user] done = g.execute puts "\n#{done} cards output to issues.pdf" end |