govspeak 0.8.17 → 0.8.18

Sign up to get free protection for your applications and to get access to all the features.
data/lib/govspeak.rb CHANGED
@@ -75,7 +75,7 @@ module Govspeak
75
75
  def self.wrap_with_div(class_name, character, parser=Kramdown::Document)
76
76
  extension(class_name, surrounded_by(character)) { |body|
77
77
  content = parser ? parser.new("#{body.strip}\n").to_html : body.strip
78
- %{<div class="#{class_name}">\n#{content}</div>\n}
78
+ %{\n<div class="#{class_name}">\n#{content}</div>\n}
79
79
  }
80
80
  end
81
81
 
@@ -1,3 +1,3 @@
1
1
  module Govspeak
2
- VERSION = "0.8.17"
2
+ VERSION = "0.8.18"
3
3
  end
@@ -297,7 +297,7 @@ Teston
297
297
  help
298
298
  $I
299
299
  $P" do
300
- assert_html_output %{<div class="place">\n<div class="information">\n<p>help</p>\n</div>\n</div>}
300
+ assert_html_output %{<div class="place">\n\n<div class="information">\n<p>help</p>\n</div>\n</div>}
301
301
  assert_text_output "help"
302
302
  end
303
303
 
@@ -323,6 +323,20 @@ Teston
323
323
  assert_text_output "Click here to start the tool"
324
324
  end
325
325
 
326
+ test_given_govspeak "Here is some text
327
+
328
+ $CTA
329
+ Click here to start the tool
330
+ $CTA
331
+ " do
332
+ assert_html_output %{
333
+ <p>Here is some text</p>
334
+
335
+ <div class="call-to-action">
336
+ <p>Click here to start the tool</p>
337
+ </div>}
338
+ end
339
+
326
340
  test_given_govspeak "
327
341
  1. rod
328
342
  2. jane
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: govspeak
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.8.17
5
+ version: 0.8.18
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ben Griffiths
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2012-07-30 00:00:00 Z
14
+ date: 2012-08-02 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: kramdown
@@ -92,16 +92,16 @@ extensions: []
92
92
  extra_rdoc_files: []
93
93
 
94
94
  files:
95
- - lib/govspeak/version.rb
96
- - lib/govspeak/header_extractor.rb
97
95
  - lib/govspeak.rb
98
96
  - lib/kramdown/parser/kramdown_with_automatic_external_links.rb
97
+ - lib/govspeak/header_extractor.rb
98
+ - lib/govspeak/version.rb
99
99
  - README.md
100
100
  - Gemfile
101
101
  - Rakefile
102
- - test/govspeak_test_helper.rb
103
- - test/govspeak_test.rb
104
102
  - test/test_helper.rb
103
+ - test/govspeak_test.rb
104
+ - test/govspeak_test_helper.rb
105
105
  homepage: http://github.com/alphagov/govspeak
106
106
  licenses: []
107
107
 
@@ -115,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - ">="
117
117
  - !ruby/object:Gem::Version
118
- hash: -3838397236025135727
118
+ hash: 2080396749389676564
119
119
  segments:
120
120
  - 0
121
121
  version: "0"
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  requirements:
125
125
  - - ">="
126
126
  - !ruby/object:Gem::Version
127
- hash: -3838397236025135727
127
+ hash: 2080396749389676564
128
128
  segments:
129
129
  - 0
130
130
  version: "0"
@@ -136,6 +136,6 @@ signing_key:
136
136
  specification_version: 3
137
137
  summary: Markup language for single domain
138
138
  test_files:
139
- - test/govspeak_test_helper.rb
140
- - test/govspeak_test.rb
141
139
  - test/test_helper.rb
140
+ - test/govspeak_test.rb
141
+ - test/govspeak_test_helper.rb