Sha256: 230ee038825cf4192990e1f9ce2a435d70557cfe33eae90d08fa53a9604325a4
Contents?: true
Size: 377 Bytes
Versions: 2
Compression:
Stored size: 377 Bytes
Contents
module AwsRotate class List < Base def run puts "AWS Profiles:" puts profiles end def profiles lines = IO.readlines(@credentials_path) profiles = [] lines.each do |line| next if line =~ /^\s*#/ # ignore comments md = line.match(/\[(.*)\]/) profiles << md[1] if md end profiles end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aws-rotate-0.2.0 | lib/aws_rotate/list.rb |
aws-rotate-0.1.0 | lib/aws_rotate/list.rb |