-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add debug-info command line option. #118
Conversation
Allow user to get basic debug info, so the can paste it into and GitHub issue. Ruby(Version, engine, platform) MetricFu(Version, dependencies)
@@ -78,6 +79,16 @@ def process!(arguments = ARGV) | |||
@result | |||
end | |||
|
|||
def debug_info | |||
puts "Ruby" | |||
puts " Version: #{RUBY_VERSION}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. Some suggestions:
Use only methods on MetricFu::Environment (include Environment
)
If the method you need isn't there, add it. e.g. ruby_version ruby_platform ruby_engine. See redcard
RedCard.engine => 'ruby'
RedCard.engine_version => '1.9.3'
RbConfig::CONFIG['host_os'] => ''darwin'
RbConfig::CONFIG['host_cpu'] => 'x86_64'
RedCard::CONFIG['build'] => 'java1.6'
RbConfig::CONFIG['build'] => "x86_64-darwin12.4.0"
RbConfig::CONFIG['prefix'] => "/Users/bfleischer/.rvm/rubies/jruby-1.7.4"
RbConfig::CONFIG['prefix'] => "/Users/bfleischer/.rvm/rubies/ruby-1.9.3-p448"
$VERBOSE => [false, nil, true]
Gem::VERSION
# to consider
Encoding.default_external.to_s => 'UTF-8'
Encoding.default_internal.to_s => ''
RUBY_DESCRIPTION => '=> "jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit Server VM 1.6.0_51-b11-456-11M4508 [darwin-x86_64]"
RUBY_PATCHLEVEL => '392'
RUBY_VERSION => '1.9.3'
$LOADED_FEATURES
$LOAD_PATH
MetricFu version is fine, of course, as is.
I'm curious why you're collecting the immediate dependencies. That's what's effectively specified by the gemspec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to use all those variables, they're just what I thought of while commenting. I'm interested in what you think would be useful, as well.
Awesome, thanks! I added some comments |
Thanks for your PR's! Very much appreciated! |
Do you need help finishing this? There's been a lot of changes to master you'll have to rebase off of. |
I haven't had a chance to look this over too much, so I don't have any question at this time. I don't mind rebasing. I hope to have a look at it this weekend. |
Want to pair on this to finish it up? |
Hey @calveto can I help? |
In reference to #71
Allow user to get basic debug info, so they can paste it into a GitHub
issue. Ruby(Version, engine, platform) MetricFu(Version, dependencies)