livingstyleguide 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +6 -0
- data/lib/livingstyleguide/markdown_extensions.rb +4 -2
- data/lib/livingstyleguide/version.rb +1 -1
- data/test/integration/markdown_test.rb +3 -3
- metadata +18 -37
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: be894414f989882969b8cd539c628aac0b639577
|
4
|
+
data.tar.gz: 0548ffdf8103d1b3ff4038122d358011609befbb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1e1dff3767e733d9f073fbcf57c5c607e377ea70c276e2130d5d7a50e975c2cadd8b4d38193c144c8b202ae10d2be73611118b7c23a86dffa5f41244a55d5a1c
|
7
|
+
data.tar.gz: 7b65169e497cfec7dc8985edab5d6fb6fef82ef75afb0b2183ba0263c2b67abca6eff4aed41fcb69db8896dec77150460df253a0ebae8658edbf3479e88843a8
|
data/CHANGELOG.md
ADDED
@@ -1,7 +1,8 @@
|
|
1
1
|
require 'redcarpet'
|
2
2
|
require 'tilt'
|
3
3
|
require 'minisyntax'
|
4
|
-
require
|
4
|
+
require 'erb'
|
5
|
+
require 'active_support/core_ext/string/inflections'
|
5
6
|
|
6
7
|
module LivingStyleGuide
|
7
8
|
class RedcarpetTemplate < ::Tilt::RedcarpetTemplate::Redcarpet2
|
@@ -45,9 +46,10 @@ module LivingStyleGuide
|
|
45
46
|
end
|
46
47
|
|
47
48
|
def header(text, header_level)
|
49
|
+
id = %Q( id="#{::ActiveSupport::Inflector.parameterize(text, '-')}")
|
48
50
|
klass = %w(page-title headline sub-headline sub-sub-headline)[header_level]
|
49
51
|
header_level += 1
|
50
|
-
%Q(<h#{header_level} class="livingstyleguide--#{klass}">#{text}</h#{header_level}>\n)
|
52
|
+
%Q(<h#{header_level} class="livingstyleguide--#{klass}"#{id}>#{text}</h#{header_level}>\n)
|
51
53
|
end
|
52
54
|
|
53
55
|
def paragraph(text)
|
@@ -35,7 +35,7 @@ class MarkdownTest < Test::Unit::TestCase
|
|
35
35
|
|
36
36
|
def test_text
|
37
37
|
assert_markdown <<-HTML, 'text.md'
|
38
|
-
<h2 class="livingstyleguide--headline">Hello World</h2>
|
38
|
+
<h2 class="livingstyleguide--headline" id="hello-world">Hello World</h2>
|
39
39
|
<p class="livingstyleguide--paragraph">Lorem ipsum <strong>dolor</strong> sit amet,
|
40
40
|
<code class="livingstyleguide--code-span livingstyleguide--code"><consectetur> adipiscing</code> elit.
|
41
41
|
Sed a pulvinar turpis.</p>
|
@@ -44,13 +44,13 @@ class MarkdownTest < Test::Unit::TestCase
|
|
44
44
|
<li class="livingstyleguide--unordered-list-item">Ipsum</li>
|
45
45
|
<li class="livingstyleguide--unordered-list-item">Dolor</li>
|
46
46
|
</ul>
|
47
|
-
<h3 class="livingstyleguide--sub-headline">More Lorem</h3>
|
47
|
+
<h3 class="livingstyleguide--sub-headline" id="more-lorem">More Lorem</h3>
|
48
48
|
<ol class="livingstyleguide--ordered-list">
|
49
49
|
<li class="livingstyleguide--ordered-list-item">Lorem</li>
|
50
50
|
<li class="livingstyleguide--ordered-list-item">Ipsum</li>
|
51
51
|
<li class="livingstyleguide--ordered-list-item">Dolor</li>
|
52
52
|
</ol>
|
53
|
-
<h4 class="livingstyleguide--sub-sub-headline">Even More Lorem</h4>
|
53
|
+
<h4 class="livingstyleguide--sub-sub-headline" id="even-more-lorem">Even More Lorem</h4>
|
54
54
|
HTML
|
55
55
|
end
|
56
56
|
|
metadata
CHANGED
@@ -1,36 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: livingstyleguide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Nico Hagenburger
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-08-07 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: minisyntax
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
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
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: middleman
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
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
|
@@ -46,65 +41,57 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: compass
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
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
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: sass
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
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
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: redcarpet
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
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
|
93
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: rake
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - '>='
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
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
96
|
version: '0'
|
110
97
|
description: Living Style Guide
|
@@ -116,6 +103,7 @@ extra_rdoc_files: []
|
|
116
103
|
files:
|
117
104
|
- .gitignore
|
118
105
|
- .travis.yml
|
106
|
+
- CHANGELOG.md
|
119
107
|
- Gemfile
|
120
108
|
- LICENSE.txt
|
121
109
|
- README.md
|
@@ -153,33 +141,26 @@ files:
|
|
153
141
|
- test/unit/sass_extensions_test.rb
|
154
142
|
homepage: ''
|
155
143
|
licenses: []
|
144
|
+
metadata: {}
|
156
145
|
post_install_message:
|
157
146
|
rdoc_options: []
|
158
147
|
require_paths:
|
159
148
|
- lib
|
160
149
|
required_ruby_version: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
150
|
requirements:
|
163
|
-
- -
|
151
|
+
- - '>='
|
164
152
|
- !ruby/object:Gem::Version
|
165
153
|
version: '0'
|
166
|
-
segments:
|
167
|
-
- 0
|
168
|
-
hash: -262664315329219580
|
169
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
|
-
none: false
|
171
155
|
requirements:
|
172
|
-
- -
|
156
|
+
- - '>='
|
173
157
|
- !ruby/object:Gem::Version
|
174
158
|
version: '0'
|
175
|
-
segments:
|
176
|
-
- 0
|
177
|
-
hash: -262664315329219580
|
178
159
|
requirements: []
|
179
160
|
rubyforge_project:
|
180
|
-
rubygems_version:
|
161
|
+
rubygems_version: 2.0.6
|
181
162
|
signing_key:
|
182
|
-
specification_version:
|
163
|
+
specification_version: 4
|
183
164
|
summary: Living Style Guide
|
184
165
|
test_files:
|
185
166
|
- test/fixtures/markdown/code-with-highlight-block.md
|