jekyll-scholar 4.3.4 → 4.3.5

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: ed1a11f65813951bede086834da9f52b89475bc5
4
- data.tar.gz: 95e7e2f9bdbc20ea861a0302dcac0ed46ffb4b24
3
+ metadata.gz: 34c5171c1e0eca9aa016d7de2dd713474e658728
4
+ data.tar.gz: 2053b236c54703482fc2be31de7af7511a7fa35e
5
5
  SHA512:
6
- metadata.gz: 3d21055d929aad10db77b83c99e4d50ce00e9b9e442631fc24c3a6b18b7ff81ad6668cee0a3d3180cb598ae86cc60fee0bab4579ee4ecaf29b44794f64273a42
7
- data.tar.gz: 77d80e8abd5d69baf5c6df9f8e98c85bf59563204dec719093573f853762e6a19dc8371f0fc0777e0c1207b4e2b9213a20d09b39e55cc90ec0efc0fb4faca7ec
6
+ metadata.gz: b5c069abd4f51a11cded938a2dfc6ae6e5bef1ce6a8eca9a05f46b8a1f7eecbc5120db2787fa00c178be40d917b3978a4c186df15e723fba803489b9b00d878d
7
+ data.tar.gz: 34191415d8d961b95bc768f56ccde8321043c88aeafaf6f541013a0da5779e709be62db68fa0dcc0dfdfaab73860a5a7bbabf188751d009c975f0b1e5d977aeb
@@ -63,7 +63,7 @@ Feature: BibTeX
63
63
  And the "_site/references.html" file should exist
64
64
  And I should see "Look, an umlaut: ü!" in "_site/references.html"
65
65
 
66
- @tags @bibtex @wip
66
+ @tags @bibtex
67
67
  Scenario: Embedded BibTeX
68
68
  Given I have a scholar configuration with:
69
69
  | key | value |
@@ -139,4 +139,48 @@ Feature: Details
139
139
  When I run jekyll
140
140
  Then the _site directory should exist
141
141
  And the "_site/scholar.html" file should exist
142
+ And the "_site/bibliography/ruby.html" file should exist
142
143
  And I should see "<a[^>]+href=\"/bibliography/ruby.html\">" in "_site/scholar.html"
144
+
145
+ @tags @details
146
+ Scenario: Links to Detail Pages Work With Pretty URLs
147
+ Given I have a configuration file with "permalink" set to "pretty"
148
+ And I have a scholar configuration with:
149
+ | key | value |
150
+ | source | ./_bibliography |
151
+ | bibliogaphy | references |
152
+ | details_layout | details.html |
153
+ And I have a "_bibliography" directory
154
+ And I have a file "_bibliography/references.bib":
155
+ """
156
+ @book{ruby,
157
+ title = {The Ruby Programming Language},
158
+ author = {Flanagan, David and Matsumoto, Yukihiro},
159
+ year = {2008},
160
+ publisher = {O'Reilly Media}
161
+ }
162
+ """
163
+ And I have a "_layouts" directory
164
+ And I have a file "_layouts/details.html":
165
+ """
166
+ ---
167
+ ---
168
+ <html>
169
+ <head></head>
170
+ <body>
171
+ {{ page.entry.title }}
172
+ </body>
173
+ </html>
174
+ """
175
+ And I have a page "scholar.html":
176
+ """
177
+ ---
178
+ ---
179
+ {% bibliography %}
180
+ """
181
+ When I run jekyll
182
+ Then the _site directory should exist
183
+ And I should see "pretty" in "_config.yml"
184
+ And the "_site/scholar/index.html" file should exist
185
+ And I should see "<a[^>]+href=\"/bibliography/ruby/index.html\">" in "_site/scholar/index.html"
186
+ And the "_site/bibliography/ruby/index.html" file should exist
@@ -20,14 +20,14 @@ Given(/^I have an? "(.*)" file that contains "(.*)"$/) do |file, text|
20
20
  end
21
21
 
22
22
  Given(/^I have a configuration file with "(.*)" set to "(.*)"$/) do |key, value|
23
- File.open('_config.yml', 'w') do |f|
23
+ File.open('_config.yml', 'a') do |f|
24
24
  f.write("#{key}: #{value}\n")
25
25
  f.close
26
26
  end
27
27
  end
28
28
 
29
29
  Given(/^I have a configuration file with:$/) do |table|
30
- File.open('_config.yml', 'w') do |f|
30
+ File.open('_config.yml', 'a') do |f|
31
31
  table.hashes.each do |row|
32
32
  f.write("#{row["key"]}: #{row["value"]}\n")
33
33
  end
@@ -9,17 +9,8 @@ Given(/^I have a (?:page|file) "([^"]*)":$/) do |file, string|
9
9
  end
10
10
  end
11
11
 
12
- Given(/^I have a configuration file with "([^\"]*)" set to:$/) do |key, table|
13
- File.open('_config.yml', 'w') do |f|
14
- f.write("#{key}:\n")
15
- table.hashes.each do |row|
16
- f.write(" #{row["key"]}: #{row["value"]}\n")
17
- end
18
- end
19
- end
20
-
21
12
  Given(/^I have a scholar configuration with:$/) do |table|
22
- File.open('_config.yml', 'w') do |f|
13
+ File.open('_config.yml', 'a') do |f|
23
14
  f.write("scholar:\n")
24
15
  table.hashes.each do |row|
25
16
  f.write(" #{row["key"]}: #{row["value"]}\n")
@@ -9,7 +9,8 @@ module Jekyll
9
9
 
10
10
  @config = Scholar.defaults.merge(site.config['scholar'] || {})
11
11
 
12
- @name = details_file_for(entry)
12
+ @name = entry.key.to_s.gsub(/[:\s]+/, '_')
13
+ @name << '.html'
13
14
 
14
15
  process(@name)
15
16
  read_yaml(File.join(base, '_layouts'), config['details_layout'])
@@ -321,7 +321,7 @@ module Jekyll
321
321
  name.gsub!(/[:\s]+/, '_')
322
322
 
323
323
  if site.config['permalink'] == 'pretty'
324
- name << 'index/index.html'
324
+ name << '/index.html'
325
325
  else
326
326
  name << '.html'
327
327
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  class Scholar
3
- VERSION = '4.3.4'.freeze
3
+ VERSION = '4.3.5'.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.3.4
4
+ version: 4.3.5
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-02-24 00:00:00.000000000 Z
11
+ date: 2015-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll