diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c4cf1ead..f85d479b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,6 +12,8 @@ jobs: include: - ruby-version: 'truffleruby' failure-allowed: true + - ruby-version: '3.3.0-preview3' + failure-allowed: true steps: - uses: actions/checkout@v4 - name: Set up Ruby diff --git a/app/lib/paper_file.rb b/app/lib/paper_file.rb index b711ee55..e45a4119 100644 --- a/app/lib/paper_file.rb +++ b/app/lib/paper_file.rb @@ -64,7 +64,7 @@ def self.find(search_path) if Dir.exist? search_path Find.find(search_path).each do |path| - if path =~ /paper\.tex$|paper\.md$/ + if path =~ /\/paper\.tex$|\/paper\.md$/ paper_path = path break end diff --git a/spec/paper_file_spec.rb b/spec/paper_file_spec.rb index 5aaf23eb..4727b968 100644 --- a/spec/paper_file_spec.rb +++ b/spec/paper_file_spec.rb @@ -144,7 +144,7 @@ it "should return a nil PaperFile if no paper file found" do expect(Dir).to receive(:exist?).with("/repo/path/").and_return(true) - allow(Find).to receive(:find).with("/repo/path/").and_return(["lib/papers.pdf", "./docs", "app"]) + allow(Find).to receive(:find).with("/repo/path/").and_return(["lib/papers.pdf", "lib/other_paper.md", "./docs", "app"]) paper_file = PaperFile.find("/repo/path/")