Class: Neetob::CLI::Heroku::Certs
- Defined in:
- lib/neetob/cli/heroku/certs.rb
Constant Summary
Constants inherited from Base
Constants inherited from Base
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(app) ⇒ Certs
constructor
A new instance of Certs.
- #run ⇒ Object
Methods inherited from Base
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(app) ⇒ Certs
Returns a new instance of Certs.
11 12 13 14 |
# File 'lib/neetob/cli/heroku/certs.rb', line 11 def initialize(app) super() @app = app end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
9 10 11 |
# File 'lib/neetob/cli/heroku/certs.rb', line 9 def app @app end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/neetob/cli/heroku/certs.rb', line 16 def run certificates_list_heroku_output = `heroku certs -a #{app}` ui.success("Certificates of #{app}", print_to_audit_log: false) ui.info(certificates_list_heroku_output, print_to_audit_log: false) if Thread.current[:audit_mode] certificates_list_heroku_output.lines[2..].map do |line| match = line.match( /^\s*(\S+)\s+([^\d]+?)(?=\s+(\d{4}-\d{2}-\d{2} \d{2}:\d{2} UTC))/ ) next unless match { name: match[1], common_names: match[2], expires: match[3] } end end end |