wikitext 3.1 → 4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2fd1ae53b44a2354ca48f9d35a39469391285573
4
+ data.tar.gz: 46c2fbe593fce24f6d60c9911a47687b9c0475b1
5
+ SHA512:
6
+ metadata.gz: 11d2fc71a0c9a92ec23612c6edc2187ec38f9886c1fc0bf1a1e6ef8a8df7019fee9825ab06866cb140a3f66233e2d58f2288cdba5a61618cd0bae2d54de5d7a0
7
+ data.tar.gz: ae8c79c38d2bc463e1c1e42114e139816295a371896f7e5e3c7df7299541c83c87910390acb1fec52225ac6c19a729cd0348d6754022ee1d05946e5e6a0ed431
data/ext/extconf.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright 2008-2009 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2008-2013 Wincent Colaiuta. All rights reserved.
2
2
  #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions are met:
@@ -29,10 +29,8 @@ def missing item
29
29
  end
30
30
 
31
31
  case RUBY_VERSION
32
- when /\A1\.8/
33
- $CFLAGS += ' -DRUBY_1_8_x'
34
- when /\A1\.9/
35
- $CFLAGS += ' -DRUBY_1_9_x'
32
+ when /\A2\.0/
33
+ $CFLAGS += ' -DRUBY_2_0_x'
36
34
  else
37
35
  raise "unsupported Ruby version: #{RUBY_VERSION}"
38
36
  end
data/ext/parser.c CHANGED
@@ -476,7 +476,7 @@ void wiki_append_hyperlink(parser_t *parser, VALUE link_prefix, str_t *link_targ
476
476
  }
477
477
  }
478
478
 
479
- void wiki_append_img(parser_t *parser, char *token_ptr, int token_len)
479
+ void wiki_append_img(parser_t *parser, char *token_ptr, long token_len)
480
480
  {
481
481
  str_append(parser->output, img_start, sizeof(img_start) - 1); // <img src="
482
482
  if (!NIL_P(parser->img_prefix) && *token_ptr != '/') // len always > 0
@@ -1483,7 +1483,7 @@ VALUE Wikitext_parser_parse(int argc, VALUE *argv, VALUE self)
1483
1483
  j = parser->scope->count;
1484
1484
  for (j = j - 1; j >= 0; j--)
1485
1485
  {
1486
- int val = ary_entry(parser->scope, j);
1486
+ int val = ary_entry(parser->scope, (int)j);
1487
1487
  if (val == STRONG || val == STRONG_START)
1488
1488
  {
1489
1489
  str_append(output, strong_end, sizeof(strong_end) - 1);
@@ -1776,8 +1776,8 @@ VALUE Wikitext_parser_parse(int argc, VALUE *argv, VALUE self)
1776
1776
  // want to compare line with scope but can only do so if scope has enough items on it
1777
1777
  if (j >= i)
1778
1778
  {
1779
- if (ary_entry(parser->scope, i + bq_count - 2) == type &&
1780
- ary_entry(parser->scope, i + bq_count - 1) == LI)
1779
+ if (ary_entry(parser->scope, (int)(i + bq_count - 2)) == type &&
1780
+ ary_entry(parser->scope, (int)(i + bq_count - 1)) == LI)
1781
1781
  {
1782
1782
  // line and scope match at this point: do nothing yet
1783
1783
  }
@@ -2345,7 +2345,7 @@ VALUE Wikitext_parser_parse(int argc, VALUE *argv, VALUE self)
2345
2345
  {
2346
2346
  // peek ahead to see next token
2347
2347
  char *token_ptr = token->start;
2348
- int token_len = TOKEN_LEN(token);
2348
+ long token_len = TOKEN_LEN(token);
2349
2349
  NEXT_TOKEN();
2350
2350
  type = token->type;
2351
2351
  if ((type == H6_END && IN(H6_START)) ||
@@ -2585,21 +2585,11 @@ return_output:
2585
2585
  str_append(parser->output, null_str, 1); // null-terminate
2586
2586
  len = parser->output->len - 1; // don't count null termination
2587
2587
 
2588
- #if defined(RUBY_1_9_x)
2589
2588
  VALUE out = rb_str_buf_new(RSTRING_EMBED_LEN_MAX + 1);
2590
2589
  free(RSTRING_PTR(out));
2591
2590
  RSTRING(out)->as.heap.aux.capa = len;
2592
2591
  RSTRING(out)->as.heap.ptr = parser->output->ptr;
2593
2592
  RSTRING(out)->as.heap.len = len;
2594
- #elif defined(RUBY_1_8_x)
2595
- VALUE out = rb_str_new2("");
2596
- free(RSTRING_PTR(out));
2597
- RSTRING(out)->len = len;
2598
- RSTRING(out)->aux.capa = len;
2599
- RSTRING(out)->ptr = parser->output->ptr;
2600
- #else
2601
- #error unsupported RUBY_VERSION
2602
- #endif
2603
2593
  parser->output->ptr = NULL; // don't double-free
2604
2594
  return out;
2605
2595
  }
data/ext/str.c CHANGED
@@ -54,7 +54,9 @@ str_t *str_new_from_string(VALUE string)
54
54
 
55
55
  VALUE string_from_str(str_t *str)
56
56
  {
57
- return rb_str_new(str->ptr, str->len);
57
+ VALUE string = rb_str_new(str->ptr, str->len);
58
+ rb_funcall(string, rb_intern("force_encoding"), 1, rb_str_new2("UTF-8"));
59
+ return string;
58
60
  }
59
61
 
60
62
  void str_grow(str_t *str, long len)
@@ -22,5 +22,5 @@
22
22
  # POSSIBILITY OF SUCH DAMAGE.
23
23
 
24
24
  module Wikitext
25
- VERSION = '3.1'
25
+ VERSION = '4.0'
26
26
  end # module Wikitext
@@ -1,4 +1,4 @@
1
- # Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2007-2013 Wincent Colaiuta. All rights reserved.
2
2
  #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions are met:
@@ -22,7 +22,6 @@
22
22
  # POSSIBILITY OF SUCH DAMAGE.
23
23
 
24
24
  require 'spec_helper'
25
- require 'iconv'
26
25
 
27
26
  describe Wikitext, 'with invalidly encoded input' do
28
27
  before do
@@ -1,5 +1,4 @@
1
- # encoding: utf-8
2
- # Copyright 2007-2012 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2007-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
5
4
  # modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,4 @@
1
- # encoding: utf-8
2
- # Copyright 2008-2010 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2008-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
5
4
  # modification, are permitted provided that the following conditions are met:
data/spec/img_spec.rb CHANGED
@@ -1,5 +1,4 @@
1
- # encoding: utf-8
2
- # Copyright 2008-2010 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2008-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
5
4
  # modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,4 @@
1
- # encoding: utf-8
2
- # Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2007-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
5
4
  # modification, are permitted provided that the following conditions are met:
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  # Copyright 2007-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
@@ -166,16 +165,14 @@ describe Wikitext::Parser, 'internal links (space to underscore off)' do
166
165
  lambda { @parser.parse('[[foo]]', :link_proc => lambda { |target| raise 'bar' }) }.should raise_error(RuntimeError, /bar/)
167
166
  end
168
167
 
169
- it 'should complain if the link proc returns a non-stringy object (Proc object version)' do
170
- lambda {
171
- @parser.parse '[[foo]]', :link_proc => Proc.new { 1 }
172
- }.should raise_error(TypeError, /can't convert/)
168
+ it 'complains if the link proc returns a non-stringy object (Proc object version)' do
169
+ expect { @parser.parse '[[foo]]', link_proc: proc { 1 } }.
170
+ to raise_error(TypeError)
173
171
  end
174
172
 
175
- it 'should complain if the link proc returns a non-stringy object (lambda version)' do
176
- lambda {
177
- @parser.parse '[[foo]]', :link_proc => lambda { 1 }
178
- }.should raise_error(TypeError, /can't convert/)
173
+ it 'complains if the link proc returns a non-stringy object (lambda version)' do
174
+ expect { @parser.parse '[[foo]]', link_proc: lambda { |target| 1 } }.
175
+ to raise_error(TypeError)
179
176
  end
180
177
 
181
178
  # a couple of Ruby's idiosynchrasies: different behaviour of lambdas and Procs
@@ -191,16 +188,16 @@ describe Wikitext::Parser, 'internal links (space to underscore off)' do
191
188
  }.should raise_error(ArgumentError, /wrong number/)
192
189
  end
193
190
 
194
- it 'should complain when "return" is used inside a "Proc.new" block' do
195
- lambda {
196
- @parser.parse '[[foo]]', :link_proc => Proc.new { return 'bar' }
197
- }.should raise_error(LocalJumpError)
191
+ it 'complains when "return" is used inside a "Proc.new" block' do
192
+ expect {
193
+ @parser.parse '[[foo]]', link_proc: proc { return 'bar' }
194
+ }.to raise_error(LocalJumpError)
198
195
  end
199
196
 
200
197
  it 'should not complain when "return" is used inside a lambda' do
201
- lambda {
202
- @parser.parse '[[foo]]', :link_proc => lambda { return 'bar' }
203
- }.should_not raise_error(LocalJumpError)
198
+ expect {
199
+ @parser.parse '[[foo]]', link_proc: lambda { return 'bar' }
200
+ }.to_not raise_error(LocalJumpError)
204
201
  end
205
202
 
206
203
  it 'should interact correctly with spaces in link targets (Proc object version)' do
@@ -227,10 +224,10 @@ describe Wikitext::Parser, 'internal links (space to underscore off)' do
227
224
  @parser.parse('[[foo a|hello]] [[bar b|world]]', :link_proc => link_proc).should == expected
228
225
  end
229
226
 
230
- it 'should handle link targets with encoded parts (Proc object version)' do
231
- link_proc = Proc.new { |target| target == 'información' ? 'redlink' : nil }
227
+ it 'handles link targets with encoded parts (Proc object version)' do
228
+ link_proc = proc { |target| target == 'información' ? 'redlink' : nil }
232
229
  expected = %Q{<p><a href="/wiki/informaci%c3%b3n" class="redlink">informaci&#x00f3;n</a> <a href="/wiki/bar">bar</a></p>\n}
233
- @parser.parse('[[información]] [[bar]]', :link_proc => link_proc).should == expected
230
+ @parser.parse('[[información]] [[bar]]', link_proc: link_proc).should == expected
234
231
  end
235
232
 
236
233
  it 'should handle link targets with encoded parts (lambda version)' do
@@ -706,41 +703,39 @@ describe Wikitext::Parser, 'internal links (space to underscore on)' do
706
703
  lambda { @parser.parse('[[foo]]', :link_proc => lambda { |target| raise 'bar' }) }.should raise_error(RuntimeError, /bar/)
707
704
  end
708
705
 
709
- it 'should complain if the link proc returns a non-stringy object (Proc object version)' do
710
- lambda {
711
- @parser.parse '[[foo]]', :link_proc => Proc.new { 1 }
712
- }.should raise_error(TypeError, /can't convert/)
706
+ it 'complains if the link proc returns a non-stringy object (Proc object version)' do
707
+ expect { @parser.parse '[[foo]]', link_proc: proc { 1 } }.
708
+ to raise_error(TypeError)
713
709
  end
714
710
 
715
- it 'should complain if the link proc returns a non-stringy object (lambda version)' do
716
- lambda {
717
- @parser.parse '[[foo]]', :link_proc => lambda { 1 }
718
- }.should raise_error(TypeError, /can't convert/)
711
+ it 'complains if the link proc returns a non-stringy object (lambda version)' do
712
+ expect { @parser.parse '[[foo]]', link_proc: lambda { |target| 1 } }.
713
+ to raise_error(TypeError)
719
714
  end
720
715
 
721
716
  # a couple of Ruby's idiosynchrasies: different behaviour of lambdas and Procs
722
717
  it 'should not complain if the Proc object accepts too many arguments' do
723
718
  lambda {
724
- @parser.parse '[[foo]]', :link_proc => Proc.new { |a,b| }
719
+ @parser.parse '[[foo]]', :link_proc => Proc.new { |a, b| }
725
720
  }.should_not raise_error(ArgumentError, /wrong number/)
726
721
  end
727
722
 
728
723
  it 'should complain if the lambda accepts too many arguments' do
729
724
  lambda {
730
- @parser.parse '[[foo]]', :link_proc => lambda { |a,b| }
725
+ @parser.parse '[[foo]]', :link_proc => lambda { |a, b| }
731
726
  }.should raise_error(ArgumentError, /wrong number/)
732
727
  end
733
728
 
734
729
  it 'should complain when "return" is used inside a "Proc.new" block' do
735
- lambda {
730
+ expect {
736
731
  @parser.parse '[[foo]]', :link_proc => Proc.new { return 'bar' }
737
- }.should raise_error(LocalJumpError)
732
+ }.to raise_error(LocalJumpError)
738
733
  end
739
734
 
740
735
  it 'should not complain when "return" is used inside a lambda' do
741
- lambda {
736
+ expect {
742
737
  @parser.parse '[[foo]]', :link_proc => lambda { return 'bar' }
743
- }.should_not raise_error(LocalJumpError)
738
+ }.to_not raise_error(LocalJumpError)
744
739
  end
745
740
 
746
741
  it 'should interact correctly with spaces in link targets (Proc object version)' do
@@ -773,10 +768,10 @@ describe Wikitext::Parser, 'internal links (space to underscore on)' do
773
768
  @parser.parse('[[información]] [[bar]]', :link_proc => link_proc).should == expected
774
769
  end
775
770
 
776
- it 'should handle link targets with encoded parts (lambda version)' do
771
+ it 'handles link targets with encoded parts (lambda version)' do
777
772
  link_proc = lambda { |target| target == 'información' ? 'redlink' : nil }
778
773
  expected = %Q{<p><a href="/wiki/informaci%c3%b3n" class="redlink">informaci&#x00f3;n</a> <a href="/wiki/bar">bar</a></p>\n}
779
- @parser.parse('[[información]] [[bar]]', :link_proc => link_proc).should == expected
774
+ @parser.parse('[[información]] [[bar]]', link_proc: link_proc).should == expected
780
775
  end
781
776
  end
782
777
 
@@ -1,5 +1,4 @@
1
- # encoding: utf-8
2
- # Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2007-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
5
4
  # modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,4 @@
1
- # encoding: utf-8
2
- # Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2007-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
5
4
  # modification, are permitted provided that the following conditions are met:
data/spec/nowiki_spec.rb CHANGED
@@ -1,5 +1,4 @@
1
- # encoding: utf-8
2
- # Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2007-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
5
4
  # modification, are permitted provided that the following conditions are met:
data/spec/pre_spec.rb CHANGED
@@ -1,5 +1,4 @@
1
- # encoding: utf-8
2
- # Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2007-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
5
4
  # modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,4 @@
1
- # encoding: utf-8
2
- # Copyright 2008-2011 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2008-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
5
4
  # modification, are permitted provided that the following conditions are met:
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2007-2013 Wincent Colaiuta. All rights reserved.
2
2
  #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions are met:
@@ -26,9 +26,9 @@ require 'rspec'
26
26
 
27
27
  # allow indenting of multiline spec data for better readability
28
28
  # but must dedent it before actually doing the comparison
29
- def dedent spaces, string = nil
29
+ def dedent(spaces, string = nil)
30
30
  if spaces.kind_of? String
31
- if not string.nil?
31
+ if !string.nil?
32
32
  raise 'When first argument is a String, second argument must be nil'
33
33
  else
34
34
  # default use: single String parameter, dedent by 6
@@ -36,14 +36,14 @@ def dedent spaces, string = nil
36
36
  spaces = 6
37
37
  end
38
38
  elsif spaces.kind_of? Integer
39
- if string.nil? or not string.kind_of?(String)
39
+ if string.nil? || !string.kind_of?(String)
40
40
  raise 'When first argument is a number, second must be a String'
41
41
  end
42
42
  else
43
43
  raise 'Invalid argument'
44
44
  end
45
45
  string.each_line do |line|
46
- if not line =~ /\A {#{spaces.to_i}}/
46
+ if line !~ /\A {#{spaces.to_i}}/
47
47
  raise "Underlength indent for line: #{line.inspect}"
48
48
  end
49
49
  end
@@ -51,32 +51,30 @@ def dedent spaces, string = nil
51
51
  end
52
52
 
53
53
  # prepend local directories to search path if not already present
54
- basedir = Pathname.new(__FILE__).dirname + '..'
54
+ basedir = Pathname.new(__dir__) + '..'
55
55
  extdir = (basedir + 'ext').realpath
56
56
  libdir = (basedir + 'lib').realpath
57
57
  normalized = $:.map { |path| Pathname.new(path).realpath rescue path }
58
58
  [libdir, extdir].each { |d| $:.unshift(d) unless normalized.include?(d) }
59
59
 
60
60
  module UTF8
61
- if not const_defined? 'Invalid'
62
- module Invalid
63
- TWO_BYTES_MISSING_SECOND_BYTE = [0b11011111].pack('C*')
64
- TWO_BYTES_MALFORMED_SECOND_BYTE = [0b11011111, 0b00001111].pack('C*') # should be 10......
65
- OVERLONG = [0b11000000, 0b10000000].pack('C*') # lead byte is 110..... but code point is <= 127
66
- OVERLONG_ALT = [0b11000001, 0b10000000].pack('C*') # lead byte is 110..... but code point is <= 127
67
- THREE_BYTES_MISSING_SECOND_BYTE = [0b11100000].pack('C*')
68
- THREE_BYTES_MISSING_THIRD_BYTE = [0b11100000, 0b10000000].pack('C*')
69
- THREE_BYTES_MALFORMED_SECOND_BYTE = [0b11100000, 0b00001111, 0b10000000].pack('C*') # should be 10......
70
- THREE_BYTES_MALFORMED_THIRD_BYTE = [0b11100000, 0b10000000, 0b00001111].pack('C*') # should be 10......
71
- FOUR_BYTES_MISSING_SECOND_BYTE = [0b11110000].pack('C*')
72
- FOUR_BYTES_MISSING_THIRD_BYTE = [0b11110000, 0x10111111].pack('C*')
73
- FOUR_BYTES_MISSING_FOURTH_BYTE = [0b11110000, 0x10111111, 0x10111111].pack('C*')
74
- FOUR_BYTES_ILLEGAL_FIRST_BYTE = [0b11110101, 0x10111111, 0x10111111, 0x10111111].pack('C*')
75
- FOUR_BYTES_ILLEGAL_FIRST_BYTE_ALT = [0b11110101, 0x10111111, 0x10111111, 0x10111111].pack('C*')
76
- FOUR_BYTES_ILLEGAL_FIRST_BYTE_ALT2 = [0b11110101, 0x10111111, 0x10111111, 0x10111111].pack('C*')
77
- UNEXPECTED_BYTE = [0b11111000].pack('C*')
78
- end # module Invalid
79
- end
61
+ module Invalid
62
+ TWO_BYTES_MISSING_SECOND_BYTE = [0b11011111].pack('C*')
63
+ TWO_BYTES_MALFORMED_SECOND_BYTE = [0b11011111, 0b00001111].pack('C*') # should be 10......
64
+ OVERLONG = [0b11000000, 0b10000000].pack('C*') # lead byte is 110..... but code point is <= 127
65
+ OVERLONG_ALT = [0b11000001, 0b10000000].pack('C*') # lead byte is 110..... but code point is <= 127
66
+ THREE_BYTES_MISSING_SECOND_BYTE = [0b11100000].pack('C*')
67
+ THREE_BYTES_MISSING_THIRD_BYTE = [0b11100000, 0b10000000].pack('C*')
68
+ THREE_BYTES_MALFORMED_SECOND_BYTE = [0b11100000, 0b00001111, 0b10000000].pack('C*') # should be 10......
69
+ THREE_BYTES_MALFORMED_THIRD_BYTE = [0b11100000, 0b10000000, 0b00001111].pack('C*') # should be 10......
70
+ FOUR_BYTES_MISSING_SECOND_BYTE = [0b11110000].pack('C*')
71
+ FOUR_BYTES_MISSING_THIRD_BYTE = [0b11110000, 0x10111111].pack('C*')
72
+ FOUR_BYTES_MISSING_FOURTH_BYTE = [0b11110000, 0x10111111, 0x10111111].pack('C*')
73
+ FOUR_BYTES_ILLEGAL_FIRST_BYTE = [0b11110101, 0x10111111, 0x10111111, 0x10111111].pack('C*')
74
+ FOUR_BYTES_ILLEGAL_FIRST_BYTE_ALT = [0b11110101, 0x10111111, 0x10111111, 0x10111111].pack('C*')
75
+ FOUR_BYTES_ILLEGAL_FIRST_BYTE_ALT2 = [0b11110101, 0x10111111, 0x10111111, 0x10111111].pack('C*')
76
+ UNEXPECTED_BYTE = [0b11111000].pack('C*')
77
+ end # module Invalid
80
78
  end # module UTF8
81
79
 
82
80
  require 'wikitext'
data/spec/tt_spec.rb CHANGED
@@ -1,5 +1,4 @@
1
- #!/usr/bin/env ruby
2
- # Copyright 2007-2009 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2007-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
5
4
  # modification, are permitted provided that the following conditions are met:
data/spec/ul_spec.rb CHANGED
@@ -1,5 +1,4 @@
1
- #!/usr/bin/env ruby
2
- # Copyright 2007-2009 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2007-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
5
4
  # modification, are permitted provided that the following conditions are met:
data/spec/version_spec.rb CHANGED
@@ -1,5 +1,4 @@
1
- #!/usr/bin/env ruby
2
- # Copyright 2009-2011 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2009-2013 Wincent Colaiuta. All rights reserved.
3
2
  #
4
3
  # Redistribution and use in source and binary forms, with or without
5
4
  # modification, are permitted provided that the following conditions are met:
@@ -1,6 +1,4 @@
1
- #!/usr/bin/env ruby
2
- # encoding: utf-8
3
- # Copyright 2007-2009 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2007-2013 Wincent Colaiuta. All rights reserved.
4
2
  #
5
3
  # Redistribution and use in source and binary forms, with or without
6
4
  # modification, are permitted provided that the following conditions are met:
metadata CHANGED
@@ -1,105 +1,108 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: wikitext
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 3
7
- - 1
8
- version: "3.1"
3
+ version: !ruby/object:Gem::Version
4
+ version: '4.0'
9
5
  platform: ruby
10
- authors:
6
+ authors:
11
7
  - Wincent Colaiuta
12
8
  autorequire:
13
9
  bindir: bin
14
10
  cert_chain: []
15
-
16
- date: 2013-02-16 00:00:00 -08:00
17
- default_executable:
18
- dependencies:
19
- - !ruby/object:Gem::Dependency
20
- type: :development
21
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
- requirements:
23
- - - ">="
24
- - !ruby/object:Gem::Version
25
- segments:
26
- - 0
27
- version: "0"
11
+ date: 2013-02-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
28
14
  name: rake
29
- requirement: *id001
30
- prerelease: false
31
- - !ruby/object:Gem::Dependency
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
32
20
  type: :development
33
- version_requirements: &id002 !ruby/object:Gem::Requirement
34
- requirements:
35
- - - ">="
36
- - !ruby/object:Gem::Version
37
- segments:
38
- - 2
39
- - 0
40
- version: "2.0"
41
- name: rspec
42
- requirement: *id002
43
21
  prerelease: false
44
- - !ruby/object:Gem::Dependency
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
45
34
  type: :development
46
- version_requirements: &id003 !ruby/object:Gem::Requirement
47
- requirements:
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- segments:
51
- - 0
52
- version: "0"
53
- name: thor
54
- requirement: *id003
55
35
  prerelease: false
56
- - !ruby/object:Gem::Dependency
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: thor
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
57
48
  type: :development
58
- version_requirements: &id004 !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- segments:
63
- - 0
64
- - 5
65
- - 8
66
- version: 0.5.8
67
- name: yard
68
- requirement: *id004
69
49
  prerelease: false
70
- - !ruby/object:Gem::Dependency
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: yard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
71
62
  type: :development
72
- version_requirements: &id005 !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- segments:
77
- - 0
78
- version: "0"
79
- name: wopen3
80
- requirement: *id005
81
63
  prerelease: false
82
- - !ruby/object:Gem::Dependency
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: wopen3
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
83
76
  type: :development
84
- version_requirements: &id006 !ruby/object:Gem::Requirement
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- segments:
89
- - 0
90
- version: "0"
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
91
84
  name: ZenTest
92
- requirement: *id006
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
93
91
  prerelease: false
94
- description: " Wikitext is a fast wikitext-to-HTML translator written in C.\n"
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: |2
98
+ Wikitext is a fast wikitext-to-HTML translator written in C.
95
99
  email: win@wincent.com
96
- executables:
100
+ executables:
97
101
  - wikitext
98
- extensions:
102
+ extensions:
99
103
  - ext/extconf.rb
100
104
  extra_rdoc_files: []
101
-
102
- files:
105
+ files:
103
106
  - bin/wikitext
104
107
  - ext/extconf.rb
105
108
  - ext/ary.c
@@ -160,36 +163,29 @@ files:
160
163
  - spec/version_spec.rb
161
164
  - spec/vim_formatter.rb
162
165
  - spec/wikitext_spec.rb
163
- has_rdoc: true
164
166
  homepage: https://wincent.com/products/wikitext
165
167
  licenses: []
166
-
168
+ metadata: {}
167
169
  post_install_message:
168
170
  rdoc_options: []
169
-
170
- require_paths:
171
+ require_paths:
171
172
  - ext
172
173
  - lib
173
- required_ruby_version: !ruby/object:Gem::Requirement
174
- requirements:
175
- - - ">="
176
- - !ruby/object:Gem::Version
177
- segments:
178
- - 0
179
- version: "0"
180
- required_rubygems_version: !ruby/object:Gem::Requirement
181
- requirements:
182
- - - ">="
183
- - !ruby/object:Gem::Version
184
- segments:
185
- - 0
186
- version: "0"
174
+ required_ruby_version: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - '>='
177
+ - !ruby/object:Gem::Version
178
+ version: 2.0.0
179
+ required_rubygems_version: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - '>='
182
+ - !ruby/object:Gem::Version
183
+ version: '0'
187
184
  requirements: []
188
-
189
185
  rubyforge_project: wikitext
190
- rubygems_version: 1.3.6
186
+ rubygems_version: 2.0.0
191
187
  signing_key:
192
- specification_version: 3
188
+ specification_version: 4
193
189
  summary: Wikitext-to-HTML translator
194
190
  test_files: []
195
-
191
+ has_rdoc: