Skip to content

Commit

Permalink
6.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
inukshuk committed Sep 2, 2019
1 parent e6096e7 commit 5af787d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 70 deletions.
43 changes: 0 additions & 43 deletions features/bibtex.feature
Expand Up @@ -557,46 +557,3 @@ Feature: BibTeX
And the "_site/scholar.html" file should exist
And I should see "Estudios de Asia y Africa</i>, n.º 22" in "_site/scholar.html"
And I should see "Estudios De Asia y Africa</i>, no. 22" in "_site/scholar.html"


@tags @bibliography @duplicates
Scenario: Non-english reference
Given I have a scholar configuration with:
| key | value |
| source | ./_bibliography |
| bibliography | my_references |
| allow_locale_overrides | true |
| style | chicago-fullnote-bibliography |
And I have a "_bibliography" directory
And I have a file "_bibliography/my_references.bib":
"""
@article{one,
title = {Ideología y narrativa en el Ramayana de Valmiki},
number = {22},
language = {es},
journal = {Estudios de Asia y Africa},
author = {Pollock, Sheldon I.},
year = {1987},
pages = {336--54}
}
@article{one,
title = {{Ideología y narrativa en el Ramayana de Valmiki}},
number = {22},
journal = {Estudios de Asia y Africa},
author = {Pollock, Sheldon I.},
year = {1987},
pages = {336--54}
}
"""
And I have a page "scholar.html":
"""
---
---
{% bibliography %}
"""
When I run jekyll
Then the _site directory should exist
And the "_site/scholar.html" file should exist
And I should see "Estudios de Asia y Africa</i>, n.º 22" in "_site/scholar.html"
And I should see "Estudios De Asia y Africa</i>, no. 22" in "_site/scholar.html"

45 changes: 19 additions & 26 deletions features/removeduplicate.feature
Expand Up @@ -4,11 +4,10 @@ Feature: BibTeX
In order to share my awesome references with my peers

@tags @bibliography
Scenario: Duplicates should be removed
Scenario: Duplicates should not be removed by default
Given I have a scholar configuration with:
| key | value |
| source | ./_bibliography |
| remove_duplicates | true |
| bibliography_list_tag | ol |
And I have a "_bibliography" directory
And I have a file "_bibliography/references.bib":
Expand Down Expand Up @@ -38,30 +37,28 @@ Feature: BibTeX
"""
---
---
{% bibliography -f references --remove_duplicates %}
{% bibliography_count -f references --remove_duplicates %}nd I should see "<i>The Ruby Programming Language</i>" in "_site/scholar.html"
{% bibliography_count -f references %}
"""
When I run jekyll
Then the _site directory should exist
And the "_site/scholar.html" file should exist
And I should see "<i>Smalltalk Best Practice Patterns</i>" in "_site/scholar.html"
And I should see "1" in "_site/scholar.html"
And I should see "3" in "_site/scholar.html"

@tags @bibliography
Scenario: Duplicates should be removed with 2 matching fields
Scenario: Duplicates should be removed
Given I have a scholar configuration with:
| key | value |
| source | ./_bibliography |
| remove_duplicates | true |
| bibliography_list_tag | ol |
| key | value |
| source | ./_bibliography |
| remove_duplicates | true |
| bibliography_list_tag | ol |
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 = {1996},
year = {2008},
publisher = {O'Reilly Media}
}
Expand All @@ -83,23 +80,21 @@ Feature: BibTeX
"""
---
---
{% bibliography -f references -r year %}
{% bibliography_count -f references -r year %}
{% bibliography_count -f references --remove_duplicates %}
"""
When I run jekyll
Then the _site directory should exist
And the "_site/scholar.html" file should exist
And I should see "<i>The Ruby Programming Language</i>" in "_site/scholar.html"
And I should see "1" in "_site/scholar.html"

And I should see "2" in "_site/scholar.html"

@tags @bibliography
Scenario: Duplicates should be removed with 2 matching fields
Scenario: Remove duplicates by year
Given I have a scholar configuration with:
| key | value |
| source | ./_bibliography |
| remove_duplicates | true |
| bibliography_list_tag | ol |
| key | value |
| source | ./_bibliography |
| remove_duplicates | true |
| bibliography_list_tag | ol |
And I have a "_bibliography" directory
And I have a file "_bibliography/references.bib":
"""
Expand Down Expand Up @@ -128,11 +123,9 @@ Feature: BibTeX
"""
---
---
{% bibliography_count -f references --remove_duplicates year, title %}
{% bibliography_count -f references -r year %}
"""
When I run jekyll
Then the _site directory should exist
And the "_site/scholar.html" file should exist
And I should see "3" in "_site/scholar.html"


And I should see "2" in "_site/scholar.html"
2 changes: 1 addition & 1 deletion lib/jekyll/scholar/version.rb
@@ -1,5 +1,5 @@
module Jekyll
class Scholar
VERSION = '6.1.0'.freeze
VERSION = '6.2.0'.freeze
end
end

0 comments on commit 5af787d

Please sign in to comment.