bluefeather 0.40 → 0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,10 +12,27 @@
12
12
  #-----------------------------------------------------------
13
13
 
14
14
  require 'rake/testtask'
15
- require 'rake/gempackagetask'
16
- require 'spec/rake/spectask'
15
+ require 'rubygems/package_task'
17
16
  require 'rake/clean'
18
17
 
18
+
19
+ # Adaptable to both RSpec 1 and 2
20
+ rspec_version = nil
21
+ begin
22
+ # for RSpec 2
23
+ require 'rspec/core/rake_task'
24
+ rspec_version = 2
25
+ rescue LoadError
26
+ begin
27
+ # for RSpec 1
28
+ require 'spec/rake/spectask'
29
+ rspec_version = 1
30
+ rescue LoadError
31
+ puts "RSpec is not available."
32
+ end
33
+ end
34
+
35
+
19
36
  $KCODE = 'u' unless defined?(Encoding)
20
37
  $LOAD_PATH.unshift './lib'
21
38
  require 'bluefeather'
@@ -109,7 +126,7 @@ html. It is pair of command-line tool and pure Ruby library.
109
126
  EOF
110
127
  end
111
128
 
112
- Rake::GemPackageTask.new(spec) do |pkg|
129
+ Gem::PackageTask.new(spec) do |pkg|
113
130
  end
114
131
 
115
132
 
@@ -123,48 +140,64 @@ Rake::TestTask.new('original-test') do |tasklib|
123
140
  end
124
141
 
125
142
 
126
- # Proc for initializing each spec-tasks by common parameters
127
- setting = proc do |st|
128
- st.libs << ['./lib']
129
- st.ruby_opts = %w(-Ku)
130
- end
131
-
132
-
133
- desc "Verify all spec files."
134
- Spec::Rake::SpecTask.new do |st|
135
- setting.call(st)
136
- st.spec_files = FileList['spec/*.rb']
137
- end
138
-
139
- desc "Verify all spec files with specdocs."
140
- Spec::Rake::SpecTask.new(:specd) do |st|
141
- setting.call(st)
142
- st.spec_opts << '-fs'
143
- st.spec_files = FileList['spec/*.rb']
144
- end
145
-
146
-
147
-
148
- namespace :spec do
149
- Dir.glob('spec/*.rb') do |path|
150
- desc "Verify '#{path}'"
151
- Spec::Rake::SpecTask.new(File.basename(path, '.rb')) do |st|
152
- setting.call(st)
153
- st.spec_files = FileList[path]
143
+ if rspec_version then
144
+ case rspec_version
145
+ when 1
146
+ task_cls = Spec::Rake::SpecTask
147
+ rspec_opts_setting_proc = proc do |task|
148
+ task.spec_opts << '-fs'
149
+ end
150
+ when 2
151
+ task_cls = RSpec::Core::RakeTask
152
+ rspec_opts_setting_proc = proc do |task|
153
+ task.rspec_opts = ['-fs']
154
154
  end
155
+ else
156
+ raise 'unknown rspec version.'
155
157
  end
156
- end
157
-
158
- namespace :specd do
159
- Dir.glob('spec/*.rb') do |path|
160
- desc "Verify '#{path}' with specdocs."
161
- Spec::Rake::SpecTask.new(File.basename(path, '.rb')) do |st|
162
- setting.call(st)
163
- st.spec_opts << '-fs'
164
- st.spec_files = FileList[path]
158
+
159
+ # Proc for initializing each spec-tasks by common parameters
160
+ setting = proc do |st|
161
+ st.ruby_opts = %w(-Ku)
162
+ end
163
+
164
+
165
+ desc "Verify all spec files."
166
+ task_cls.new do |st|
167
+ setting.call(st)
168
+ st.pattern = 'spec/*.rb'
169
+ end
170
+
171
+ desc "Verify all spec files with specdocs."
172
+ task_cls.new(:specd) do |st|
173
+ setting.call(st)
174
+ rspec_opts_setting_proc.call(st)
175
+ st.pattern = 'spec/*.rb'
176
+ end
177
+
178
+
179
+
180
+ namespace :spec do
181
+ Dir.glob('spec/*.rb') do |path|
182
+ desc "Verify '#{path}'"
183
+ task_cls.new(File.basename(path, '.rb')) do |st|
184
+ setting.call(st)
185
+ st.pattern = path
186
+ end
165
187
  end
166
188
  end
189
+
190
+ namespace :specd do
191
+ Dir.glob('spec/*.rb') do |path|
192
+ desc "Verify '#{path}' with specdocs."
193
+ task_cls.new(File.basename(path, '.rb')) do |st|
194
+ setting.call(st)
195
+ rspec_opts_setting_proc.call(st)
196
+ st.pattern = path
197
+ end
198
+ end
199
+ end
200
+
201
+ desc '= spec + original-test'
202
+ task 'test-all' => [:spec, 'original-test']
167
203
  end
168
-
169
- desc '= spec + original-test'
170
- task 'test-all' => [:spec, 'original-test']
@@ -0,0 +1,20 @@
1
+
2
+ #==============================================================================#
3
+ # $Id: post-setup.rb,v 1.1 2006/04/27 01:25:21 yuya Exp $
4
+ #==============================================================================#
5
+
6
+ if /mswin32/ =~ RUBY_PLATFORM
7
+ File.open("bluefeather.bat", "w") { |file|
8
+ file.puts(%|@echo off|)
9
+ file.puts(%|"%~dp0ruby" -x "%~f0" %*|)
10
+ file.puts(%|goto endofruby|)
11
+ file.puts
12
+ file.write(File.read("bluefeather"))
13
+ file.puts
14
+ file.puts(%|__END__|)
15
+ file.puts(%|:endofruby|)
16
+ }
17
+ end
18
+
19
+ #==============================================================================#
20
+ #==============================================================================#
@@ -18,7 +18,7 @@
18
18
  <li><a href="http://ja.wikipedia.org/wiki/GNU_General_Public_License">Wikipedia - GNU General Public License</a></li>
19
19
  </ul>
20
20
 
21
- <p>BlueFeather への要望、ご意見、バグ報告などがありましたら、<a href="http://ruby.morphball.net/bluefeather/">BlueFeather 配布サイト</a>よりメッセージを送信していただくか、もしくは Dice(<a href="m&#x61;&#105;&#108;&#116;&#111;:&#116;&#x65;&#x74;&#x72;&#x61;&#100;&#x69;&#099;&#101;&#x40;&#103;&#109;&#x61;&#x69;&#x6C;&#046;c&#111;&#109;">&#116;&#x65;&#x74;&#x72;&#x61;&#100;&#x69;&#099;&#101;&#x40;&#103;&#109;&#x61;&#x69;&#x6C;&#046;c&#111;&#109;</a>)までメールでご連絡していただけるよう、よろしくお願いします。</p>
21
+ <p>BlueFeather への要望、ご意見、バグ報告などがありましたら、<a href="http://ruby.morphball.net/bluefeather/">BlueFeather 配布サイト</a>よりメッセージを送信していただくか、もしくは Dice(<a href="m&#097;&#x69;l&#116;&#x6F;&#058;&#116;&#101;&#x74;&#114;&#097;&#100;&#105;&#099;&#101;&#064;&#x67;&#109;&#097;&#x69;&#108;&#046;&#099;&#x6F;&#x6D;">m&#097;&#x69;l&#116;&#x6F;&#058;&#116;&#101;&#x74;&#114;&#097;&#100;&#105;&#099;&#101;&#064;&#x67;&#109;&#097;&#x69;&#108;&#046;&#099;&#x6F;&#x6D;</a>)までメールでご連絡していただけるよう、よろしくお願いします。</p>
22
22
 
23
23
  </body>
24
24
  </html>
@@ -24,7 +24,7 @@
24
24
  <p>If you want to send requests, comments, or bug reports to BlueFeather, please
25
25
  feel free to post messages from
26
26
  <a href="http://ruby.morphball.net/bluefeather/index_en.html">http://ruby.morphball.net/bluefeather/index_en.html</a> or to send mail to Dice.
27
- (<a href="&#109;&#097;&#105;&#108;&#x74;&#111;:&#116;&#x65;&#116;&#x72;&#097;&#100;&#x69;&#099;&#x65;&#x40;&#x67;m&#x61;&#105;&#x6C;&#046;&#x63;&#x6F;&#109;">&#116;&#x65;&#116;&#x72;&#097;&#100;&#x69;&#099;&#x65;&#x40;&#x67;m&#x61;&#105;&#x6C;&#046;&#x63;&#x6F;&#109;</a>)</p>
27
+ (<a href="&#x6D;&#x61;&#x69;&#108;&#x74;&#111;&#x3A;&#116;&#x65;&#x74;&#114;&#097;&#x64;&#x69;&#x63;&#x65;&#064;&#x67;&#x6D;a&#x69;&#108;&#046;&#099;&#111;&#109;">&#x6D;&#x61;&#x69;&#108;&#x74;&#111;&#x3A;&#116;&#x65;&#x74;&#114;&#097;&#x64;&#x69;&#x63;&#x65;&#064;&#x67;&#x6D;a&#x69;&#108;&#046;&#099;&#111;&#109;</a>)</p>
28
28
 
29
29
  </body>
30
30
  </html>
@@ -181,13 +181,15 @@ line same as it is parsed as code-block.
181
181
  2nd line is separators. And 3rd or later line is data.</p>
182
182
 
183
183
  <pre><code>|Name |Color |Number|
184
- |--------|-----------|------|
185
- |Apple |Red | 8|
186
- |Mandarin|Orange | 32|
184
+
185
+
186
+ fcfd1dbc26fe1eb65b18b627e8ea89e8
187
+
188
+
187
189
  </code></pre>
188
190
 
189
191
  <blockquote>
190
- <p><table>
192
+ <table>
191
193
  <thead><tr>
192
194
  <th>Name</th>
193
195
  <th>Color</th>
@@ -205,20 +207,23 @@ line same as it is parsed as code-block.
205
207
  <td>32</td>
206
208
  </tr>
207
209
  </tbody>
208
- </table></p>
210
+ </table>
209
211
  </blockquote>
210
212
 
211
213
  <p>Right borders and spaces is optional.</p>
212
214
 
213
215
  <pre><code>|Name |Color |Number
214
- |--------|-----------|------
215
- |Apple |Red |8
216
- |Mandarin|Orange |32
217
-
218
- |Name|Color|Number|
219
- |-|-|-|
220
- |Apple|Red|8|
221
- |Mandarin|Orange|32|
216
+
217
+
218
+ fcfd1dbc26fe1eb65b18b627e8ea89e8
219
+
220
+
221
+
222
+
223
+
224
+ bf9ccdcc0cb9c1c670dad6cbca029ad5
225
+
226
+
222
227
  </code></pre>
223
228
 
224
229
  <p>But, be careful, <em>left borders is NOT optional.</em> This behavior differs from PHP
@@ -228,13 +233,15 @@ Markdown Extra.</p>
228
233
  right-aligned. If colons are at left and right, the column is center-aligned.</p>
229
234
 
230
235
  <pre><code>|Name |Color |Number|
231
- |--------|:---------:|-----:|
232
- |Apple |Red | 8|
233
- |Mandarin|Orange | 32|
236
+
237
+
238
+ 694e324b969d76dea39a1c14c8d6fe79
239
+
240
+
234
241
  </code></pre>
235
242
 
236
243
  <blockquote>
237
- <p><table>
244
+ <table>
238
245
  <thead><tr>
239
246
  <th>Name</th>
240
247
  <th style="text-align: center">Color</th>
@@ -252,7 +259,7 @@ right-aligned. If colons are at left and right, the column is center-aligned.</p
252
259
  <td style="text-align: right">32</td>
253
260
  </tr>
254
261
  </tbody>
255
- </table></p>
262
+ </table>
256
263
  </blockquote>
257
264
 
258
265
  <h3 id="bfheader-a3776b29531690e7f4f451f5bdcc2ea9">Difference from PHP Markdown Extra</h3>
@@ -10,7 +10,7 @@ BlueFeather Manual
10
10
 
11
11
  -> [Japanese version (original)](../index.html)
12
12
 
13
- (2010-04-29: this document based on version 0.40)
13
+ (2013-02-12: this document based on version 0.41)
14
14
 
15
15
  BlueFeather is software for converting text written by extended Markdown like
16
16
  [PHP Markdown Extra][] to html. It is pair of command-line tool and pure Ruby
@@ -12,7 +12,7 @@
12
12
 
13
13
  <p>-> <a href="../index.html">Japanese version (original)</a></p>
14
14
 
15
- <p>(2010-04-29: this document based on version 0.40)</p>
15
+ <p>(2013-02-12: this document based on version 0.41)</p>
16
16
 
17
17
  <p>BlueFeather is software for converting text written by extended Markdown like
18
18
  <a href="http://michelf.com/projects/php-markdown/extra/">PHP Markdown Extra</a> to html. It is pair of command-line tool and pure Ruby
@@ -185,13 +185,15 @@
185
185
  1行目に項目名(ヘッダ)を、2行目に項目名とデータの区切りを、3行目以降にデータを記入してください。</p>
186
186
 
187
187
  <pre><code>|名前 |色 |個数|
188
- |------|--------|----|
189
- |りんご|赤 | 8|
190
- |みかん|オレンジ| 32|
188
+
189
+
190
+ 3e7f357d60f9294f22d53da11c533a4d
191
+
192
+
191
193
  </code></pre>
192
194
 
193
195
  <blockquote>
194
- <p><table>
196
+ <table>
195
197
  <thead><tr>
196
198
  <th>名前</th>
197
199
  <th>色</th>
@@ -209,20 +211,23 @@
209
211
  <td>32</td>
210
212
  </tr>
211
213
  </tbody>
212
- </table></p>
214
+ </table>
213
215
  </blockquote>
214
216
 
215
217
  <p>右端のパイプ記号や、セルの見た目を揃えるための空白は省略可能です。そのため、以下の例はどちらも有効です。</p>
216
218
 
217
219
  <pre><code>|名前 |色 |個数
218
- |------|--------|----
219
- |りんご|赤 | 8
220
- |みかん|オレンジ| 32
221
-
222
- |名前|色|個数|
223
- |-|-|-|
224
- |りんご|赤|8|
225
- |みかん|オレンジ|32|
220
+
221
+
222
+ 3e7f357d60f9294f22d53da11c533a4d
223
+
224
+
225
+
226
+
227
+
228
+ 41c743822aad8b2633eb368791a3de83
229
+
230
+
226
231
  </code></pre>
227
232
 
228
233
  <p>ただし、PHP Markdown Extraと異なり、<em>左端のパイプ記号は省略することができません。</em>ご注意ください。</p>
@@ -231,13 +236,15 @@
231
236
  また、両端に同じ記号を付けると中央寄せになります。</p>
232
237
 
233
238
  <pre><code>|名前 |色 |個数|
234
- |------|:------:|---:|
235
- |りんご|赤 | 8|
236
- |みかん|オレンジ| 32|
239
+
240
+
241
+ 8894f831376be36f9e7e9cb4bcb095a5
242
+
243
+
237
244
  </code></pre>
238
245
 
239
246
  <blockquote>
240
- <p><table>
247
+ <table>
241
248
  <thead><tr>
242
249
  <th>名前</th>
243
250
  <th style="text-align: center">色</th>
@@ -255,7 +262,7 @@
255
262
  <td style="text-align: right">32</td>
256
263
  </tr>
257
264
  </tbody>
258
- </table></p>
265
+ </table>
259
266
  </blockquote>
260
267
 
261
268
  <h3 id="bfheader-3178a3a6f49c04adfd258c3ff3b1874c">PHP Markdown Extra との違い</h3>
@@ -9,7 +9,7 @@ BlueFeather マニュアル
9
9
  → [English version](en/index.html)
10
10
 
11
11
 
12
- 2010-04-29 バージョン 0.40 準拠)
12
+ 2013-02-12 バージョン 0.41 準拠)
13
13
 
14
14
  BlueFeather は、拡張 Markdown 記法で書かれたテキストを html に変換するソフトウェアです。
15
15
  コマンドラインツールと、Ruby スクリプト内で変換を行うためのライブラリがセットになっています。
@@ -13,7 +13,7 @@
13
13
 
14
14
  <p>→ <a href="en/index.html">English version</a></p>
15
15
 
16
- <p>(2010-04-29 バージョン 0.40 準拠)</p>
16
+ <p>(2013-02-12 バージョン 0.41 準拠)</p>
17
17
 
18
18
  <p>BlueFeather は、拡張 Markdown 記法で書かれたテキストを html に変換するソフトウェアです。
19
19
  コマンドラインツールと、Ruby スクリプト内で変換を行うためのライブラリがセットになっています。</p>
@@ -22,14 +22,14 @@
22
22
  # Copyright (c) 2004 The FaerieMUD Consortium.
23
23
  #
24
24
  # BlueFeather:
25
- # Copyright (c) 2009 Dice
25
+ # Copyright (c) 2013 Dice
26
26
  #
27
- # BlueFeater is free software; you can redistribute it and/or modify it under
27
+ # BlueFeather is free software; you can redistribute it and/or modify it under
28
28
  # the terms of the GNU General Public License as published by the Free Software
29
29
  # Foundation; either version 2 of the License, or (at your option) any later
30
30
  # version.
31
31
  #
32
- # BlueCloth is distributed in the hope that it will be useful, but WITHOUT ANY
32
+ # BlueFeather is distributed in the hope that it will be useful, but WITHOUT ANY
33
33
  # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
34
34
  # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
35
35
 
@@ -42,9 +42,9 @@ require 'uri'
42
42
 
43
43
 
44
44
  module BlueFeather
45
- VERSION = '0.40'
46
- VERSION_NUMBER = 0.40
47
- RELEASE_DATE = '2010-04-29'
45
+ VERSION = '0.41'
46
+ VERSION_NUMBER = 0.41
47
+ RELEASE_DATE = '2013-02-12'
48
48
  VERSION_LABEL = "#{VERSION} (#{RELEASE_DATE})"
49
49
 
50
50
  UTF8_BOM = "\xef\xbb\xbf"
@@ -737,9 +737,9 @@ module BlueFeather
737
737
  text = transform_definition_lists( text, rs ) # BlueFeather Extension
738
738
  text = transform_code_blocks( text, rs )
739
739
  text = transform_block_quotes( text, rs )
740
+ text = transform_tables(text, rs)
740
741
  text = hide_html_blocks( text, rs )
741
742
 
742
- text = transform_tables(text, rs)
743
743
  text = form_paragraphs( text, rs )
744
744
 
745
745
  rs.block_transform_depth -= 1
@@ -8,8 +8,9 @@
8
8
  # Changes: [2009-02-14] adapt to BlueFeather
9
9
 
10
10
  if !defined?( BlueFeather ) || !defined?( BlueFeather::TestCase )
11
- basedir = File::dirname( __FILE__ )
12
- require File::join( basedir, 'bftestcase' )
11
+ require 'pathname'
12
+ $LOAD_PATH << Pathname.new(__FILE__).dirname.expand_path.to_s
13
+ require 'bftestcase'
13
14
  end
14
15
 
15
16
 
@@ -18,14 +19,6 @@ class BlueFeatherClassTestCase < BlueFeather::TestCase
18
19
 
19
20
  TestString = "foo"
20
21
 
21
- def test_00_class_constant
22
- printTestHeader "BlueFeather: Class Constant"
23
-
24
- assert Object::constants.include?( "BlueFeather" ),
25
- "No BlueFeather constant in Object"
26
- assert_instance_of Module, BlueFeather
27
- end
28
-
29
22
  def test_01_instantiation
30
23
  printTestHeader "BlueFeather: Instantiation"
31
24
  rval = nil
@@ -36,7 +29,5 @@ class BlueFeatherClassTestCase < BlueFeather::TestCase
36
29
  }
37
30
 
38
31
  end
39
-
40
-
41
32
  end
42
33
 
@@ -8,8 +8,9 @@
8
8
  # Changes: [2009-02-14] adapt to BlueFeather
9
9
 
10
10
  if !defined?( BlueFeather ) || !defined?( BlueFeather::TestCase )
11
- basedir = File::dirname( __FILE__ )
12
- require File::join( basedir, 'bftestcase' )
11
+ require 'pathname'
12
+ $LOAD_PATH << Pathname.new(__FILE__).dirname.expand_path.to_s
13
+ require 'bftestcase'
13
14
  end
14
15
 
15
16
 
@@ -8,8 +8,9 @@
8
8
  # Changes: [2009-02-14] adapt to BlueFeather
9
9
 
10
10
  if !defined?( BlueFeather ) || !defined?( BlueFeather::TestCase )
11
- basedir = File::dirname( __FILE__ )
12
- require File::join( basedir, 'bftestcase' )
11
+ require 'pathname'
12
+ $LOAD_PATH << Pathname.new(__FILE__).dirname.expand_path.to_s
13
+ require 'bftestcase'
13
14
  end
14
15
 
15
16
 
@@ -10,8 +10,9 @@
10
10
  # Changes: [2009-02-14] adapt to BlueFeather
11
11
 
12
12
  if !defined?( BlueFeather ) || !defined?( BlueFeather::TestCase )
13
- basedir = File::dirname( __FILE__ )
14
- require File::join( basedir, 'bftestcase' )
13
+ require 'pathname'
14
+ $LOAD_PATH << Pathname.new(__FILE__).dirname.expand_path.to_s
15
+ require 'bftestcase'
15
16
  end
16
17
 
17
18
 
@@ -40,7 +40,7 @@
40
40
  #
41
41
  # == Remakers
42
42
  #
43
- # * Dice <tetradice.1011@gmail.com> (BlueFeather => BlueFeather)
43
+ # * Dice <tetradice@gmail.com> (BlueCloth => BlueFeather)
44
44
  #
45
45
  #:include: COPYRIGHT
46
46
  #
@@ -87,6 +87,7 @@ module BlueFeather
87
87
  end
88
88
  }
89
89
  klass.methodCounter = 0
90
+ super
90
91
  end
91
92
 
92
93
 
@@ -225,7 +226,6 @@ module BlueFeather
225
226
  olddb = $DEBUG
226
227
  $DEBUG = true
227
228
  end
228
-
229
229
  super
230
230
 
231
231
  $DEBUG = olddb unless olddb.nil?
@@ -2,8 +2,9 @@
2
2
  # additional test: since BlueFeather 0.32
3
3
 
4
4
  if !defined?( BlueFeather ) || !defined?( BlueFeather::TestCase )
5
- basedir = File::dirname( __FILE__ )
6
- require File::join( basedir, 'bftestcase' )
5
+ require 'pathname'
6
+ $LOAD_PATH << Pathname.new(__FILE__).dirname.expand_path.to_s
7
+ require 'bftestcase'
7
8
  end
8
9
 
9
10
 
@@ -22,7 +22,7 @@ Run setup.rb on ruby-installed PC.
22
22
 
23
23
  License
24
24
  ----
25
- GPL (General Public License) version2
25
+ GPL (General Public License) version 2 or later
26
26
 
27
27
 
28
28
 
@@ -18,7 +18,7 @@ ruby のインストールされたPCで、付属している setup.rb を実行
18
18
 
19
19
  ライセンス
20
20
  ----
21
- GPL(General Public License)のバージョン2に従います。
21
+ GPL(General Public License)のバージョン2、またはそれ以降のバージョンに従います。
22
22
 
23
23
 
24
24
 
@@ -96,7 +96,7 @@ describe "Document Header (Header-ID-Type:)" do
96
96
 
97
97
  %w(escape Escape ESCAPE).each do |value|
98
98
  specify value do
99
- doc = BlueFeather::Document.new({'Header-ID-Type' => value}, '')
99
+ doc = BlueFeather::Document.new({'Header-ID-Type' => value})
100
100
  doc.header_id_type.should == BlueFeather::HeaderIDType::ESCAPE
101
101
  end
102
102
  end
@@ -31,6 +31,10 @@ describe 'Simple Table:' do
31
31
  cells[2]['style'].should == 'text-align: center'
32
32
  end
33
33
  end
34
+
35
+ specify "purity" do
36
+ @doc.should_not have_element('p table')
37
+ end
34
38
  end
35
39
 
36
40
 
@@ -17,8 +17,8 @@ if RUBY_PLATFORM =~ /win|mingw/ then
17
17
  File.exist?(@unix_path).should be_true
18
18
  File.exist?(@dos_path).should be_true
19
19
 
20
- system("ruby -I #{@lib_dir} #{@cmd_path} --verbose #{@unix_path}").should be_true
21
- system("ruby -I #{@lib_dir} #{@cmd_path} --verbose #{@dos_path}").should be_true
20
+ system("ruby -I #{@lib_dir} #{@cmd_path} --quiet #{@unix_path}").should be_true
21
+ system("ruby -I #{@lib_dir} #{@cmd_path} --quiet #{@dos_path}").should be_true
22
22
  end
23
23
 
24
24
  after do
@@ -0,0 +1,31 @@
1
+ require 'pathname'
2
+ require(Pathname.new(__FILE__).parent + 'lib/common.rb')
3
+
4
+ if RUBY_PLATFORM =~ /win|mingw/ then
5
+
6
+ describe 'DOS Pathname:' do
7
+
8
+ before do
9
+ @prefix = File.expand_path(File.dirname(__FILE__))
10
+ @unix_path = "#{@prefix}/text/encoding_sample_default.bfdoc"
11
+ @dos_path = "#{@prefix.gsub('/', '\\')}\\text\\encoding_sample_default.bfdoc"
12
+ @cmd_path = Pathname.new(__FILE__).parent.parent + 'bin/bluefeather'
13
+ @lib_dir = Pathname.new(__FILE__).parent.parent + 'lib'
14
+ end
15
+
16
+ specify 'command run' do
17
+ File.exist?(@unix_path).should be_true
18
+ File.exist?(@dos_path).should be_true
19
+
20
+ system("ruby -I #{@lib_dir} #{@cmd_path} --verbose #{@unix_path}").should be_true
21
+ system("ruby -I #{@lib_dir} #{@cmd_path} --verbose #{@dos_path}").should be_true
22
+ end
23
+
24
+ after do
25
+ dest = @unix_path.sub(/.bfdoc$/, '.html')
26
+ File.unlink(dest) if File.exist?(dest)
27
+ end
28
+ end
29
+ else
30
+ puts "spec/win32.rb skipped."
31
+ end
metadata CHANGED
@@ -1,32 +1,33 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bluefeather
3
- version: !ruby/object:Gem::Version
4
- version: "0.40"
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.41'
5
+ prerelease:
5
6
  platform: ruby
6
- authors:
7
+ authors:
7
8
  - Dice
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2010-04-29 00:00:00 +09:00
13
- default_executable:
12
+ date: 2013-02-11 00:00:00.000000000 Z
14
13
  dependencies: []
14
+ description: ! ' BlueFeather is software for converting text written by extended Markdown
15
+ to
16
+
17
+ html. It is pair of command-line tool and pure Ruby library.
15
18
 
16
- description: " BlueFeather is software for converting text written by extended Markdown to\n\
17
- html. It is pair of command-line tool and pure Ruby library.\n"
19
+ '
18
20
  email: tetradice@gmail.com
19
- executables:
21
+ executables:
20
22
  - bluefeather
21
23
  extensions: []
22
-
23
24
  extra_rdoc_files: []
24
-
25
- files:
25
+ files:
26
26
  - readme_en.txt
27
27
  - readme_ja.txt
28
28
  - Rakefile.rb
29
29
  - bin/bluefeather
30
+ - bin/post-setup.rb
30
31
  - lib/bluefeather.rb
31
32
  - lib/bluefeather/cui.rb
32
33
  - license/gpl-2.0.txt
@@ -50,6 +51,7 @@ files:
50
51
  - spec/toc.rb
51
52
  - spec/warning.rb
52
53
  - spec/win32.rb
54
+ - spec/win32.~rb
53
55
  - original-tests/00_Class.tests.rb
54
56
  - original-tests/05_Markdown.tests.rb
55
57
  - original-tests/10_Bug.tests.rb
@@ -96,33 +98,28 @@ files:
96
98
  - doc/index.html
97
99
  - doc/metadata-reference.bfdoc
98
100
  - doc/metadata-reference.html
99
- has_rdoc: true
100
101
  homepage: http://ruby.morphball.net/bluefeather/
101
102
  licenses: []
102
-
103
103
  post_install_message:
104
104
  rdoc_options: []
105
-
106
- require_paths:
105
+ require_paths:
107
106
  - lib
108
- required_ruby_version: !ruby/object:Gem::Requirement
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
107
+ required_ruby_version: !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ! '>='
111
+ - !ruby/object:Gem::Version
112
112
  version: 1.8.1
113
- version:
114
- required_rubygems_version: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - ">="
117
- - !ruby/object:Gem::Version
118
- version: "0"
119
- version:
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
120
119
  requirements: []
121
-
122
120
  rubyforge_project: bluefeather
123
- rubygems_version: 1.3.5
121
+ rubygems_version: 1.8.24
124
122
  signing_key:
125
123
  specification_version: 3
126
124
  summary: Extend Markdown Converter
127
125
  test_files: []
128
-