jekyll-scholar 1.2.1 → 1.2.2

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: e169fc7d980dafa5ad612600118efd4203ebea20
4
- data.tar.gz: 2943347383b39ec0b9ba69da6b45d3922d7827a1
3
+ metadata.gz: fd97537f40b52ff26ec6564b5d22bea683991fb2
4
+ data.tar.gz: fdc05e3ae4767f19e44b89b730a1014abd5549de
5
5
  SHA512:
6
- metadata.gz: 260730d6739653ef5e47db756f2bed262976fbb220c76b927c379fc546f4503d424e3480e1287157b9cedb14773f0282f1dfaf9acdce578f8ebda5c161ff2cc0
7
- data.tar.gz: 64869e0857a2ee4ac5e1e545e5a6e900f154c1105cc909fa5dacf2220263e34c3ff3e52c9068561d3f6eb539e3ec336d5e3579eb1fbbf0bb76b3facc90ea4b80
6
+ metadata.gz: 625084ad4b2d9cac4dfb56322da7e8c4732398ed94d07099262d1779ed9a60ecdf9334785db8b771d8c3fe2c521bbcf2399532699f3be01a358a431476b56dcd
7
+ data.tar.gz: ecef959d91c3552a1d452f067f0b215c42dcece7024cfc7369e638fdd606f7586473efe4537a1b304fc3a0d97229282d515971653a33ddb62c4870dc9fa43c5b
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ group 'development' do
5
5
  gem 'rake'
6
6
  gem 'redgreen', '~> 1.2'
7
7
  gem 'shoulda', '~> 3.3.2'
8
- gem 'rr', '~> 1.0'
8
+ gem 'rr', '~> 1.0.5'
9
9
  gem 'cucumber', '~> 1.2.1'
10
10
  gem 'RedCloth', '~> 4.2'
11
11
  gem 'rdiscount', '~> 1.6'
@@ -185,3 +185,29 @@ Feature: BibTeX
185
185
  And the "_site/scholar.html" file should exist
186
186
  And I should not see "ruby" in "_site/scholar.html"
187
187
  And I should see "id=\"a-smalltalk\"" in "_site/scholar.html"
188
+
189
+ @tags @bibliography @style
190
+ Scenario: Simple Bibliography Loaded From Default Directory
191
+ Given I have a scholar configuration with:
192
+ | key | value |
193
+ | source | ./_bibliography |
194
+ And I have a "_bibliography" directory
195
+ And I have a file "_bibliography/references.bib":
196
+ """
197
+ @book{ruby,
198
+ title = {The Ruby Programming Language},
199
+ author = {Flanagan, David and Matsumoto, Yukihiro},
200
+ year = {2008},
201
+ publisher = {O'Reilly Media}
202
+ }
203
+ """
204
+ And I have a page "scholar.html":
205
+ """
206
+ ---
207
+ ---
208
+ {% bibliography --style mla %}
209
+ """
210
+ When I run jekyll
211
+ Then the _site directory should exist
212
+ And the "_site/scholar.html" file should exist
213
+ And I should see "<i>The Ruby Programming Language</i>. O’Reilly Media, 2008" in "_site/scholar.html"
@@ -32,9 +32,13 @@ module Jekyll
32
32
  opts.on('-t', '--text TEXT') do |text|
33
33
  @text = text
34
34
  end
35
+
36
+ opts.on('-s', '--style STYLE') do |style|
37
+ @style = style
38
+ end
35
39
  end
36
40
 
37
- argv = arguments.split(/(\B-[cfqpt]|\B--(?:cited|file|query|prefix|text))/)
41
+ argv = arguments.split(/(\B-[cfqpts]|\B--(?:cited|file|query|prefix|text|style|))/)
38
42
 
39
43
  parser.parse argv.map(&:strip).reject(&:empty?)
40
44
  end
@@ -88,12 +92,16 @@ module Jekyll
88
92
 
89
93
  entry = entry.convert(*bibtex_filters) unless bibtex_filters.empty?
90
94
  reference = CiteProc.process entry.to_citeproc,
91
- :style => config['style'], :locale => config['locale'], :format => 'html'
95
+ :style => style, :locale => config['locale'], :format => 'html'
92
96
 
93
97
  content_tag reference_tagname, reference,
94
98
  :id => [prefix, entry.key].compact.join('-')
95
99
  end
96
100
 
101
+ def style
102
+ @style || config['style']
103
+ end
104
+
97
105
  def missing_reference
98
106
  config['missing_reference']
99
107
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  class Scholar
3
- VERSION = '1.2.1'.freeze
3
+ VERSION = '1.2.2'.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: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-19 00:00:00.000000000 Z
11
+ date: 2013-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll