Closed banister closed 6 years ago
@kyrylo any feedback or shall i just merge?
When I run tests locally, I get the following error:
Failures:
1) PryDoc Pry::CInternals::CodeFetcher no tags file exists attempts to install and setup ruby
Failure/Error: expect(described_class.ruby_source_installer).to receive(:install)
(#<Pry::CInternals::RubySourceInstaller:0x00007fabe5156a38 @ruby_version="2_4_2", @ruby_source_folder="/Users/kyrylo/.pry.d/ruby-2_4_2", @curl_cmd="curl --fail -L https://github.com/ruby/ruby/archive/v2_4_2.tar.gz | tar xzvf - 2> /dev/null", @etag_binary="etags", @etag_cmd="find . -type f -name '*.[chy]' | etags - --no-members">).install(*(any args))
expected: 1 time with any arguments
received: 0 times with any arguments
# ./spec/pry-doc_spec.rb:27:in `block (4 levels) in <top (required)>'
Finished in 0.21216 seconds (files took 0.82188 seconds to load)
40 examples, 1 failure
Any ideas? I'm on MacOS.
@kyrylo it was due to data persisting between spec examples....i fixed it by reducing the amount of state i store on the class, by extracting out a new class SymbolMapBuilder
and then resetting symbol_map
to nil before each example
https://github.com/pry/pry-doc/pull/85/commits/22bc8da6ccf3f560ea6558ca250e390ba614b8ff
@kyrylo thanks....i tried to make CFile
easier to understand here https://github.com/pry/pry-doc/pull/85/commits/130fb72e2dbae4d261b01e59414f51a115ce1906
renamed SymbolMapBuilder
to ETagParser
which is exactly what it is, also opens up possibilities of supporting other tag formats (such as ctags) in the future by swapping in a different parser
Windows support. Requires
curl
and7zip
to be installed, butetags
is bundled with the gem.