citeproc-js 0.0.1.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/.rspec +2 -0
- data/Gemfile +8 -0
- data/LICENSE +619 -0
- data/README.md +32 -0
- data/auto.watchr +20 -0
- data/citeproc-js.gemspec +35 -0
- data/lib/citeproc/js.rb +10 -0
- data/lib/citeproc/js/engine.rb +145 -0
- data/lib/citeproc/js/support/citeproc.js +10233 -0
- data/lib/citeproc/js/support/system.js +26 -0
- data/lib/citeproc/js/support/xmldom.js +387 -0
- data/lib/citeproc/js/support/xmle4x.js +253 -0
- data/lib/citeproc/js/version.rb +5 -0
- data/spec/citeproc/js/engine_spec.rb +105 -0
- data/spec/fixtures/items/items.json +22 -0
- data/spec/fixtures/locales/locales-en-US.xml +304 -0
- data/spec/fixtures/styles/apa.csl +361 -0
- data/spec/spec_helper.rb +27 -0
- metadata +136 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'citeproc/js'
|
2
|
+
|
3
|
+
module Fixtures
|
4
|
+
|
5
|
+
ROOT = File.expand_path('../fixtures', __FILE__)
|
6
|
+
|
7
|
+
def load(fixture)
|
8
|
+
File.open(File.join(ROOT,fixture), 'r:UTF-8').read
|
9
|
+
end
|
10
|
+
|
11
|
+
def load_locale(locale)
|
12
|
+
load("locales/locales-#{locale}.xml")
|
13
|
+
end
|
14
|
+
|
15
|
+
def load_style(style)
|
16
|
+
load("styles/#{style}.csl")
|
17
|
+
end
|
18
|
+
|
19
|
+
def load_items(items)
|
20
|
+
MultiJson.decode(load("items/#{items}.json"), :symbolize_keys => true)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
RSpec.configure do |config|
|
26
|
+
config.include(Fixtures)
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: citeproc-js
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1.pre.1
|
5
|
+
prerelease: 6
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Sylvester Keil
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-08-03 00:00:00.000000000 +02:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: citeproc
|
17
|
+
requirement: &2157316160 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0.0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *2157316160
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: execjs
|
28
|
+
requirement: &2157315600 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.2.3
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *2157315600
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: cucumber
|
39
|
+
requirement: &2157315120 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 1.0.2
|
45
|
+
type: :development
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *2157315120
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rspec
|
50
|
+
requirement: &2157314620 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 2.6.0
|
56
|
+
type: :development
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *2157314620
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: watchr
|
61
|
+
requirement: &2157314140 !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0.7'
|
67
|
+
type: :development
|
68
|
+
prerelease: false
|
69
|
+
version_requirements: *2157314140
|
70
|
+
description: A citeproc engine based on the citeproc-js CSL (Citation Style Language)
|
71
|
+
processor.
|
72
|
+
email:
|
73
|
+
- http://sylvester.keil.or.at
|
74
|
+
executables: []
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files:
|
77
|
+
- README.md
|
78
|
+
files:
|
79
|
+
- .gitignore
|
80
|
+
- .rspec
|
81
|
+
- Gemfile
|
82
|
+
- LICENSE
|
83
|
+
- README.md
|
84
|
+
- auto.watchr
|
85
|
+
- citeproc-js.gemspec
|
86
|
+
- lib/citeproc/js.rb
|
87
|
+
- lib/citeproc/js/engine.rb
|
88
|
+
- lib/citeproc/js/support/citeproc.js
|
89
|
+
- lib/citeproc/js/support/system.js
|
90
|
+
- lib/citeproc/js/support/xmldom.js
|
91
|
+
- lib/citeproc/js/support/xmle4x.js
|
92
|
+
- lib/citeproc/js/version.rb
|
93
|
+
- spec/citeproc/js/engine_spec.rb
|
94
|
+
- spec/fixtures/items/items.json
|
95
|
+
- spec/fixtures/locales/locales-en-US.xml
|
96
|
+
- spec/fixtures/styles/apa.csl
|
97
|
+
- spec/spec_helper.rb
|
98
|
+
has_rdoc: true
|
99
|
+
homepage: http://inukshuk.github.com/citeproc-js
|
100
|
+
licenses:
|
101
|
+
- AGPLv3
|
102
|
+
post_install_message:
|
103
|
+
rdoc_options:
|
104
|
+
- --line-numbers
|
105
|
+
- --inline-source
|
106
|
+
- --title
|
107
|
+
- ! '"CiteProc-JS Rubygem"'
|
108
|
+
- --main
|
109
|
+
- README.md
|
110
|
+
- --webcvs=http://github.com/inukshuk/citeproc-js/tree/master/
|
111
|
+
require_paths:
|
112
|
+
- lib
|
113
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
115
|
+
requirements:
|
116
|
+
- - ! '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
none: false
|
121
|
+
requirements:
|
122
|
+
- - ! '>'
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 1.3.1
|
125
|
+
requirements: []
|
126
|
+
rubyforge_project:
|
127
|
+
rubygems_version: 1.6.2
|
128
|
+
signing_key:
|
129
|
+
specification_version: 3
|
130
|
+
summary: A citeproc engine based on citeproc-js.
|
131
|
+
test_files:
|
132
|
+
- spec/citeproc/js/engine_spec.rb
|
133
|
+
- spec/fixtures/items/items.json
|
134
|
+
- spec/fixtures/locales/locales-en-US.xml
|
135
|
+
- spec/fixtures/styles/apa.csl
|
136
|
+
- spec/spec_helper.rb
|