jekyll-scholar 4.4.0 → 4.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f094338d53949be44b70b8e7f512861a5303130b
4
- data.tar.gz: 4d4c0bc29496e9600934daacafd2c26c414173cf
3
+ metadata.gz: 8597b65438a3297341bfac11de4628d852fd0d0f
4
+ data.tar.gz: d2f1afb31eee35fbb0939ce14d3e92737e71101c
5
5
  SHA512:
6
- metadata.gz: b72f42658fefc593629b596e1d37ad3409586a41e29add9e25ff0f6b4225073bb0a77fc59672e5675fa3828fced0e9ef2433b29f38517957e8d6739657b9b4da
7
- data.tar.gz: e9f2a7f85d9b3a99be571f3be8c83ad76c4177246256c2f3cbeb90b59e9fc45476da8a16b06785b7edeeffdc55ce3c291e804aed9b1151adc2db6fbff132f1ce
6
+ metadata.gz: 5b0aa3e70056caeab49438f7e19a8c1442c57aef54fe14254bb61ba717acc6078d9c1472fcbbcbfd4a7756f0f5a84330e3407f27712f055511a9ec117ebee388
7
+ data.tar.gz: fac2a9d45fda169a473be1da8e9cb44a4138676d89f28dcb71c535af994fcf3f1065b020cebc4d82f30459c96fcb1d1f1482fa3e78906bf8b75c6c4aaad3d5df
data/Gemfile CHANGED
@@ -12,7 +12,6 @@ group :development do
12
12
  gem 'rake'
13
13
  gem 'redgreen', '~> 1.2'
14
14
  gem 'shoulda', '~> 3.5'
15
- gem 'rr', '~> 1.1'
16
15
  gem 'cucumber', '1.3.11'
17
16
  gem 'redcarpet'
18
17
  gem 'launchy', '~> 2.3'
data/README.md CHANGED
@@ -18,6 +18,10 @@ Installation
18
18
 
19
19
  $ [sudo] gem install jekyll-scholar
20
20
 
21
+ Or add it to your `Gemfile`:
22
+
23
+ gem 'jekyll-scholar'
24
+
21
25
  Usage
22
26
  -----
23
27
 
@@ -70,3 +70,43 @@ Feature: Cited-only Bibliographies
70
70
  And I should not see "<i>The Ruby Programming Language</i>" in "_site/scholar.html"
71
71
  And I should not see "<i>Smalltalk Best Practice Patterns</i>" in "_site/scholar.html"
72
72
 
73
+ @wip
74
+ Scenario: Cited items with prefix
75
+ Given I have a scholar configuration with:
76
+ | key | value |
77
+ | source | ./_bibliography |
78
+ And I have a "_bibliography" directory
79
+ And I have a file "_bibliography/references.bib":
80
+ """
81
+ @book{ruby,
82
+ title = {The Ruby Programming Language},
83
+ author = {Flanagan, David and Matsumoto, Yukihiro},
84
+ year = {2008},
85
+ publisher = {O'Reilly Media}
86
+ },
87
+ @book{smalltalk,
88
+ title = {Smalltalk Best Practice Patterns},
89
+ author = {Kent Beck},
90
+ year = {1996},
91
+ publisher = {Prentice Hall}
92
+ }
93
+
94
+ """
95
+ And I have a page "scholar.html":
96
+ """
97
+ ---
98
+ ---
99
+ {% cite smalltalk %}
100
+ {% bibliography --cited --prefix one %}
101
+
102
+ {% cite ruby %}
103
+ {% bibliography --cited --prefix two %}
104
+ """
105
+ When I run jekyll
106
+ Then the _site directory should exist
107
+ And the "_site/scholar.html" file should exist
108
+ And I should see "one-smalltalk" in "_site/scholar.html"
109
+ And I should see "two-ruby" in "_site/scholar.html"
110
+ And I should not see "one-ruby" in "_site/scholar.html"
111
+ And I should not see "two-smalltalk" in "_site/scholar.html"
112
+
@@ -15,7 +15,6 @@ rescue LoadError
15
15
  # ignore
16
16
  end
17
17
 
18
- require 'rr'
19
18
  require 'test/unit'
20
19
 
21
20
  require 'jekyll/scholar'
@@ -27,6 +27,9 @@ module Jekyll
27
27
  cited_references.include? e.key
28
28
  end
29
29
  end
30
+
31
+ # See #90
32
+ cited_keys.clear
30
33
  end
31
34
 
32
35
  items = items.take(max.to_i) if limit_entries?
@@ -43,7 +46,7 @@ module Jekyll
43
46
  }.join("\n")
44
47
 
45
48
  content_tag config['bibliography_list_tag'], bibliography, :class => config['bibliography_class']
46
-
49
+
47
50
  end
48
51
  end
49
52
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  class Scholar
3
- VERSION = '4.4.0'.freeze
3
+ VERSION = '4.5.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-scholar
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.0
4
+ version: 4.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-23 00:00:00.000000000 Z
11
+ date: 2015-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll