diff --git a/features/bibtex.feature b/features/bibtex.feature index 73c6c0c51a3ad0f92e1ce2cc658009111ec3e1a8..103a09bf61fea764af6d9a357e855583c65150cf 100644 --- a/features/bibtex.feature +++ b/features/bibtex.feature @@ -89,3 +89,37 @@ Feature: BibTeX Then the _site directory should exist And the "_site/scholar.html" file should exist And I should see "The Ruby Programming Language" in "_site/scholar.html" + + @tags @filter + Scenario: Filtered Bibliography Loaded From Default Directory + Given I have a scholar configuration with: + | key | value | + | source | ./_bibliography | + And I have a "_bibliography" directory + And I have a file "_bibliography/references.bib": + """ + @book{ruby, + title = {The Ruby Programming Language}, + author = {Flanagan, David and Matsumoto, Yukihiro}, + year = {2008}, + publisher = {O'Reilly Media} + }, + @book{smalltalk, + title = {Smalltalk Best Practice Patterns}, + author = {Kent Beck}, + year = {1996}, + publisher = {Prentice Hall} + } + + """ + And I have a page "scholar.html": + """ + --- + --- + {% bibliography references filter: @book[year <= 2000] %} + """ + When I run jekyll + Then the _site directory should exist + And the "_site/scholar.html" file should exist + And I should not see "The Ruby Programming Language" in "_site/scholar.html" + And I should see "Smalltalk Best Practice Patterns" in "_site/scholar.html" diff --git a/jekyll-scholar.gemspec b/jekyll-scholar.gemspec index 5243337ebc26f6729663de3b05d8b6bfc8ce833b..2ab6147fb74d97ab452f1625982a91099ee174a4 100644 --- a/jekyll-scholar.gemspec +++ b/jekyll-scholar.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency('jekyll', '~> 0.10') s.add_runtime_dependency('citeproc-ruby', '~> 0.0.6') - s.add_runtime_dependency('bibtex-ruby', '~> 2.0.7') + s.add_runtime_dependency('bibtex-ruby', '~> 2.2') s.add_development_dependency('rake', "~> 0.9") s.add_development_dependency('rdoc', "~> 3.11")