From ef4b179ed32dfb027cd811e801c757e538c537bd Mon Sep 17 00:00:00 2001 From: Sylvester Keil Date: Sat, 9 Feb 2013 10:22:24 +0100 Subject: [PATCH] update bibtex dependency and add query test --- features/bibtex.feature | 34 ++++++++++++++++++++++++++++++++++ jekyll-scholar.gemspec | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/features/bibtex.feature b/features/bibtex.feature index 73c6c0c..103a09b 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 5243337..2ab6147 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") -- GitLab