Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PDK-725) Add timestamp to PDK Convert Report #376

Merged
merged 1 commit into from
Dec 5, 2017

Conversation

bmjen
Copy link
Contributor

@bmjen bmjen commented Dec 5, 2017

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 93.094% when pulling eab86b2 on bmjen:pdk-725 into 11632e2 on puppetlabs:master.

@@ -95,6 +95,7 @@ def self.print_summary(update_manager)

def self.fullreport(update_manager)
File.open('convert_report.txt', 'w')
File.open('convert_report.txt', 'a') { |f| f.write("/* Convert Report generated by PDK at #{Time.now.getutc} */") }
update_manager.changes[:modified].each do |_, diff|
File.open('convert_report.txt', 'a') { |f| f.write("\n\n\n" + diff) }
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this needs to open and close file handles so much?

File.open('convert_report.txt', 'w') do |f|
  f.write("/* Convert Report generated by PDK at #{Time.now.getutc} */")
  
  update_manager.changes[:modified].each do |_, diff|
    f.write("\n\n\n" + diff)
  end
end

@@ -95,6 +95,7 @@ def self.print_summary(update_manager)

def self.fullreport(update_manager)
File.open('convert_report.txt', 'w')
File.open('convert_report.txt', 'a') { |f| f.write("/* Convert Report generated by PDK at #{Time.now.getutc} */") }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is UTC preferable to local time in this case?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 93.094% when pulling 731fe36 on bmjen:pdk-725 into 11632e2 on puppetlabs:master.

@bmjen bmjen merged commit 61a4e80 into puppetlabs:master Dec 5, 2017
@bmjen bmjen deleted the pdk-725 branch December 5, 2017 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants