bluecloth 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/rake/helpers.rb CHANGED
@@ -125,8 +125,8 @@ end
125
125
 
126
126
  ### Download the file at +sourceuri+ via HTTP and write it to +targetfile+.
127
127
  def download( sourceuri, targetfile=nil )
128
- oldsync = $defout.sync
129
- $defout.sync = true
128
+ oldsync = $stdout.sync
129
+ $stdout.sync = true
130
130
  require 'open-uri'
131
131
 
132
132
  targetpath = Pathname.new( targetfile )
@@ -153,7 +153,7 @@ def download( sourceuri, targetfile=nil )
153
153
 
154
154
  return targetpath
155
155
  ensure
156
- $defout.sync = oldsync
156
+ $stdout.sync = oldsync
157
157
  end
158
158
 
159
159
 
data/rake/packaging.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Packaging Rake Tasks
3
- # $Id: packaging.rb 92 2009-03-13 23:40:08Z deveiant $
3
+ # $Id: packaging.rb 99 2009-04-14 13:03:03Z deveiant $
4
4
  #
5
5
 
6
6
  require 'rbconfig'
@@ -16,8 +16,7 @@ Rake::PackageTask.new( PKG_NAME, PKG_VERSION ) do |task|
16
16
  task.need_tar_bz2 = true
17
17
  task.need_zip = true
18
18
  task.package_dir = PKGDIR.to_s
19
- task.package_files = RELEASE_FILES.
20
- collect {|f| f.relative_path_from(BASEDIR).to_s }
19
+ task.package_files = RELEASE_FILES.collect {|f| f.to_s }
21
20
  end
22
21
  task :package => [:gem]
23
22
 
data/rake/testing.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Rake tasklib for testing tasks
3
- # $Id: testing.rb 97 2009-04-03 17:02:28Z deveiant $
3
+ # $Id: testing.rb 99 2009-04-14 13:03:03Z deveiant $
4
4
  #
5
5
  # Authors:
6
6
  # * Michael Granger <ged@FaerieMUD.org>
@@ -47,7 +47,6 @@ begin
47
47
  ### Task: spec
48
48
  desc "Run specs"
49
49
  task :spec => 'spec:doc'
50
- specfiles = SPEC_FILES.collect {|pn| pn.to_s }
51
50
 
52
51
  namespace :spec do
53
52
  desc "Run rspec every time there's a change to one of the files"
@@ -60,25 +59,25 @@ begin
60
59
 
61
60
  desc "Generate regular color 'doc' spec output"
62
61
  Spec::Rake::SpecTask.new( :doc ) do |task|
63
- task.spec_files = specfiles
62
+ task.spec_files = SPEC_FILES
64
63
  task.spec_opts = COMMON_SPEC_OPTS + ['-f', 's', '-c']
65
64
  end
66
65
 
67
66
  desc "Generate spec output with profiling"
68
67
  Spec::Rake::SpecTask.new( :profile ) do |task|
69
- task.spec_files = specfiles
68
+ task.spec_files = SPEC_FILES
70
69
  task.spec_opts = COMMON_SPEC_OPTS + ['-f', 'o']
71
70
  end
72
71
 
73
72
  desc "Generate quiet non-colored plain-text output"
74
73
  Spec::Rake::SpecTask.new( :quiet ) do |task|
75
- task.spec_files = specfiles
74
+ task.spec_files = SPEC_FILES
76
75
  task.spec_opts = COMMON_SPEC_OPTS + ['-f', 'p']
77
76
  end
78
77
 
79
78
  desc "Generate HTML output"
80
79
  Spec::Rake::SpecTask.new( :html ) do |task|
81
- task.spec_files = specfiles
80
+ task.spec_files = SPEC_FILES
82
81
  task.spec_opts = COMMON_SPEC_OPTS + ['-f', 'h']
83
82
  end
84
83
 
data/rake/win32.rb CHANGED
@@ -56,7 +56,7 @@ CONFIGURE_CMD = %W[
56
56
  ./configure
57
57
  --host=i386-mingw32
58
58
  --target=i386-mingw32
59
- --build=#{Config::CONFIG['build']}
59
+ --build=#{Gem::Platform.local}
60
60
  --prefix=#{XCOMPILER_DIR}
61
61
  ]
62
62
 
@@ -144,7 +144,7 @@ begin
144
144
  run *CONFIGURE_CMD
145
145
  run 'make', 'ruby'
146
146
  run 'make', 'rubyw.exe'
147
- run 'make', 'install'
147
+ run 'make', '-n', 'install'
148
148
  end
149
149
  end
150
150
 
@@ -4,10 +4,10 @@
4
4
  BEGIN {
5
5
  require 'pathname'
6
6
  basedir = Pathname.new( __FILE__ ).dirname.parent
7
-
7
+
8
8
  libdir = basedir + 'lib'
9
9
  extdir = basedir + 'ext'
10
-
10
+
11
11
  $LOAD_PATH.unshift( libdir ) unless $LOAD_PATH.include?( libdir )
12
12
  $LOAD_PATH.unshift( extdir ) unless $LOAD_PATH.include?( extdir )
13
13
  }
@@ -46,33 +46,33 @@ describe BlueCloth do
46
46
  :header_labels => true,
