kyrylo / pry-theme

An easy way to customize Pry colors via theme files
zlib License
171 stars 14 forks source link

Define `windows?` method #61

Closed gouf closed 4 years ago

gouf commented 4 years ago

Summary

Adds windows? method.

Details

On my MacOS; I got an error when I type pry-theme install ocean in pry session.

[1] pry(main)> pry-theme install ocean
Installing "ocean" from Pry Theme Collection...
NoMethodError: undefined method `windows?' for #<PryTheme::Command::PryTheme:0x00007fc334a04188>
from /Users/my_user_name/.anyenv/envs/rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pry-theme-1.3.0/lib/pry-theme/commands.rb:230:in `json_body'

I find windows? method in lib/pry-theme/commands.rb. but could not found in anywhere.

test?

I couldn't write rspec test. I couldn't understand the code base to writing test. sorry...

Link

kyrylo commented 4 years ago

Thanks!

kyrylo commented 4 years ago

@gouf actually, I was a little hasty. We should use Pry::Helpers::Platform.windows? instead. Could you submit a new PR? After that I'll cut a new release.

gouf commented 4 years ago

@kyrylo OK, I will try.