noumenon 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/features/template_tags/textilize.feature +15 -0
- data/lib/noumenon/template/core_tags.rb +12 -0
- data/lib/noumenon/version.rb +1 -1
- data/noumenon.gemspec +1 -0
- metadata +32 -19
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
Feature: Using Textile to format text
|
2
|
+
As a designer
|
3
|
+
I want to allow my users to use Textile
|
4
|
+
So that they can't mess up the design too badly
|
5
|
+
|
6
|
+
@wip
|
7
|
+
Scenario: A textile block
|
8
|
+
Given this template exists at "textile.nou.html"
|
9
|
+
"""
|
10
|
+
{{ "h1. Hello" | textilize }}
|
11
|
+
"""
|
12
|
+
And this content item exists at "/textile"
|
13
|
+
| template | textile |
|
14
|
+
When I view "/textile"
|
15
|
+
Then the headline should be "Hello"
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'noumenon/template'
|
2
2
|
require 'uri'
|
3
|
+
require 'redcloth'
|
3
4
|
|
4
5
|
# Liquid extensions provided by Noumenon.
|
5
6
|
#
|
@@ -38,6 +39,17 @@ module Noumenon::Template::CoreTags
|
|
38
39
|
item = Noumenon.content_repository.get(input)
|
39
40
|
item ? item.stringify_keys : nil
|
40
41
|
end
|
42
|
+
|
43
|
+
# Formats the provided text using Textile.
|
44
|
+
#
|
45
|
+
# @example
|
46
|
+
# {{ "h1. Hello, world" | textilize }}
|
47
|
+
# <!-- <h1>Hello, world</h1> -->
|
48
|
+
#
|
49
|
+
# @api public
|
50
|
+
def textilize(input)
|
51
|
+
RedCloth.new(input).to_html
|
52
|
+
end
|
41
53
|
end
|
42
54
|
Liquid::Template.register_filter(Filters)
|
43
55
|
|
data/lib/noumenon/version.rb
CHANGED
data/noumenon.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: noumenon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jon Wood
|
@@ -36,104 +36,115 @@ dependencies:
|
|
36
36
|
type: :runtime
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
39
|
+
name: RedCloth
|
40
40
|
prerelease: false
|
41
41
|
requirement: &id003 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
44
44
|
- - ~>
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: "
|
46
|
+
version: "4.2"
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id003
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: sinatra
|
51
51
|
prerelease: false
|
52
52
|
requirement: &id004 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
54
54
|
requirements:
|
55
55
|
- - ~>
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: "
|
57
|
+
version: "1.2"
|
58
58
|
type: :runtime
|
59
59
|
version_requirements: *id004
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
|
-
name:
|
61
|
+
name: thor
|
62
62
|
prerelease: false
|
63
63
|
requirement: &id005 !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: "0.14"
|
69
|
+
type: :runtime
|
70
|
+
version_requirements: *id005
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: aruba
|
73
|
+
prerelease: false
|
74
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
64
75
|
none: false
|
65
76
|
requirements:
|
66
77
|
- - ~>
|
67
78
|
- !ruby/object:Gem::Version
|
68
79
|
version: "0.3"
|
69
80
|
type: :development
|
70
|
-
version_requirements: *
|
81
|
+
version_requirements: *id006
|
71
82
|
- !ruby/object:Gem::Dependency
|
72
83
|
name: capybara
|
73
84
|
prerelease: false
|
74
|
-
requirement: &
|
85
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
75
86
|
none: false
|
76
87
|
requirements:
|
77
88
|
- - ~>
|
78
89
|
- !ruby/object:Gem::Version
|
79
90
|
version: 1.0.0.beta1
|
80
91
|
type: :development
|
81
|
-
version_requirements: *
|
92
|
+
version_requirements: *id007
|
82
93
|
- !ruby/object:Gem::Dependency
|
83
94
|
name: cucumber
|
84
95
|
prerelease: false
|
85
|
-
requirement: &
|
96
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
86
97
|
none: false
|
87
98
|
requirements:
|
88
99
|
- - ~>
|
89
100
|
- !ruby/object:Gem::Version
|
90
101
|
version: "0.10"
|
91
102
|
type: :development
|
92
|
-
version_requirements: *
|
103
|
+
version_requirements: *id008
|
93
104
|
- !ruby/object:Gem::Dependency
|
94
105
|
name: rake
|
95
106
|
prerelease: false
|
96
|
-
requirement: &
|
107
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
97
108
|
none: false
|
98
109
|
requirements:
|
99
110
|
- - ~>
|
100
111
|
- !ruby/object:Gem::Version
|
101
112
|
version: "0.9"
|
102
113
|
type: :development
|
103
|
-
version_requirements: *
|
114
|
+
version_requirements: *id009
|
104
115
|
- !ruby/object:Gem::Dependency
|
105
116
|
name: rdiscount
|
106
117
|
prerelease: false
|
107
|
-
requirement: &
|
118
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
108
119
|
none: false
|
109
120
|
requirements:
|
110
121
|
- - ~>
|
111
122
|
- !ruby/object:Gem::Version
|
112
123
|
version: "1.6"
|
113
124
|
type: :development
|
114
|
-
version_requirements: *
|
125
|
+
version_requirements: *id010
|
115
126
|
- !ruby/object:Gem::Dependency
|
116
127
|
name: rspec
|
117
128
|
prerelease: false
|
118
|
-
requirement: &
|
129
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
119
130
|
none: false
|
120
131
|
requirements:
|
121
132
|
- - ~>
|
122
133
|
- !ruby/object:Gem::Version
|
123
134
|
version: "2.5"
|
124
135
|
type: :development
|
125
|
-
version_requirements: *
|
136
|
+
version_requirements: *id011
|
126
137
|
- !ruby/object:Gem::Dependency
|
127
138
|
name: yard
|
128
139
|
prerelease: false
|
129
|
-
requirement: &
|
140
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
130
141
|
none: false
|
131
142
|
requirements:
|
132
143
|
- - ~>
|
133
144
|
- !ruby/object:Gem::Version
|
134
145
|
version: "0.7"
|
135
146
|
type: :development
|
136
|
-
version_requirements: *
|
147
|
+
version_requirements: *id012
|
137
148
|
description: |
|
138
149
|
Noumenon is a content management system designed to support being extended with Sinatra
|
139
150
|
applications.
|
@@ -185,6 +196,7 @@ files:
|
|
185
196
|
- features/template_tags/assign_to.feature
|
186
197
|
- features/template_tags/content_from.feature
|
187
198
|
- features/template_tags/nav_menu.feature
|
199
|
+
- features/template_tags/textilize.feature
|
188
200
|
- generators/repository/index.yml
|
189
201
|
- generators/site/Gemfile
|
190
202
|
- generators/site/config.ru
|
@@ -267,6 +279,7 @@ test_files:
|
|
267
279
|
- features/template_tags/assign_to.feature
|
268
280
|
- features/template_tags/content_from.feature
|
269
281
|
- features/template_tags/nav_menu.feature
|
282
|
+
- features/template_tags/textilize.feature
|
270
283
|
- spec/noumenon/repository/file_system_spec.rb
|
271
284
|
- spec/noumenon/repository_spec.rb
|
272
285
|
- spec/noumenon/template_spec.rb
|