jekyll-scholar 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -131,7 +131,7 @@ The example above would print a bibliography of all entires published in
131
131
  the year 2013. Of course you can also combine the file and filter parameters
132
132
  like this:
133
133
 
134
- {% bibliography secondary filter: @*[year=2013] %}
134
+ {% bibliography secondary filter: @*[year=2013] %}
135
135
 
136
136
  This would print the publications from 2013 of the bibliography at
137
137
  `_bibliography/secondary.bib`.
@@ -279,9 +279,11 @@ configuration option. For example:
279
279
  query: "@article[year>=2003]" #=> includes only articles published 2003 or later
280
280
  query: "@*[url]" #=> includes all entries with a url field
281
281
  query: "@*[status!=review]" #=> includes all entries whose status field is not set to 'review'
282
-
282
+ query: "@book[year <= 1900 && author ^= Poe]" #=> Books published before 1900 where the author matches /Poe/
283
+
283
284
  Please note that some of these queries require bibtex-ruby 2.0.7 or
284
- later versions.
285
+ later versions. You can also overwrite the configuration's query parameter
286
+ in each bibliography tag individually as described above.
285
287
 
286
288
  Contributing
287
289
  ------------
@@ -89,3 +89,37 @@ Feature: BibTeX
89
89
  Then the _site directory should exist
90
90
  And the "_site/scholar.html" file should exist
91
91
  And I should see "<i>The Ruby Programming Language</i>" in "_site/scholar.html"
92
+
93
+ @tags @filter
94
+ Scenario: Filtered Bibliography Loaded From Default Directory
95
+ Given I have a scholar configuration with:
96
+ | key | value |
97
+ | source | ./_bibliography |
98
+ And I have a "_bibliography" directory
99
+ And I have a file "_bibliography/references.bib":
100
+ """
101
+ @book{ruby,
102
+ title = {The Ruby Programming Language},
103
+ author = {Flanagan, David and Matsumoto, Yukihiro},
104
+ year = {2008},
105
+ publisher = {O'Reilly Media}
106
+ },
107
+ @book{smalltalk,
108
+ title = {Smalltalk Best Practice Patterns},
109
+ author = {Kent Beck},
110
+ year = {1996},
111
+ publisher = {Prentice Hall}
112
+ }
113
+
114
+ """
115
+ And I have a page "scholar.html":
116
+ """
117
+ ---
118
+ ---
119
+ {% bibliography references filter: @book[year <= 2000] %}
120
+ """
121
+ When I run jekyll
122
+ Then the _site directory should exist
123
+ And the "_site/scholar.html" file should exist
124
+ And I should not see "<i>The Ruby Programming Language</i>" in "_site/scholar.html"
125
+ And I should see "<i>Smalltalk Best Practice Patterns</i>" in "_site/scholar.html"
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
 
27
27
  s.add_runtime_dependency('jekyll', '~> 0.10')
28
28
  s.add_runtime_dependency('citeproc-ruby', '~> 0.0.6')
29
- s.add_runtime_dependency('bibtex-ruby', '~> 2.0.7')
29
+ s.add_runtime_dependency('bibtex-ruby', '~> 2.2')
30
30
 
31
31
  s.add_development_dependency('rake', "~> 0.9")
32
32
  s.add_development_dependency('rdoc', "~> 3.11")
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  class Scholar
3
- VERSION = '0.3.0'.freeze
3
+ VERSION = '0.3.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-scholar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-07 00:00:00.000000000 Z
12
+ date: 2013-02-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 2.0.7
53
+ version: '2.2'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 2.0.7
61
+ version: '2.2'
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: rake
64
64
  requirement: !ruby/object:Gem::Requirement