spirit 0.2 → 0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/spirit.rb +8 -10
- data/lib/spirit/constants.rb +17 -7
- data/lib/spirit/document.rb +4 -9
- data/lib/spirit/errors.rb +0 -1
- data/lib/spirit/logger.rb +5 -6
- data/lib/spirit/manifest.rb +4 -5
- data/lib/spirit/render.rb +0 -2
- data/lib/spirit/render/errors.rb +0 -4
- data/lib/spirit/render/html.rb +17 -117
- data/lib/spirit/render/processable.rb +78 -0
- data/lib/spirit/render/processors.rb +15 -0
- data/lib/spirit/render/processors/base.rb +40 -0
- data/lib/spirit/render/processors/block_image_processor.rb +49 -0
- data/lib/spirit/render/processors/headers_processor.rb +41 -0
- data/lib/spirit/render/processors/layout_processor.rb +28 -0
- data/lib/spirit/render/processors/math_processor.rb +102 -0
- data/lib/spirit/render/processors/problems_processor.rb +76 -0
- data/lib/spirit/render/processors/pygments_processor.rb +22 -0
- data/lib/spirit/render/processors/sanitize_processor.rb +86 -0
- data/lib/spirit/render/templates.rb +1 -3
- data/lib/spirit/render/templates/header.rb +2 -3
- data/lib/spirit/render/templates/image.rb +6 -13
- data/lib/spirit/render/templates/multi.rb +9 -10
- data/lib/spirit/render/templates/navigation.rb +4 -5
- data/lib/spirit/render/templates/problem.rb +24 -28
- data/lib/spirit/render/templates/short.rb +2 -3
- data/lib/spirit/render/templates/table.rb +2 -2
- data/lib/spirit/render/templates/template.rb +12 -8
- data/lib/spirit/version.rb +1 -2
- data/views/header.haml +1 -1
- data/views/img.haml +2 -2
- data/views/layout.haml +27 -0
- data/views/multi.haml +10 -14
- data/views/nav.haml +2 -2
- data/views/short.haml +6 -11
- data/views/table.haml +20 -26
- metadata +36 -57
- data/lib/spirit/render/sanitize.rb +0 -90
- data/views/exe.haml +0 -5
@@ -6,15 +6,14 @@ module Spirit
|
|
6
6
|
# Renders multiple choice questions marked up in YAML as HTML.
|
7
7
|
# @example
|
8
8
|
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
# }
|
9
|
+
# """
|
10
|
+
# format: multi
|
11
|
+
# question: How tall is Mount Everest?
|
12
|
+
# answer: A
|
13
|
+
# options:
|
14
|
+
# A: 452 inches
|
15
|
+
# B: 8.85 kilometers
|
16
|
+
# """
|
18
17
|
class Multi < Problem
|
19
18
|
|
20
19
|
# Required key in YAML markup. Associated value should be a dictionary of
|
@@ -22,7 +21,7 @@ module Spirit
|
|
22
21
|
OPTIONS = 'options'
|
23
22
|
|
24
23
|
# Name of template file for rendering multiple choice questions.
|
25
|
-
|
24
|
+
self.template = 'multi.haml'
|
26
25
|
|
27
26
|
# Checks if the given yaml contains a valid MCQ.
|
28
27
|
# @return [Boolean] true iff the yaml contains a valid MCQ.
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# ~*~ encoding: utf-8 ~*~
|
2
1
|
module Spirit
|
3
2
|
|
4
3
|
module Render
|
@@ -6,8 +5,10 @@ module Spirit
|
|
6
5
|
# Keeps track of document sections and renders a navigation bar.
|
7
6
|
class Navigation < Template
|
8
7
|
|
8
|
+
delegate :size, :count, to: :@sections
|
9
|
+
|
9
10
|
# HAML template for navigation bar
|
10
|
-
|
11
|
+
self.template = 'nav.haml'
|
11
12
|
|
12
13
|
# Creates a new navigation bar.
|
13
14
|
def initialize
|
@@ -24,9 +25,7 @@ module Spirit
|
|
24
25
|
|
25
26
|
# Renders the navigation bar in HTML.
|
26
27
|
def render(locals={})
|
27
|
-
|
28
|
-
''
|
29
|
-
# super locals.merge(sections: @sections)
|
28
|
+
super locals.merge(sections: @sections)
|
30
29
|
end
|
31
30
|
|
32
31
|
end
|
@@ -1,5 +1,6 @@
|
|
1
|
-
|
1
|
+
require 'active_support/core_ext/class/attribute'
|
2
2
|
require 'spirit/constants'
|
3
|
+
|
3
4
|
module Spirit
|
4
5
|
|
5
6
|
module Render
|
@@ -18,14 +19,15 @@ module Spirit
|
|
18
19
|
# Required key in YAML markup. Value contains answers.
|
19
20
|
ANSWER = 'answer'
|
20
21
|
|
21
|
-
#
|
22
|
+
# Generated ID.
|
22
23
|
ID = 'id'
|
23
24
|
|
24
25
|
# Required keys.
|
25
26
|
KEYS = [FORMAT, QUESTION, ANSWER]
|
26
27
|
|
27
28
|
# Stateless markdown renderer.
|
28
|
-
|
29
|
+
class_attribute :markdown
|
30
|
+
self.markdown = ::Redcarpet::Markdown.new(::Redcarpet::Render::HTML, MARKDOWN_EXTENSIONS)
|
29
31
|
|
30
32
|
class << self
|
31
33
|
|
@@ -35,8 +37,9 @@ module Spirit
|
|
35
37
|
# @param [String] text embedded yaml
|
36
38
|
# @return [Problem] problem
|
37
39
|
def parse(text)
|
38
|
-
|
39
|
-
|
40
|
+
digest = OpenSSL::Digest::SHA256.digest text
|
41
|
+
yaml = YAML.load text
|
42
|
+
get_instance(yaml, digest)
|
40
43
|
rescue ::Psych::SyntaxError => e
|
41
44
|
raise RenderError, e.message
|
42
45
|
end
|
@@ -49,49 +52,42 @@ module Spirit
|
|
49
52
|
end
|
50
53
|
|
51
54
|
# @return [Problem] problem
|
52
|
-
def get_instance(
|
53
|
-
raise RenderError, "Missing 'format' key in given YAML" unless instantiable?
|
54
|
-
klass = Spirit::Render.const_get(
|
55
|
+
def get_instance(hash, digest)
|
56
|
+
raise RenderError, "Missing 'format' key in given YAML" unless instantiable? hash
|
57
|
+
klass = Spirit::Render.const_get(hash[FORMAT].capitalize)
|
55
58
|
raise NameError unless klass < Problem
|
56
|
-
klass.new(
|
59
|
+
klass.new(hash, digest)
|
57
60
|
rescue NameError
|
58
|
-
raise RenderError, 'Unrecognized format: %p' %
|
61
|
+
raise RenderError, 'Unrecognized format: %p' % hash[FORMAT]
|
59
62
|
end
|
60
63
|
|
61
64
|
private
|
62
65
|
|
63
|
-
def instantiable?(
|
64
|
-
|
66
|
+
def instantiable?(hash)
|
67
|
+
hash.is_a?(Hash) and hash.has_key?(FORMAT)
|
65
68
|
end
|
66
69
|
|
67
70
|
end
|
68
71
|
|
69
|
-
accessor
|
72
|
+
accessor *KEYS
|
73
|
+
attr_accessor :nesting, :id
|
74
|
+
attr_reader :digest
|
70
75
|
|
71
76
|
# Creates a new problem from the given YAML.
|
72
77
|
# @param [Hash] yaml parsed yaml object
|
73
|
-
|
74
|
-
|
75
|
-
|
78
|
+
# @param [String] digest SHA-256 hash of yaml text
|
79
|
+
# @param [Fixnum] id integer ID of question
|
80
|
+
def initialize(yaml, digest)
|
81
|
+
@yaml, @digest, @nesting, @id = yaml, digest, [], 0
|
76
82
|
raise RenderError.new('Invalid problem.') unless @yaml[QUESTION].is_a? String
|
77
|
-
@yaml[QUESTION] =
|
83
|
+
@yaml[QUESTION] = markdown.render @yaml[QUESTION]
|
78
84
|
end
|
79
85
|
|
80
86
|
# @todo TODO should probably show some error message in the preview,
|
81
87
|
# so that the author doesn't have to read the logs.
|
82
88
|
def render(locals={})
|
83
89
|
raise RenderError.new('Invalid problem.') unless valid?
|
84
|
-
|
85
|
-
super yaml
|
86
|
-
end
|
87
|
-
|
88
|
-
# Saves the answer to a file on disk.
|
89
|
-
# @todo TODO should probably show some error message in the preview,
|
90
|
-
# so that the author doesn't have to read the logs.
|
91
|
-
def save!(name)
|
92
|
-
raise RenderError.new('Invalid problem.') unless valid?
|
93
|
-
solution = File.join(Spirit::SOLUTION_DIR, id + Spirit::SOLUTION_EXT)
|
94
|
-
File.open(solution, 'wb+') { |file| Marshal.dump answer, file }
|
90
|
+
super @yaml.merge(locals)
|
95
91
|
end
|
96
92
|
|
97
93
|
# Retrieves the answer from the given YAML object in a serializable form.
|
@@ -13,13 +13,12 @@ module Spirit
|
|
13
13
|
class Short < Problem
|
14
14
|
|
15
15
|
# Name of template file for rendering short answer questions.
|
16
|
-
|
16
|
+
self.template = 'short.haml'
|
17
17
|
|
18
18
|
# Checks if the given yaml contains a valid MCQ.
|
19
19
|
# @return [Boolean] true iff the yaml contains a valid MCQ.
|
20
20
|
def valid?
|
21
|
-
super and
|
22
|
-
not @yaml[ANSWER].nil?
|
21
|
+
super and not @yaml[ANSWER].nil?
|
23
22
|
end
|
24
23
|
|
25
24
|
end
|
@@ -23,7 +23,7 @@ module Spirit
|
|
23
23
|
class Table < Problem
|
24
24
|
|
25
25
|
# Name of template file for rendering table problems.
|
26
|
-
|
26
|
+
self.template = 'table.haml'
|
27
27
|
|
28
28
|
# Optional headings key.
|
29
29
|
HEADINGS = 'headings'
|
@@ -37,7 +37,7 @@ module Spirit
|
|
37
37
|
accessor HEADINGS, GRID
|
38
38
|
|
39
39
|
# Ensures that the +headings+ key exists.
|
40
|
-
def initialize(yaml)
|
40
|
+
def initialize(yaml, digest)
|
41
41
|
yaml[HEADINGS] ||= nil
|
42
42
|
super
|
43
43
|
end
|
@@ -1,28 +1,32 @@
|
|
1
|
-
|
1
|
+
require 'active_support/core_ext/class/attribute'
|
2
|
+
require 'spirit/constants'
|
2
3
|
module Spirit
|
3
4
|
|
4
5
|
module Render
|
5
6
|
|
6
|
-
# Base class for all templates.
|
7
|
-
#
|
7
|
+
# Base class for all templates. Class classes should override the
|
8
|
+
# +template+ class attribute.
|
8
9
|
class Template
|
9
10
|
|
11
|
+
class_attribute :template
|
12
|
+
|
10
13
|
# Renders the given problem using {#view}.
|
11
14
|
# @param [Hash] locals local variables to pass to the template
|
12
15
|
def render(locals={})
|
13
|
-
view.render
|
16
|
+
view.render self, locals
|
14
17
|
end
|
15
18
|
|
16
19
|
private
|
17
20
|
|
18
21
|
# Retrieves the +view+ singleton. If it is nil, initializes it from
|
19
|
-
# +self.
|
20
|
-
#
|
22
|
+
# +self.template+. Note that this is reloaded with every refresh so I can
|
23
|
+
# edit the templates without restarting.
|
24
|
+
# @todo TODO optimize by reusing the HAML engine
|
21
25
|
# @return [Haml::Engine] haml engine
|
22
26
|
def view
|
23
27
|
return @view unless @view.nil?
|
24
|
-
file = File.join
|
25
|
-
@view = Haml::Engine.new
|
28
|
+
file = File.join VIEWS, self.template
|
29
|
+
@view = Haml::Engine.new File.read(file), HAML_CONFIG
|
26
30
|
end
|
27
31
|
|
28
32
|
end
|
data/lib/spirit/version.rb
CHANGED
data/views/header.haml
CHANGED
data/views/img.haml
CHANGED
data/views/layout.haml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
-# coding: UTF-8
|
2
|
+
!= navigation.render
|
3
|
+
.row
|
4
|
+
.large-6.columns
|
5
|
+
!= preserve content
|
6
|
+
.large-6.columns
|
7
|
+
.lesson-problems.panel
|
8
|
+
.row
|
9
|
+
.large-6.large-centered.columns
|
10
|
+
.jqpagination
|
11
|
+
%a.first{href: '#', 'data-action' => 'first'} «
|
12
|
+
%a.previous{href: '#', 'data-action' => 'previous'} ‹
|
13
|
+
%input{type: 'text', readonly: 'readonly', 'data-max-page' => problems.count}
|
14
|
+
%a.next{href: '#', 'data-action' => 'next'} ›
|
15
|
+
%a.last{href: '#', 'data-action' => 'last'} »
|
16
|
+
- problems.each_with_index do |problem, i|
|
17
|
+
%div.problem-wrapper{class: i != 0 ? 'hide' : ''}
|
18
|
+
%form.custom.problem{action: '/answers', 'accept-charset' => 'UTF-8', id: "problem_#{problem.id}", method: 'post'}
|
19
|
+
%input{type: 'hidden', name: 'position', value: problem.id}
|
20
|
+
%fieldset
|
21
|
+
%legend Problem #{problem.id + 1}
|
22
|
+
- if problem.nesting.any?
|
23
|
+
%ul.breadcrumbs
|
24
|
+
- problem.nesting.each do |header|
|
25
|
+
%li
|
26
|
+
%a{href: '#' + header.name}!= header.text
|
27
|
+
!= problem.render
|
data/views/multi.haml
CHANGED
@@ -1,16 +1,12 @@
|
|
1
1
|
-# coding: UTF-8
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
%input{name: 'answer', type: 'radio', value: value}
|
13
|
-
= label
|
14
|
-
.large-2.small-1.columns
|
15
|
-
%a.button.submit.small.expand.postfix.radius{href: '#'} Submit
|
2
|
+
!= question
|
3
|
+
.row.collapse
|
4
|
+
.large-10.columns
|
5
|
+
-options.each do |value, label|
|
6
|
+
%label{for: 'answer'}
|
7
|
+
%input.hide{name: 'answer', type: 'radio', value: value}
|
8
|
+
%span.custom.radio
|
9
|
+
!= label
|
10
|
+
.large-2.columns
|
11
|
+
%input.small.button.expand.radius{type: 'submit', value: 'Submit'}
|
16
12
|
|
data/views/nav.haml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
-# coding: UTF-8
|
2
|
-
%dl
|
2
|
+
%dl.lesson-nav.sub-nav{'data-magellan-expedition' => ''}
|
3
3
|
-sections.each do |name, heading|
|
4
4
|
%dd{'data-magellan-arrival' => name}
|
5
|
-
%a{href: '#' + name}
|
5
|
+
%a{href: '#' + name}!= heading
|
data/views/short.haml
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
-# coding: UTF-8
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
%
|
6
|
-
|
7
|
-
|
8
|
-
.row.collapse
|
9
|
-
.large-10.small-3.columns
|
10
|
-
%input{name: 'answer', type: 'text'}
|
11
|
-
.large-2.small-1.columns
|
12
|
-
%a.button.small.submit.expand.postfix.radius{href: '#'} Submit
|
2
|
+
!= question
|
3
|
+
.row.collapse
|
4
|
+
.large-10.columns
|
5
|
+
%input{name: 'answer', type: 'text'}
|
6
|
+
.large-2.columns
|
7
|
+
%input.button.postfix.radius{type: 'submit', value: 'Submit'}
|
data/views/table.haml
CHANGED
@@ -1,28 +1,22 @@
|
|
1
1
|
-# coding: UTF-8
|
2
|
-
|
3
|
-
|
2
|
+
.row
|
3
|
+
.large-12.columns
|
4
|
+
%table
|
5
|
+
%thead
|
6
|
+
-if headings
|
7
|
+
%tr
|
8
|
+
-headings.each do |heading|
|
9
|
+
%th= heading
|
4
10
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
%tbody
|
18
|
-
-grid.each_with_index do |row, i|
|
19
|
-
%tr
|
20
|
-
-row.each_with_index do |cell, j|
|
21
|
-
%td
|
22
|
-
- if Spirit::Render::Table.input? cell
|
23
|
-
%input{name: "answer[#{i}][#{j}]", type: 'text'}
|
24
|
-
- else
|
25
|
-
= cell
|
26
|
-
.row
|
27
|
-
.two.columns.mobile-one
|
28
|
-
%a.button.small.submit.radius{href: '#'} Submit
|
11
|
+
%tbody
|
12
|
+
-grid.each_with_index do |row, i|
|
13
|
+
%tr
|
14
|
+
-row.each_with_index do |cell, j|
|
15
|
+
%td
|
16
|
+
- if Spirit::Render::Table.input? cell
|
17
|
+
%input{name: "answer[#{i}][#{j}]", type: 'text'}
|
18
|
+
- else
|
19
|
+
!= cell
|
20
|
+
.row
|
21
|
+
.large-2.small-1.columns
|
22
|
+
%input.small.button.radius{type: 'submit', value: 'Submit'}
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spirit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
5
|
-
prerelease:
|
4
|
+
version: '0.5'
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jiunn Haur Lim
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-06-12 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: haml
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,39 +27,34 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: redcarpet
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version: '2.
|
33
|
+
version: '2.3'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: '2.
|
40
|
+
version: '2.3'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
42
|
+
name: pygments.rb
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
47
|
+
version: '0.5'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
54
|
+
version: '0.5'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: sanitize
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: activesupport
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ~>
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ~>
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -94,99 +83,87 @@ dependencies:
|
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: yard
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
87
|
- - ~>
|
100
88
|
- !ruby/object:Gem::Version
|
101
|
-
version: 0.8
|
89
|
+
version: '0.8'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
94
|
- - ~>
|
108
95
|
- !ruby/object:Gem::Version
|
109
|
-
version: 0.8
|
96
|
+
version: '0.8'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: debugger-pry
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
101
|
- - ~>
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.1
|
103
|
+
version: '0.1'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
108
|
- - ~>
|
124
109
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.1
|
110
|
+
version: '0.1'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: rspec
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
115
|
- - ~>
|
132
116
|
- !ruby/object:Gem::Version
|
133
|
-
version: 2.13
|
117
|
+
version: '2.13'
|
134
118
|
type: :development
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
122
|
- - ~>
|
140
123
|
- !ruby/object:Gem::Version
|
141
|
-
version: 2.13
|
124
|
+
version: '2.13'
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: rake
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
129
|
- - ~>
|
148
130
|
- !ruby/object:Gem::Version
|
149
|
-
version: 10.0
|
131
|
+
version: '10.0'
|
150
132
|
type: :development
|
151
133
|
prerelease: false
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
135
|
requirements:
|
155
136
|
- - ~>
|
156
137
|
- !ruby/object:Gem::Version
|
157
|
-
version: 10.0
|
138
|
+
version: '10.0'
|
158
139
|
- !ruby/object:Gem::Dependency
|
159
140
|
name: factory_girl
|
160
141
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
142
|
requirements:
|
163
143
|
- - ~>
|
164
144
|
- !ruby/object:Gem::Version
|
165
|
-
version: 4.2
|
145
|
+
version: '4.2'
|
166
146
|
type: :development
|
167
147
|
prerelease: false
|
168
148
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
149
|
requirements:
|
171
150
|
- - ~>
|
172
151
|
- !ruby/object:Gem::Version
|
173
|
-
version: 4.2
|
152
|
+
version: '4.2'
|
174
153
|
- !ruby/object:Gem::Dependency
|
175
154
|
name: faker
|
176
155
|
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
156
|
requirements:
|
179
157
|
- - ~>
|
180
158
|
- !ruby/object:Gem::Version
|
181
|
-
version: 1.1
|
159
|
+
version: '1.1'
|
182
160
|
type: :development
|
183
161
|
prerelease: false
|
184
162
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
163
|
requirements:
|
187
164
|
- - ~>
|
188
165
|
- !ruby/object:Gem::Version
|
189
|
-
version: 1.1
|
166
|
+
version: '1.1'
|
190
167
|
description: Parses Genie Markup Language
|
191
168
|
email:
|
192
169
|
- codex.is.poetry@gmail.com
|
@@ -203,7 +180,16 @@ files:
|
|
203
180
|
- lib/spirit/manifest.rb
|
204
181
|
- lib/spirit/render/errors.rb
|
205
182
|
- lib/spirit/render/html.rb
|
206
|
-
- lib/spirit/render/
|
183
|
+
- lib/spirit/render/processable.rb
|
184
|
+
- lib/spirit/render/processors/base.rb
|
185
|
+
- lib/spirit/render/processors/block_image_processor.rb
|
186
|
+
- lib/spirit/render/processors/headers_processor.rb
|
187
|
+
- lib/spirit/render/processors/layout_processor.rb
|
188
|
+
- lib/spirit/render/processors/math_processor.rb
|
189
|
+
- lib/spirit/render/processors/problems_processor.rb
|
190
|
+
- lib/spirit/render/processors/pygments_processor.rb
|
191
|
+
- lib/spirit/render/processors/sanitize_processor.rb
|
192
|
+
- lib/spirit/render/processors.rb
|
207
193
|
- lib/spirit/render/templates/header.rb
|
208
194
|
- lib/spirit/render/templates/image.rb
|
209
195
|
- lib/spirit/render/templates/multi.rb
|
@@ -217,9 +203,9 @@ files:
|
|
217
203
|
- lib/spirit/tilt/template.rb
|
218
204
|
- lib/spirit/version.rb
|
219
205
|
- lib/spirit.rb
|
220
|
-
- views/exe.haml
|
221
206
|
- views/header.haml
|
222
207
|
- views/img.haml
|
208
|
+
- views/layout.haml
|
223
209
|
- views/multi.haml
|
224
210
|
- views/nav.haml
|
225
211
|
- views/short.haml
|
@@ -227,33 +213,26 @@ files:
|
|
227
213
|
homepage: https://github.com/jimjh/genie-parser
|
228
214
|
licenses:
|
229
215
|
- MIT
|
216
|
+
metadata: {}
|
230
217
|
post_install_message:
|
231
218
|
rdoc_options: []
|
232
219
|
require_paths:
|
233
220
|
- lib
|
234
221
|
required_ruby_version: !ruby/object:Gem::Requirement
|
235
|
-
none: false
|
236
222
|
requirements:
|
237
|
-
- -
|
223
|
+
- - '>='
|
238
224
|
- !ruby/object:Gem::Version
|
239
|
-
version: '0'
|
240
|
-
segments:
|
241
|
-
- 0
|
242
|
-
hash: 96703733558518260
|
225
|
+
version: '2.0'
|
243
226
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
244
|
-
none: false
|
245
227
|
requirements:
|
246
|
-
- -
|
228
|
+
- - '>='
|
247
229
|
- !ruby/object:Gem::Version
|
248
230
|
version: '0'
|
249
|
-
segments:
|
250
|
-
- 0
|
251
|
-
hash: 96703733558518260
|
252
231
|
requirements: []
|
253
232
|
rubyforge_project:
|
254
|
-
rubygems_version:
|
233
|
+
rubygems_version: 2.0.2
|
255
234
|
signing_key:
|
256
|
-
specification_version:
|
235
|
+
specification_version: 4
|
257
236
|
summary: Parses Genie Markup Language
|
258
237
|
test_files: []
|
259
238
|
has_rdoc:
|