47
47
  :pandoc_headers => false
48
48
  )
49
-
49
+
50
50
  ( flags & BlueCloth::MKD_NOLINKS ).should be_nonzero()
51
51
  ( flags & BlueCloth::MKD_TOC ).should be_nonzero()
52
52
  ( flags & BlueCloth::MKD_NOHEADER ).should be_nonzero()
53
53
  end
54
-
55
-
54
+
55
+
56
56
  it "allows output to be rendered several times" do
57
57
  bc = BlueCloth.new( "Some text" )
58
58
  bc.to_html.should == bc.to_html
59
59
  end
60
-
61
-
60
+
61
+
62
62
  it "correctly applies the :remove_links option to the output" do
63
63
  input = "An [example](http://url.com/). A <a href='http://example.com/'>link</a>."
64
64
  expected = "<p>An [example](http://url.com/). A &lt;a href='http://example.com/'>link</a>.</p>"
65
65
 
66
66
  the_markdown( input, :remove_links => true ).should be_transformed_into( expected )
67
67
  end
68
-
68
+
69
69
  it "correctly applies the :remove_images option to the output" do
70
70
  input = %{An ![alt text](/path/img.jpg "Title"). An <img href='http://example.com/1.jpg' />.}
71
71
  expected = %{<p>An ![alt text](/path/img.jpg "Title"). An &lt;img href='http://example.com/1.jpg' />.</p>}
72
72
 
73
73
  the_markdown( input, :remove_images => true ).should be_transformed_into( expected )
74
74
  end
75
-
75
+
76
76
  it "correctly applies the :smartypants option to the output" do
77
77
  input = %{He was known to frequent that "other establishment"...}
78
78
  expected = %{<p>He was known to frequent that &ldquo;other establishment&rdquo;&hellip;</p>}
@@ -82,10 +82,10 @@ describe BlueCloth do
82
82
 
83
83
 
84
84
  describe "Discount extensions" do
85
-
85
+
86
86
  it "correctly applies the :pandoc_headers option" do
87
87
  input = "% title\n% author1, author2\n% date\n\nStuff."
88
-
88
+
89
89
  bc = BlueCloth.new( input, :pandoc_headers => true )
90
90
  bc.header.should == {
91
91
  :title => 'title',
@@ -101,14 +101,14 @@ describe BlueCloth do
101
101
 
102
102
  the_markdown( input, :pseudoprotocols => true ).should be_transformed_into( expected )
103
103
  end
104
-
104
+
105
105
  it "correctly expands class: links when :pseudoprotocols are enabled" do
106
106
  input = "It was [just as he said](class:foo) it would be."
107
107
  expected = %{<p>It was <span class="foo">just as he said</span> it would be.</p>}
108
108
 
109
109
  the_markdown( input, :pseudoprotocols => true ).should be_transformed_into( expected )
110
110
  end
111
-
111
+
112
112
  it "correctly expands raw: links when :pseudoprotocols are enabled" do
113
113
  input = %{I have node idea [what this is for](raw:really "but") it's here.}
114
114
  expected = %{<p>I have node idea really it's here.</p>}
@@ -123,7 +123,7 @@ describe BlueCloth do
123
123
 
124
124
  the_markdown( input, :header_labels => true ).should be_transformed_into( expected )
125
125
  end
126
-
126
+
127
127
  it "expands superscripts when :strict_mode is disabled" do
128
128
  input = %{It used to be that E = mc^2 used to be the province of physicists.}
129
129
  expected = %{<p>It used to be that E = mc<sup>2</sup> used to be the province} +
@@ -134,7 +134,7 @@ describe BlueCloth do
134
134
  the_markdown( input, :strict_mode => false ).should be_transformed_into( expected )
135
135
  the_markdown( input, :strict_mode => true ).should be_transformed_into( strict )
136
136
  end
137
-
137
+
138
138
  it "uses relaxed emphasis when :strict_mode is disabled" do
139
139
  input = %{If you use size_t instead, you _won't_ have to worry as much about portability.}
140
140
  expected = %{<p>If you use size_t instead, you <em>won't</em> have to worry as much about portability.</p>}
@@ -143,7 +143,7 @@ describe BlueCloth do
143
143
  the_markdown( input, :strict_mode => false ).should be_transformed_into( expected )
144
144
  the_markdown( input, :strict_mode => true ).should be_transformed_into( strict )
145
145
  end
146
-
146
+
147
147
  end
148
148
 
149
149
  ### Test email address output
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bluecloth
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-29 00:00:00 -07:00
12
+ date: 2009-05-14 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -248,6 +248,8 @@ files:
248
248
  - LICENSE.discount
249
249
  has_rdoc: true
250
250
  homepage: http://deveiate.org/projects/BlueCloth/
251
+ licenses: []
252
+
251
253
  post_install_message:
252
254
  rdoc_options:
253
255
  - -w
@@ -280,7 +282,7 @@ requirements: []
280
282
  rubyforge_project: bluecloth
281
283
  rubygems_version: 1.3.1
282
284
  signing_key:
283
- specification_version: 2
285
+ specification_version: 3
284
286
  summary: BlueCloth is a Ruby implementation of Markdown
285
287
  test_files:
286
288
  - spec/bluecloth/101_changes_spec.rb