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

Speed up windows package lookup #970

Merged
merged 4 commits into from
Aug 24, 2016
Merged

Speed up windows package lookup #970

merged 4 commits into from
Aug 24, 2016

Conversation

ksubrama
Copy link

No description provided.

@ksubrama
Copy link
Author

This is supposed to fix #86 but I can't figure out what the unit tests are doing and what and _() function is.... I'll look into this tomorrow.

@@ -53,8 +53,11 @@

# windows
it 'verify windows package parsing' do
STDERR.puts "FUCK EVERYTHING!"
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably don't want to commit this :D

Copy link
Contributor

Choose a reason for hiding this comment

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

@ksubrama Its not acceptable to place offensive language in a PR.

@chris-rock chris-rock changed the title WIP: Speed up windows package lookup - maybe Speed up windows package lookup Aug 24, 2016
@chris-rock
Copy link
Contributor

@ksubrama thanks for the new implementation. I added unit and integration tests for that implementation

packages.each { |pkg|
package_name = pkg.strip
# get wmi package information
cmd = powershell("Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq '#{package_name}'} | Select-Object -Property Name,Version,Vendor,PackageCode,Caption,Description | ConvertTo-Json")
Copy link
Contributor

@stevendanna stevendanna Aug 24, 2016

Choose a reason for hiding this comment

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

👍 I like that we are using the old command here to ensure we match the same output we would have gotten with the old code.

@stevendanna
Copy link
Contributor

👍 This looks reasonable to me.

@chris-rock
Copy link
Contributor

fixes #86

@chris-rock chris-rock merged commit 8825b71 into master Aug 24, 2016
@chris-rock chris-rock deleted the ksubrama/package branch August 24, 2016 12:57
@chris-rock chris-rock modified the milestone: 0.32.0 Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants