GithubHelp home page GithubHelp logo

hike's Issues

Broken link

The following file:
test/fixtures/app/views/.#application.js.coffee.erb

Is pointing at:
[email protected]

Which doesn't exists, it also seems to be a swp file (.application.js.coffee.erb.swp vi?) and ~ (index.html.erb~).

q

q

Ignore ~ files

Ignore vim swap files ~. Can you think of others? We already ignore . files.

unexpected return (LocalJumpError)

a example from http://rubydoc.info/gems/hike/1.2.0/Hike/Trail:find

    trail.find("application") do |path|
      return path if mime_type_for(path) == "text/css"
    end

it raises

/home/guten/a/a.rb:8:in `block in <main>': unexpected return (LocalJumpError)
    from /usr/lib/ruby/gems/1.9.1/gems/hike-1.2.0/lib/hike/index.rb:142:in `block in match'
    from /usr/lib/ruby/gems/1.9.1/gems/hike-1.2.0/lib/hike/index.rb:134:in `each'
    from /usr/lib/ruby/gems/1.9.1/gems/hike-1.2.0/lib/hike/index.rb:134:in `match'
    from /usr/lib/ruby/gems/1.9.1/gems/hike-1.2.0/lib/hike/index.rb:113:in `block in find_in_paths'
    from /usr/lib/ruby/gems/1.9.1/gems/hike-1.2.0/lib/hike/index.rb:112:in `each'
    from /usr/lib/ruby/gems/1.9.1/gems/hike-1.2.0/lib/hike/index.rb:112:in `find_in_paths'
    from /usr/lib/ruby/gems/1.9.1/gems/hike-1.2.0/lib/hike/index.rb:63:in `block in find'
    from /usr/lib/ruby/gems/1.9.1/gems/hike-1.2.0/lib/hike/index.rb:57:in `each'
    from /usr/lib/ruby/gems/1.9.1/gems/hike-1.2.0/lib/hike/index.rb:57:in `find'
    from /usr/lib/ruby/gems/1.9.1/gems/hike-1.2.0/lib/hike/trail.rb:139:in `find'
    from /home/guten/a/a.rb:7:in `<main>'

about empty extension

trail = Hike::Trail.new
trail.extensions.push ".rb"
trail.paths.push "/tmp"
trail.find "foo"

for below files

/tmp/foo.rb
/tmp/foo

it finds "/tmp/foo". bug?

for another scene.

I want to find "/tmp/foo.rb", but we only have a "foo" file in "/tmp" directory, then it goes wrong.

I suggest like this

trail = Hike::Trail.new
trail.extensions.push ".rb", ""  # first find "foo.rb", then "foo"
trail.paths.push "/tmp"

let Trail#find supports to find absolute path

for example

hike = Hike::Trail.new
hike.extensions.push ".rb"
hike.paths.replace $:   # add $APP/lib/ into paths
hike.find("/etc/foo", "foo/rc", "~/.foorc") { |path|
    # do some thing here.
}

it will find /etc/foo, $APP/lib/foo/rc.rb, ~/.foorc files

Regression

This test is now failing in brochure

BrochureTest#test_index_templates_are_rendered_for_directories

The regression started in 0.5.x

Test suite fails

Hello, test suite fails on my computer (Fedora rawhide) with following errors:

$testrb test/
Loaded suite test
Started
...F...................................F.........................
Finished in 0.092777 seconds.
  1) Failure:
test_entries(IndexTest) [./test/test_trail.rb:190]:
<[#<Pathname:application.js.coffee.erb>,
 #<Pathname:application.js.coffee.str>,
 #<Pathname:index.html.erb>,
 #<Pathname:layouts>,
 #<Pathname:projects>,
 #<Pathname:projects.erb>,
 #<Pathname:recordings>]> expected but was
<[#<Pathname:application.js.coffee.erb>,
 #<Pathname:application.js.coffee.str>,
 #<Pathname:index.html.erb>,
 #<Pathname:layouts>,
 #<Pathname:projects.erb>,
 #<Pathname:projects>,
 #<Pathname:recordings>]>.
  2) Failure:
test_entries(TrailTest) [./test/test_trail.rb:190]:
<[#<Pathname:application.js.coffee.erb>,
 #<Pathname:application.js.coffee.str>,
 #<Pathname:index.html.erb>,
 #<Pathname:layouts>,
 #<Pathname:projects>,
 #<Pathname:projects.erb>,
 #<Pathname:recordings>]> expected but was
<[#<Pathname:application.js.coffee.erb>,
 #<Pathname:application.js.coffee.str>,
 #<Pathname:index.html.erb>,
 #<Pathname:layouts>,
 #<Pathname:projects.erb>,
 #<Pathname:projects>,
 #<Pathname:recordings>]>.
65 tests, 87 assertions, 2 failures, 0 errors

Notice the swapped 'projects.erb' and 'projects' pathnames It seems that somewhere should be applied some sorting to keep the results consistent.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.