-
Notifications
You must be signed in to change notification settings - Fork 90
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
Refactor OS detection. #561
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello zenspider! Thanks for the pull request! Here is what will happen next:
Thank you for contributing! |
zenspider
force-pushed
the
zenspider/refactor/os
branch
4 times, most recently
from
January 23, 2020 02:44
6969bf2
to
97262b9
Compare
clintoncwolfe
approved these changes
Jan 24, 2020
zenspider
force-pushed
the
zenspider/refactor/os
branch
from
January 27, 2020 23:23
ab84e93
to
9ff9956
Compare
The first step is to just break it up into smaller chunks based on OS family. master: 758.00: flay total 843.4: flog total 843.4: flog/method average now: 758.00: flay total 966.8: flog total 138.1: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
646.00: flay total 939.4: flog total 134.2: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
625.00: flay total 904.2: flog total 129.2: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
533.00: flay total 882.5: flog total 126.1: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
533.00: flay total 920.6: flog total 70.8: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
591.00: flay total 888.9: flog total 68.4: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
357.00: flay total 822.6: flog total 68.6: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
392.00: flay total 797.6: flog total 66.5: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
Why do we keep checking for nil and doing some third case when we're NOT using trinary logic? Also this method really should NOT be both a getter and setter. 392.00: flay total 797.6: flog total 66.5: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
Also got rid of `== true` checks on scanner. We don't care that it is true, we want truthy. 346.00: flay total 788.5: flog total 60.7: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
274.00: flay total 766.0: flog total 58.9: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
228.00: flay total 754.0: flog total 53.9: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
190.00: flay total 743.7: flog total 49.6: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
154.00: flay total 738.1: flog total 46.1: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
…redhat. 154.00: flay total 719.6: flog total 45.0: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
Mostly using local vars and regexps more cleanly. 154.00: flay total 712.9: flog total 44.6: flog/method average Signed-off-by: Ryan Davis <zenspider@chef.io>
Removed needless comments on already self-documenting blocks. Refactored brocade_version. Extracted redhatish version Extracted local_windows? Logical rewrites of overly complex logic. Lots of `unless x.nil` -> `if !x.nil?` -> `if x`. Switched a number of unused unix_file_contents to unix_file_exist? calls. 38.00: flay total 616.3: flog total 38.5: flog/method average Via walk-through with @miah. Signed-off-by: Ryan Davis <zenspider@chef.io>
Signed-off-by: Ryan Davis <zenspider@chef.io>
Use unix_uname_* and `sw_vers -buildVersion` for our data. Signed-off-by: Ryan Davis <zenspider@chef.io>
Removed all "clevar" method chains like: plat.name("raspbian").title("Raspbian Linux").in_family("debian").detect do ... in favor of a simpler descriptive call: declare_instance("raspbian", "Raspbian Linux", "debian") do ... Also added `declare_category` and `declare_family` to make things a little more clear what they're for. Renamed all `register_*` methods to `declare_*` methods. Removed almost all rubocop magic comments. The diff on this is nasty because of whitespace changes. Turn off whitespace in github UI take make things easier. It's still gross, but still. Signed-off-by: Ryan Davis <zenspider@chef.io>
+ Separate out lint to its own stage. + Switch off of -stretch. + Switch 2.7 to final. + Default rake task is now just test. Signed-off-by: Ryan Davis <zenspider@chef.io>
zenspider
force-pushed
the
zenspider/refactor/os
branch
from
January 28, 2020 00:04
9ff9956
to
5cf121b
Compare
Code Climate has analyzed commit 5cf121b and detected 252 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
miah
approved these changes
Jan 28, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
master:
final:
Signed-off-by: Ryan Davis zenspider@chef.io