govspeak 0.8.14 → 0.8.15
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +6 -7
- data/lib/govspeak.rb +1 -1
- data/lib/govspeak/version.rb +1 -1
- data/test/govspeak_test.rb +2 -2
- metadata +4 -4
data/Rakefile
CHANGED
@@ -1,14 +1,11 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require "rake"
|
2
|
+
require "rake/testtask"
|
3
|
+
require "bundler"
|
4
4
|
|
5
5
|
Bundler::GemHelper.install_tasks
|
6
6
|
|
7
|
-
task :default => [:test_units]
|
8
|
-
task :test => [:test_units]
|
9
|
-
|
10
7
|
desc "Run basic tests"
|
11
|
-
Rake::TestTask.new("
|
8
|
+
Rake::TestTask.new("test") { |t|
|
12
9
|
t.libs << "test"
|
13
10
|
t.pattern = 'test/*_test.rb'
|
14
11
|
t.verbose = true
|
@@ -20,3 +17,5 @@ task :publish_gem do |t|
|
|
20
17
|
gem = GemPublisher.publish_if_updated("govspeak.gemspec", :rubygems)
|
21
18
|
puts "Published #{gem}" if gem
|
22
19
|
end
|
20
|
+
|
21
|
+
task :default => [:test]
|
data/lib/govspeak.rb
CHANGED
@@ -137,7 +137,7 @@ module Govspeak
|
|
137
137
|
wrap_with_div('example', '$E', Govspeak::Document)
|
138
138
|
|
139
139
|
extension('address', surrounded_by("$A")) { |body|
|
140
|
-
%{<div class="address
|
140
|
+
%{<div class="address"><div class="adr org fn"><p>\n#{body.sub("\n", "").gsub("\n", "<br />")}\n</p></div></div>\n}
|
141
141
|
}
|
142
142
|
|
143
143
|
extension("numbered list", /((s\d+\.\s.*(?:\n|$))+)/) do |body|
|
data/lib/govspeak/version.rb
CHANGED
data/test/govspeak_test.rb
CHANGED
@@ -68,7 +68,7 @@ Testcase Cliffs
|
|
68
68
|
Teston
|
69
69
|
0123 456 7890 $A }
|
70
70
|
doc = Govspeak::Document.new(input)
|
71
|
-
assert_equal %{<div class="address
|
71
|
+
assert_equal %{<div class="address"><div class="adr org fn"><p>\n123 Test Street<br />Testcase Cliffs<br />Teston<br />0123 456 7890 \n</p></div></div>\n}, doc.to_html
|
72
72
|
end
|
73
73
|
|
74
74
|
test_given_govspeak("^ I am very informational ^") do
|
@@ -221,7 +221,7 @@ Teston
|
|
221
221
|
road
|
222
222
|
$A" do
|
223
223
|
assert_html_output %{
|
224
|
-
<div class="address
|
224
|
+
<div class="address"><div class="adr org fn"><p>
|
225
225
|
street<br />road<br />
|
226
226
|
</p></div></div>}
|
227
227
|
assert_text_output "street road"
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: govspeak
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.8.
|
5
|
+
version: 0.8.15
|
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-06-
|
14
|
+
date: 2012-06-18 00:00:00 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: kramdown
|
@@ -92,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
92
|
requirements:
|
93
93
|
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
hash:
|
95
|
+
hash: 4415467989565136347
|
96
96
|
segments:
|
97
97
|
- 0
|
98
98
|
version: "0"
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
requirements:
|
102
102
|
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
hash:
|
104
|
+
hash: 4415467989565136347
|
105
105
|
segments:
|
106
106
|
- 0
|
107
107
|
version: "0"
|