RedCloth 4.1.9-universal-java → 4.2.0-universal-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of RedCloth might be problematic. Click here for more details.

Files changed (68) hide show
  1. data/CHANGELOG +55 -0
  2. data/Manifest +34 -38
  3. data/README +17 -5
  4. data/Rakefile +79 -30
  5. data/RedCloth.gemspec +8 -9
  6. data/ext/redcloth_scan/redcloth.h +38 -13
  7. data/lib/redcloth.rb +9 -3
  8. data/lib/redcloth/formatters/html.rb +2 -2
  9. data/lib/redcloth/formatters/latex.rb +99 -54
  10. data/lib/redcloth/formatters/latex_entities.yml +2 -2
  11. data/lib/redcloth/version.rb +9 -4
  12. data/lib/redcloth_scan.jar +0 -0
  13. data/lib/tasks/pureruby.rake +12 -0
  14. data/spec/custom_tags_spec.rb +50 -0
  15. data/spec/differs/inline.rb +48 -0
  16. data/{test/test_erb.rb → spec/erb_spec.rb} +6 -9
  17. data/spec/extension_spec.rb +26 -0
  18. data/{test → spec/fixtures}/basic.yml +90 -4
  19. data/{test → spec/fixtures}/code.yml +29 -0
  20. data/{test → spec/fixtures}/definitions.yml +0 -0
  21. data/{test → spec/fixtures}/extra_whitespace.yml +0 -0
  22. data/{test → spec/fixtures}/filter_html.yml +0 -0
  23. data/{test → spec/fixtures}/filter_pba.yml +0 -0
  24. data/{test → spec/fixtures}/html.yml +15 -0
  25. data/{test → spec/fixtures}/images.yml +16 -6
  26. data/{test → spec/fixtures}/instiki.yml +0 -0
  27. data/{test → spec/fixtures}/links.yml +7 -1
  28. data/{test → spec/fixtures}/lists.yml +162 -1
  29. data/{test → spec/fixtures}/poignant.yml +0 -0
  30. data/{test → spec/fixtures}/sanitize_html.yml +0 -0
  31. data/{test → spec/fixtures}/table.yml +121 -23
  32. data/{test → spec/fixtures}/textism.yml +44 -15
  33. data/{test → spec/fixtures}/threshold.yml +6 -14
  34. data/spec/formatters/class_filtered_html_spec.rb +7 -0
  35. data/spec/formatters/filtered_html_spec.rb +7 -0
  36. data/spec/formatters/html_no_breaks_spec.rb +9 -0
  37. data/spec/formatters/html_spec.rb +13 -0
  38. data/spec/formatters/id_filtered_html_spec.rb +7 -0
  39. data/spec/formatters/latex_spec.rb +13 -0
  40. data/spec/formatters/lite_mode_html_spec.rb +7 -0
  41. data/spec/formatters/no_span_caps_html_spec.rb +7 -0
  42. data/spec/formatters/sanitized_html_spec.rb +7 -0
  43. data/spec/formatters/style_filtered_html_spec.rb +7 -0
  44. data/spec/parser_spec.rb +95 -0
  45. data/spec/spec.opts +3 -0
  46. data/spec/spec_helper.rb +42 -0
  47. metadata +46 -51
  48. data/ext/mingw-rbconfig.rb +0 -176
  49. data/ext/redcloth_scan/redcloth_attributes.c.rl +0 -55
  50. data/ext/redcloth_scan/redcloth_attributes.java.rl +0 -95
  51. data/ext/redcloth_scan/redcloth_attributes.rl +0 -33
  52. data/ext/redcloth_scan/redcloth_common.c.rl +0 -18
  53. data/ext/redcloth_scan/redcloth_common.java.rl +0 -18
  54. data/ext/redcloth_scan/redcloth_common.rl +0 -115
  55. data/ext/redcloth_scan/redcloth_inline.c.rl +0 -193
  56. data/ext/redcloth_scan/redcloth_inline.java.rl +0 -140
  57. data/ext/redcloth_scan/redcloth_inline.rl +0 -156
  58. data/ext/redcloth_scan/redcloth_scan.c.rl +0 -228
  59. data/ext/redcloth_scan/redcloth_scan.java.rl +0 -577
  60. data/ext/redcloth_scan/redcloth_scan.rl +0 -320
  61. data/extras/ragel_profiler.rb +0 -73
  62. data/test/helper.rb +0 -108
  63. data/test/test_custom_tags.rb +0 -58
  64. data/test/test_extensions.rb +0 -31
  65. data/test/test_formatters.rb +0 -24
  66. data/test/test_parser.rb +0 -73
  67. data/test/test_restrictions.rb +0 -41
  68. data/test/validate_fixtures.rb +0 -74
@@ -0,0 +1,7 @@
1
+ require File.dirname(__FILE__) + '/../spec_helper'
2
+
3
+ describe "style_filtered_html" do
4
+ examples_from_yaml do |doc|
5
+ RedCloth.new(doc['in'], [:filter_styles]).to_html
6
+ end
7
+ end
@@ -0,0 +1,95 @@
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
+
3
+ describe RedCloth do
4
+
5
+ describe "#new" do
6
+ it "should accept options" do
7
+ lambda {
8
+ RedCloth.new("test", [:hard_breaks])
9
+ }.should_not raise_error(ArgumentError)
10
+ end
11
+ end
12
+
13
+ it "should have a VERSION" do
14
+ RedCloth.const_defined?("VERSION").should be_true
15
+ RedCloth::VERSION.const_defined?("STRING").should be_true
16
+ end
17
+
18
+ it "should show the version as a string" do
19
+ RedCloth::VERSION::STRING.should == RedCloth::VERSION.to_s
20
+ RedCloth::VERSION.should == RedCloth::VERSION::STRING
21
+ end
22
+
23
+ it "should have EXTENSION_LANGUAGE" do
24
+ RedCloth.const_defined?("EXTENSION_LANGUAGE").should be_true
25
+ RedCloth::EXTENSION_LANGUAGE.should_not be_empty
26
+ RedCloth::DESCRIPTION.should include(RedCloth::EXTENSION_LANGUAGE)
27
+ end
28
+
29
+ it "should not segfault on a badly formatted table" do
30
+ RedCloth.new(%Q{| one | two |\nthree | four |}).to_html.should =~ /td/
31
+ end
32
+
33
+ it "should not segfault on a table without a block end" do
34
+ RedCloth.new("| a | b |\n| c | d |\nh3. foo").to_html.should =~ /h3/
35
+ end
36
+
37
+ it "should not segfault on a table with empty cells" do
38
+ RedCloth.new(%Q{|one || |\nthree | four |}).to_html.should =~ /td/
39
+ end
40
+
41
+ it "should not segfault on an unfinished html block with filter_html" do
42
+ lambda { RedCloth.new(%Q{<hr> Some text}, [:filter_html]).to_html }.should_not raise_error
43
+ end
44
+
45
+ it "should parse RedCloth::VERSION in input" do
46
+ RedCloth.new("RedCloth::VERSION").to_html.should == "<p>#{RedCloth::VERSION::STRING}</p>"
47
+ end
48
+
49
+ it "should not parse RedCloth::VERSION if it's not on a line by itself" do
50
+ input = "RedCloth::VERSION won't output the RedCloth::VERSION unless it's on a line all by itself.\n\nRedCloth::VERSION"
51
+ html = "<p>RedCloth::<span class=\"caps\">VERSION</span> won&#8217;t output the RedCloth::<span class=\"caps\">VERSION</span> unless it&#8217;s on a line all by itself.</p>\n<p>#{RedCloth::VERSION::STRING}</p>"
52
+ RedCloth.new(input).to_html.should == html
53
+ end
54
+
55
+ it "should output the RedCloth::VERSION if it's labeled on a line by itself" do
56
+ input = "RedCloth::VERSION: RedCloth::VERSION"
57
+ html = "<p>RedCloth::VERSION: #{RedCloth::VERSION::STRING}</p>"
58
+ RedCloth.new(input).to_html.should == html
59
+ end
60
+
61
+ it "should output the RedCloth::VERSION if it's labeled in a sentence on a line by itself" do
62
+ input = "RedCloth version RedCloth::VERSION"
63
+ html = "<p>RedCloth version #{RedCloth::VERSION::STRING}</p>"
64
+ RedCloth.new(input).to_html.should == html
65
+ end
66
+
67
+ it "should output the RedCloth::VERSION in brackets" do
68
+ input = "The current RedCloth version is [RedCloth::VERSION]"
69
+ html = "<p>The current RedCloth version is #{RedCloth::VERSION::STRING}</p>"
70
+ RedCloth.new(input).to_html.should == html
71
+ end
72
+
73
+ it "should strip carriage returns" do
74
+ input = "This is a paragraph\r\n\r\nThis is a\r\nline break.\r\n\r\n<div>\r\ntest\r\n\r\n</div>"
75
+ html = "<p>This is a paragraph</p>\n<p>This is a<br />\nline break.</p>\n<div>\n<p>test</p>\n</div>"
76
+ RedCloth.new(input).to_html.should == html
77
+ end
78
+
79
+ if RUBY_VERSION > "1.9.0"
80
+ it "should preserve character encoding" do
81
+ input = "This is an ISO-8859-1 string"
82
+ input.force_encoding 'iso-8859-1'
83
+ output = RedCloth.new(input).to_html
84
+
85
+ output.should == "<p>This is an <span class=\"caps\">ISO</span>-8859-1 string</p>"
86
+ output.encoding.to_s.should == "ISO-8859-1"
87
+ end
88
+
89
+ it "should not raise ArgumentError: invalid byte sequence" do
90
+ s = "\xa3"
91
+ s.force_encoding 'iso-8859-1'
92
+ lambda { RedCloth.new(s).to_html }.should_not raise_error
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,3 @@
1
+ --color
2
+ --require=spec/differs/inline.rb
3
+ --diff=RedClothDiffers::Inline
@@ -0,0 +1,42 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
2
+ require 'redcloth'
3
+ require 'yaml'
4
+
5
+ class FormatterExampleGroup < Spec::Example::ExampleGroup
6
+
7
+ def self.examples_from_yaml(&block)
8
+ formatter = description.downcase
9
+ define_method("format_as_#{formatter}", &block)
10
+
11
+ fixtures.each do |name, doc|
12
+ if doc[formatter]
13
+ example("should output #{formatter} for #{name}") do
14
+ output = method("format_as_#{formatter}").call(doc)
15
+ output.should == doc[formatter]
16
+ end
17
+ else
18
+ example("should not raise errors when rendering #{formatter} for #{name}") do
19
+ lambda { method("format_as_#{formatter}").call(doc) }.should_not raise_error
20
+ end
21
+ end
22
+ end
23
+ end
24
+
25
+ def self.fixtures
26
+ return @fixtures if @fixtures
27
+ @fixtures = {}
28
+ Dir[File.join(File.dirname(__FILE__), *%w[fixtures *.yml])].each do |testfile|
29
+ testgroup = File.basename(testfile, '.yml')
30
+ num = 0
31
+ YAML::load_documents(File.open(testfile)) do |doc|
32
+ name = doc['name'] || num
33
+ @fixtures["#{testgroup} #{name}"] = doc
34
+ num += 1
35
+ end
36
+ end
37
+ @fixtures
38
+ end
39
+
40
+ end
41
+
42
+ Spec::Example::ExampleGroupFactory.register(:formatter, FormatterExampleGroup)
metadata CHANGED
@@ -5,29 +5,15 @@ homepage: http://redcloth.org
5
5
  executables:
6
6
  - redcloth
7
7
  version: !ruby/object:Gem::Version
8
- version: 4.1.9
8
+ version: 4.2.0
9
9
  post_install_message:
10
- date: 2009-02-20 05:00:00 +00:00
10
+ date: 2009-06-10 04:00:00 +00:00
11
11
  files:
12
12
  - bin/redcloth
13
13
  - CHANGELOG
14
14
  - COPYING
15
- - ext/mingw-rbconfig.rb
16
15
  - ext/redcloth_scan/extconf.rb
17
16
  - ext/redcloth_scan/redcloth.h
18
- - ext/redcloth_scan/redcloth_attributes.c.rl
19
- - ext/redcloth_scan/redcloth_attributes.java.rl
20
- - ext/redcloth_scan/redcloth_attributes.rl
21
- - ext/redcloth_scan/redcloth_common.c.rl
22
- - ext/redcloth_scan/redcloth_common.java.rl
23
- - ext/redcloth_scan/redcloth_common.rl
24
- - ext/redcloth_scan/redcloth_inline.c.rl
25
- - ext/redcloth_scan/redcloth_inline.java.rl
26
- - ext/redcloth_scan/redcloth_inline.rl
27
- - ext/redcloth_scan/redcloth_scan.c.rl
28
- - ext/redcloth_scan/redcloth_scan.java.rl
29
- - ext/redcloth_scan/redcloth_scan.rl
30
- - extras/ragel_profiler.rb
31
17
  - lib/case_sensitive_require/RedCloth.rb
32
18
  - lib/redcloth/erb_extension.rb
33
19
  - lib/redcloth/formatters/base.rb
@@ -37,37 +23,47 @@ files:
37
23
  - lib/redcloth/textile_doc.rb
38
24
  - lib/redcloth/version.rb
39
25
  - lib/redcloth.rb
26
+ - lib/tasks/pureruby.rake
40
27
  - Manifest
41
28
  - Rakefile
42
29
  - README
43
30
  - setup.rb
44
- - test/basic.yml
45
- - test/code.yml
46
- - test/definitions.yml
47
- - test/extra_whitespace.yml
48
- - test/filter_html.yml
49
- - test/filter_pba.yml
50
- - test/helper.rb
51
- - test/html.yml
52
- - test/images.yml
53
- - test/instiki.yml
54
- - test/links.yml
55
- - test/lists.yml
56
- - test/poignant.yml
57
- - test/sanitize_html.yml
58
- - test/table.yml
59
- - test/test_custom_tags.rb
60
- - test/test_erb.rb
61
- - test/test_extensions.rb
62
- - test/test_formatters.rb
63
- - test/test_parser.rb
64
- - test/test_restrictions.rb
65
- - test/textism.yml
66
- - test/threshold.yml
67
- - test/validate_fixtures.rb
31
+ - spec/custom_tags_spec.rb
32
+ - spec/differs/inline.rb
33
+ - spec/erb_spec.rb
34
+ - spec/extension_spec.rb
35
+ - spec/fixtures/basic.yml
36
+ - spec/fixtures/code.yml
37
+ - spec/fixtures/definitions.yml
38
+ - spec/fixtures/extra_whitespace.yml
39
+ - spec/fixtures/filter_html.yml
40
+ - spec/fixtures/filter_pba.yml
41
+ - spec/fixtures/html.yml
42
+ - spec/fixtures/images.yml
43
+ - spec/fixtures/instiki.yml
44
+ - spec/fixtures/links.yml
45
+ - spec/fixtures/lists.yml
46
+ - spec/fixtures/poignant.yml
47
+ - spec/fixtures/sanitize_html.yml
48
+ - spec/fixtures/table.yml
49
+ - spec/fixtures/textism.yml
50
+ - spec/fixtures/threshold.yml
51
+ - spec/formatters/class_filtered_html_spec.rb
52
+ - spec/formatters/filtered_html_spec.rb
53
+ - spec/formatters/html_no_breaks_spec.rb
54
+ - spec/formatters/html_spec.rb
55
+ - spec/formatters/id_filtered_html_spec.rb
56
+ - spec/formatters/latex_spec.rb
57
+ - spec/formatters/lite_mode_html_spec.rb
58
+ - spec/formatters/no_span_caps_html_spec.rb
59
+ - spec/formatters/sanitized_html_spec.rb
60
+ - spec/formatters/style_filtered_html_spec.rb
61
+ - spec/parser_spec.rb
62
+ - spec/spec.opts
63
+ - spec/spec_helper.rb
68
64
  - RedCloth.gemspec
69
65
  - lib/redcloth_scan.jar
70
- rubygems_version: 1.3.1
66
+ rubygems_version: 1.3.3
71
67
  rdoc_options:
72
68
  - --line-numbers
73
69
  - --inline-source
@@ -81,9 +77,11 @@ cert_chain: []
81
77
  name: RedCloth
82
78
  has_rdoc: true
83
79
  platform: universal-java
84
- summary: RedCloth-4.1.9 - Textile parser for Ruby. http://redcloth.org/
80
+ summary: RedCloth-4.2.0 - Textile parser for Ruby. http://redcloth.org/
85
81
  default_executable:
86
82
  bindir: bin
83
+ licenses: []
84
+
87
85
  required_rubygems_version: !ruby/object:Gem::Requirement
88
86
  version:
89
87
  requirements:
@@ -100,17 +98,14 @@ require_paths:
100
98
  - lib
101
99
  - ext
102
100
  - lib/case_sensitive_require
103
- specification_version: 2
104
- test_files:
105
- - test/test_custom_tags.rb
106
- - test/test_erb.rb
107
- - test/test_extensions.rb
108
- - test/test_formatters.rb
109
- - test/test_parser.rb
110
- - test/test_restrictions.rb
101
+ specification_version: 3
102
+ test_files: []
103
+
111
104
  dependencies: []
112
105
 
113
- description: RedCloth-4.1.9 - Textile parser for Ruby. http://redcloth.org/
106
+ description: |-
107
+ RedCloth-4.2.0 - Textile parser for Ruby.
108
+ http://redcloth.org/
114
109
  email: redcloth-upwards@rubyforge.org
115
110
  authors:
116
111
  - Jason Garber
@@ -1,176 +0,0 @@
1
-
2
- # This rbconfig.rb corresponds to a Ruby installation for win32 cross-compiled
3
- # with mingw under i686-linux. It can be used to cross-compile extensions for
4
- # win32 using said toolchain.
5
- #
6
- # This file assumes that a cross-compiled mingw32 build (compatible with the
7
- # mswin32 builds) is installed under $HOME/ruby-mingw32.
8
-
9
- module Config
10
- #RUBY_VERSION == "1.8.5" or
11
- # raise "ruby lib version (1.8.5) doesn't match executable version (#{RUBY_VERSION})"
12
-
13
- mingw32 = ENV['MINGW32_RUBY'] || "#{ENV["HOME"]}/ruby-mingw32"
14
- mingwpre = ENV['MINGW32_PREFIX']
15
- TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-mingw32")
16
- DESTDIR = '' unless defined? DESTDIR
17
- CONFIG = {}
18
- CONFIG["DESTDIR"] = DESTDIR
19
- CONFIG["INSTALL"] = "/usr/bin/install -c"
20
- CONFIG["prefix"] = (TOPDIR || DESTDIR + mingw32)
21
- CONFIG["EXEEXT"] = ".exe"
22
- CONFIG["ruby_install_name"] = "ruby"
23
- CONFIG["RUBY_INSTALL_NAME"] = "ruby"
24
- CONFIG["RUBY_SO_NAME"] = "msvcrt-ruby18"
25
- CONFIG["SHELL"] = "/bin/sh"
26
- CONFIG["PATH_SEPARATOR"] = ":"
27
- CONFIG["PACKAGE_NAME"] = ""
28
- CONFIG["PACKAGE_TARNAME"] = ""
29
- CONFIG["PACKAGE_VERSION"] = ""
30
- CONFIG["PACKAGE_STRING"] = ""
31
- CONFIG["PACKAGE_BUGREPORT"] = ""
32
- CONFIG["exec_prefix"] = "$(prefix)"
33
- CONFIG["bindir"] = "$(exec_prefix)/bin"
34
- CONFIG["sbindir"] = "$(exec_prefix)/sbin"
35
- CONFIG["libexecdir"] = "$(exec_prefix)/libexec"
36
- CONFIG["datadir"] = "$(prefix)/share"
37
- CONFIG["sysconfdir"] = "$(prefix)/etc"
38
- CONFIG["sharedstatedir"] = "$(prefix)/com"
39
- CONFIG["localstatedir"] = "$(prefix)/var"
40
- CONFIG["libdir"] = "$(exec_prefix)/lib"
41
- CONFIG["includedir"] = "$(prefix)/include"
42
- CONFIG["oldincludedir"] = "/usr/include"
43
- CONFIG["infodir"] = "$(prefix)/info"
44
- CONFIG["mandir"] = "$(prefix)/man"
45
- CONFIG["build_alias"] = "i686-linux"
46
- CONFIG["host_alias"] = "#{mingwpre}"
47
- CONFIG["target_alias"] = "i386-mingw32"
48
- CONFIG["ECHO_C"] = ""
49
- CONFIG["ECHO_N"] = "-n"
50
- CONFIG["ECHO_T"] = ""
51
- CONFIG["LIBS"] = "-lwsock32 "
52
- CONFIG["MAJOR"] = "1"
53
- CONFIG["MINOR"] = "8"
54
- CONFIG["TEENY"] = "4"
55
- CONFIG["build"] = "i686-pc-linux"
56
- CONFIG["build_cpu"] = "i686"
57
- CONFIG["build_vendor"] = "pc"
58
- CONFIG["build_os"] = "linux"
59
- CONFIG["host"] = "i586-pc-mingw32msvc"
60
- CONFIG["host_cpu"] = "i586"
61
- CONFIG["host_vendor"] = "pc"
62
- CONFIG["host_os"] = "mingw32msvc"
63
- CONFIG["target"] = "i386-pc-mingw32"
64
- CONFIG["target_cpu"] = "i386"
65
- CONFIG["target_vendor"] = "pc"
66
- CONFIG["target_os"] = "mingw32"
67
- CONFIG["CC"] = "#{mingwpre}-gcc"
68
- CONFIG["CFLAGS"] = "-g "
69
- CONFIG["LDFLAGS"] = ""
70
- CONFIG["CPPFLAGS"] = ""
71
- CONFIG["OBJEXT"] = "o"
72
- CONFIG["CPP"] = "#{mingwpre}-gcc -E"
73
- CONFIG["EGREP"] = "grep -E"
74
- CONFIG["GNU_LD"] = "yes"
75
- CONFIG["CPPOUTFILE"] = "-o conftest.i"
76
- CONFIG["OUTFLAG"] = "-o "
77
- CONFIG["YACC"] = "bison -y"
78
- CONFIG["RANLIB"] = "#{mingwpre}-ranlib"
79
- CONFIG["AR"] = "#{mingwpre}-ar"
80
- CONFIG["NM"] = "#{mingwpre}-nm"
81
- CONFIG["WINDRES"] = "#{mingwpre}-windres"
82
- CONFIG["DLLWRAP"] = "#{mingwpre}-dllwrap"
83
- CONFIG["OBJDUMP"] = "#{mingwpre}-objdump"
84
- CONFIG["LN_S"] = "ln -s"
85
- CONFIG["SET_MAKE"] = ""
86
- CONFIG["INSTALL_PROGRAM"] = "$(INSTALL)"
87
- CONFIG["INSTALL_SCRIPT"] = "$(INSTALL)"
88
- CONFIG["INSTALL_DATA"] = "$(INSTALL) -m 644"
89
- CONFIG["RM"] = "rm -f"
90
- CONFIG["CP"] = "cp"
91
- CONFIG["MAKEDIRS"] = "mkdir -p"
92
- CONFIG["LIBOBJS"] = " fileblocks$(U).o crypt$(U).o flock$(U).o acosh$(U).o win32$(U).o"
93
- CONFIG["ALLOCA"] = ""
94
- CONFIG["DLDFLAGS"] = " -Wl,--enable-auto-import,--export-all"
95
- CONFIG["ARCH_FLAG"] = ""
96
- CONFIG["STATIC"] = ""
97
- CONFIG["CCDLFLAGS"] = ""
98
- CONFIG["LDSHARED"] = "#{mingwpre}-gcc -shared -s"
99
- CONFIG["DLEXT"] = "so"
100
- CONFIG["DLEXT2"] = "dll"
101
- CONFIG["LIBEXT"] = "a"
102
- CONFIG["LINK_SO"] = ""
103
- CONFIG["LIBPATHFLAG"] = " -L\"%s\""
104
- CONFIG["RPATHFLAG"] = ""
105
- CONFIG["LIBPATHENV"] = ""
106
- CONFIG["TRY_LINK"] = ""
107
- CONFIG["STRIP"] = "strip"
108
- CONFIG["EXTSTATIC"] = ""
109
- CONFIG["setup"] = "Setup"
110
- CONFIG["MINIRUBY"] = "ruby -rfake"
111
- CONFIG["PREP"] = "fake.rb"
112
- CONFIG["RUNRUBY"] = "$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`"
113
- CONFIG["EXTOUT"] = ".ext"
114
- CONFIG["ARCHFILE"] = ""
115
- CONFIG["RDOCTARGET"] = ""
116
- CONFIG["XCFLAGS"] = " -DRUBY_EXPORT"
117
- CONFIG["XLDFLAGS"] = " -Wl,--stack,0x02000000 -L."
118
- CONFIG["LIBRUBY_LDSHARED"] = "#{mingwpre}-gcc -shared -s"
119
- CONFIG["LIBRUBY_DLDFLAGS"] = " -Wl,--enable-auto-import,--export-all -Wl,--out-implib=$(LIBRUBY)"
120
- CONFIG["rubyw_install_name"] = "rubyw"
121
- CONFIG["RUBYW_INSTALL_NAME"] = "rubyw"
122
- CONFIG["LIBRUBY_A"] = "lib$(RUBY_SO_NAME)-static.a"
123
- CONFIG["LIBRUBY_SO"] = "$(RUBY_SO_NAME).dll"
124
- CONFIG["LIBRUBY_ALIASES"] = ""
125
- CONFIG["LIBRUBY"] = "lib$(LIBRUBY_SO).a"
126
- CONFIG["LIBRUBYARG"] = "$(LIBRUBYARG_SHARED)"
127
- CONFIG["LIBRUBYARG_STATIC"] = "-l$(RUBY_SO_NAME)-static"
128
- CONFIG["LIBRUBYARG_SHARED"] = "-l$(RUBY_SO_NAME)"
129
- CONFIG["SOLIBS"] = "$(LIBS)"
130
- CONFIG["DLDLIBS"] = ""
131
- CONFIG["ENABLE_SHARED"] = "yes"
132
- CONFIG["MAINLIBS"] = ""
133
- CONFIG["COMMON_LIBS"] = "m"
134
- CONFIG["COMMON_MACROS"] = ""
135
- CONFIG["COMMON_HEADERS"] = "windows.h winsock.h"
136
- CONFIG["EXPORT_PREFIX"] = ""
137
- CONFIG["MINIOBJS"] = "dmydln.o"
138
- CONFIG["MAKEFILES"] = "Makefile GNUmakefile"
139
- CONFIG["arch"] = "i386-mingw32"
140
- CONFIG["sitearch"] = "i386-msvcrt"
141
- CONFIG["sitedir"] = "$(prefix)/lib/ruby/site_ruby"
142
- CONFIG["configure_args"] = "'--host=#{mingwpre}' '--target=i386-mingw32' '--build=i686-linux' '--prefix=#{mingw32}' 'build_alias=i686-linux' 'host_alias=#{mingwpre}' 'target_alias=i386-mingw32'"
143
- CONFIG["NROFF"] = "/usr/bin/nroff"
144
- CONFIG["MANTYPE"] = "doc"
145
- CONFIG["LTLIBOBJS"] = " fileblocks$(U).lo crypt$(U).lo flock$(U).lo acosh$(U).lo win32$(U).lo"
146
- CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)"
147
- CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
148
- CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
149
- CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
150
- CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
151
- CONFIG["topdir"] = File.dirname(__FILE__)
152
- MAKEFILE_CONFIG = {}
153
- CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
154
- def Config::expand(val, config = CONFIG)
155
- val.gsub!(/\$\$|\$\(([^()]+)\)|\$\{([^{}]+)\}/) do |var|
156
- if !(v = $1 || $2)
157
- '$'
158
- elsif key = config[v = v[/\A[^:]+(?=(?::(.*?)=(.*))?\z)/]]
159
- pat, sub = $1, $2
160
- config[v] = false
161
- Config::expand(key, config)
162
- config[v] = key
163
- key = key.gsub(/#{Regexp.quote(pat)}(?=\s|\z)/n) {sub} if pat
164
- key
165
- else
166
- var
167
- end
168
- end
169
- val
170
- end
171
- CONFIG.each_value do |val|
172
- Config::expand(val)
173
- end
174
- end
175
- RbConfig = Config # compatibility for ruby-1.9
176
- CROSS_COMPILING = nil unless defined? CROSS_COMPILING