libxslt-ruby-r19mingw1 0.9.7
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.
- data/CHANGES +81 -0
- data/LICENSE +21 -0
- data/README +174 -0
- data/Rakefile +55 -0
- data/ext/libxslt/extconf.rb +137 -0
- data/ext/libxslt/libxslt.c +68 -0
- data/ext/libxslt/libxslt.h +32 -0
- data/ext/libxslt/ruby_xslt_stylesheet.c +369 -0
- data/ext/libxslt/ruby_xslt_stylesheet.h +16 -0
- data/ext/libxslt/version.h +5 -0
- data/ext/mingw/Rakefile +28 -0
- data/ext/vc/libxslt_ruby.sln +26 -0
- data/ext/vc/libxslt_ruby.vcproj +224 -0
- data/lib/libxslt.rb +14 -0
- data/lib/libxslt/deprecated.rb +67 -0
- data/lib/libxslt/stylesheet.rb +35 -0
- data/lib/xslt.rb +15 -0
- data/libxslt-ruby.gemspec +58 -0
- data/setup.rb +1585 -0
- data/test/files/commentary.dtd +34 -0
- data/test/files/fuzface.xml +154 -0
- data/test/files/fuzface.xsl +4 -0
- data/test/files/params.xml +2 -0
- data/test/files/params.xsl +11 -0
- data/test/files/ramblings.xsl +46 -0
- data/test/test_deprecated.rb +97 -0
- data/test/test_libxslt.rb +21 -0
- data/test/test_stylesheet.rb +246 -0
- data/test/test_suite.rb +3 -0
- metadata +109 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
/* $Id: ruby_xslt_stylesheet.h 42 2007-12-07 06:09:35Z transami $ */
|
2
|
+
|
3
|
+
/* Please see the LICENSE file for copyright and distribution information. */
|
4
|
+
|
5
|
+
#ifndef __RUBY_LIBXSLT_STYLESHEET__
|
6
|
+
#define __RUBY_LIBXSLT_STYLESHEET__
|
7
|
+
|
8
|
+
// Includes from libxml-ruby
|
9
|
+
#include <libxml/ruby_libxml.h>
|
10
|
+
#include <libxml/ruby_xml_document.h>
|
11
|
+
|
12
|
+
extern VALUE cXSLTStylesheet;
|
13
|
+
|
14
|
+
void ruby_init_xslt_stylesheet(void);
|
15
|
+
|
16
|
+
#endif
|
data/ext/mingw/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# We can't use Ruby's standard build procedures
|
2
|
+
# on Windows because the Ruby executable is
|
3
|
+
# built with VC++ while here we want to build
|
4
|
+
# with MingW. So just roll our own...
|
5
|
+
|
6
|
+
require 'fileutils'
|
7
|
+
require 'rbconfig'
|
8
|
+
|
9
|
+
EXTENSION_NAME = "libxslt_ruby.#{Config::CONFIG["DLEXT"]}"
|
10
|
+
|
11
|
+
# This is called when the Windows GEM is installed!
|
12
|
+
task :install do
|
13
|
+
# Gems will pass these two environment variables:
|
14
|
+
# RUBYARCHDIR=#{dest_path}
|
15
|
+
# RUBYLIBDIR=#{dest_path}
|
16
|
+
|
17
|
+
dest_path = ENV['RUBYLIBDIR']
|
18
|
+
|
19
|
+
# Copy the extension
|
20
|
+
cp(EXTENSION_NAME, dest_path)
|
21
|
+
|
22
|
+
# Copy dllss
|
23
|
+
Dir.glob('*.dll').each do |dll|
|
24
|
+
cp(dll, dest_path)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
task :default => :install
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
Microsoft Visual Studio Solution File, Format Version 10.00
|
3
|
+
# Visual Studio 2008
|
4
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxslt_ruby", "libxslt_ruby.vcproj", "{6DCFD1E6-224E-479C-BBD9-B6931DFCD02C}"
|
5
|
+
EndProject
|
6
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml_ruby", "..\..\..\libxml-ruby\ext\vc\libxml_ruby.vcproj", "{0B65CD1D-EEB9-41AE-93BB-75496E504152}"
|
7
|
+
EndProject
|
8
|
+
Global
|
9
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
10
|
+
Debug|Win32 = Debug|Win32
|
11
|
+
Release|Win32 = Release|Win32
|
12
|
+
EndGlobalSection
|
13
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
14
|
+
{6DCFD1E6-224E-479C-BBD9-B6931DFCD02C}.Debug|Win32.ActiveCfg = Debug|Win32
|
15
|
+
{6DCFD1E6-224E-479C-BBD9-B6931DFCD02C}.Debug|Win32.Build.0 = Debug|Win32
|
16
|
+
{6DCFD1E6-224E-479C-BBD9-B6931DFCD02C}.Release|Win32.ActiveCfg = Release|Win32
|
17
|
+
{6DCFD1E6-224E-479C-BBD9-B6931DFCD02C}.Release|Win32.Build.0 = Release|Win32
|
18
|
+
{0B65CD1D-EEB9-41AE-93BB-75496E504152}.Debug|Win32.ActiveCfg = Debug|Win32
|
19
|
+
{0B65CD1D-EEB9-41AE-93BB-75496E504152}.Debug|Win32.Build.0 = Debug|Win32
|
20
|
+
{0B65CD1D-EEB9-41AE-93BB-75496E504152}.Release|Win32.ActiveCfg = Release|Win32
|
21
|
+
{0B65CD1D-EEB9-41AE-93BB-75496E504152}.Release|Win32.Build.0 = Release|Win32
|
22
|
+
EndGlobalSection
|
23
|
+
GlobalSection(SolutionProperties) = preSolution
|
24
|
+
HideSolutionNode = FALSE
|
25
|
+
EndGlobalSection
|
26
|
+
EndGlobal
|
@@ -0,0 +1,224 @@
|
|
1
|
+
<?xml version="1.0" encoding="Windows-1252"?>
|
2
|
+
<VisualStudioProject
|
3
|
+
ProjectType="Visual C++"
|
4
|
+
Version="9.00"
|
5
|
+
Name="libxslt_ruby"
|
6
|
+
ProjectGUID="{6DCFD1E6-224E-479C-BBD9-B6931DFCD02C}"
|
7
|
+
RootNamespace="libxsl"
|
8
|
+
Keyword="Win32Proj"
|
9
|
+
TargetFrameworkVersion="131072"
|
10
|
+
>
|
11
|
+
<Platforms>
|
12
|
+
<Platform
|
13
|
+
Name="Win32"
|
14
|
+
/>
|
15
|
+
</Platforms>
|
16
|
+
<ToolFiles>
|
17
|
+
</ToolFiles>
|
18
|
+
<Configurations>
|
19
|
+
<Configuration
|
20
|
+
Name="Debug|Win32"
|
21
|
+
OutputDirectory="C:\Development\ruby\lib\ruby\gems\1.8\gems\libxslt-ruby-0.8.2-x86-mswin32-60\lib"
|
22
|
+
IntermediateDirectory="$(ConfigurationName)"
|
23
|
+
ConfigurationType="2"
|
24
|
+
CharacterSet="1"
|
25
|
+
>
|
26
|
+
<Tool
|
27
|
+
Name="VCPreBuildEventTool"
|
28
|
+
/>
|
29
|
+
<Tool
|
30
|
+
Name="VCCustomBuildTool"
|
31
|
+
/>
|
32
|
+
<Tool
|
33
|
+
Name="VCXMLDataGeneratorTool"
|
34
|
+
/>
|
35
|
+
<Tool
|
36
|
+
Name="VCWebServiceProxyGeneratorTool"
|
37
|
+
/>
|
38
|
+
<Tool
|
39
|
+
Name="VCMIDLTool"
|
40
|
+
/>
|
41
|
+
<Tool
|
42
|
+
Name="VCCLCompilerTool"
|
43
|
+
Optimization="0"
|
44
|
+
AdditionalIncludeDirectories=""C:\Development\src\libxml-ruby\ext";"C:\Development\ruby\lib\ruby\1.8\i386-mswin32";C:\Development\msys\local\include;C:\Development\msys\local\include\libxml2"
|
45
|
+
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;libxsl_EXPORTS"
|
46
|
+
MinimalRebuild="true"
|
47
|
+
BasicRuntimeChecks="3"
|
48
|
+
RuntimeLibrary="3"
|
49
|
+
UsePrecompiledHeader="0"
|
50
|
+
WarningLevel="3"
|
51
|
+
Detect64BitPortabilityProblems="true"
|
52
|
+
DebugInformationFormat="4"
|
53
|
+
/>
|
54
|
+
<Tool
|
55
|
+
Name="VCManagedResourceCompilerTool"
|
56
|
+
/>
|
57
|
+
<Tool
|
58
|
+
Name="VCResourceCompilerTool"
|
59
|
+
/>
|
60
|
+
<Tool
|
61
|
+
Name="VCPreLinkEventTool"
|
62
|
+
/>
|
63
|
+
<Tool
|
64
|
+
Name="VCLinkerTool"
|
65
|
+
AdditionalDependencies="msvcrt-ruby18.lib libxml2.lib libxslt.lib libexslt.lib"
|
66
|
+
OutputFile="C:\Development\ruby\lib\ruby\gems\1.8\gems\libxslt-ruby-0.9.1-x86-mswin32-60\lib\$(ProjectName).so"
|
67
|
+
LinkIncremental="2"
|
68
|
+
AdditionalLibraryDirectories="C:\Development\ruby\lib;C:\Development\msys\local\lib"
|
69
|
+
GenerateDebugInformation="true"
|
70
|
+
SubSystem="2"
|
71
|
+
RandomizedBaseAddress="1"
|
72
|
+
DataExecutionPrevention="0"
|
73
|
+
TargetMachine="1"
|
74
|
+
/>
|
75
|
+
<Tool
|
76
|
+
Name="VCALinkTool"
|
77
|
+
/>
|
78
|
+
<Tool
|
79
|
+
Name="VCManifestTool"
|
80
|
+
/>
|
81
|
+
<Tool
|
82
|
+
Name="VCXDCMakeTool"
|
83
|
+
/>
|
84
|
+
<Tool
|
85
|
+
Name="VCBscMakeTool"
|
86
|
+
/>
|
87
|
+
<Tool
|
88
|
+
Name="VCFxCopTool"
|
89
|
+
/>
|
90
|
+
<Tool
|
91
|
+
Name="VCAppVerifierTool"
|
92
|
+
/>
|
93
|
+
<Tool
|
94
|
+
Name="VCPostBuildEventTool"
|
95
|
+
/>
|
96
|
+
</Configuration>
|
97
|
+
<Configuration
|
98
|
+
Name="Release|Win32"
|
99
|
+
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
100
|
+
IntermediateDirectory="$(ConfigurationName)"
|
101
|
+
ConfigurationType="2"
|
102
|
+
CharacterSet="1"
|
103
|
+
WholeProgramOptimization="1"
|
104
|
+
>
|
105
|
+
<Tool
|
106
|
+
Name="VCPreBuildEventTool"
|
107
|
+
/>
|
108
|
+
<Tool
|
109
|
+
Name="VCCustomBuildTool"
|
110
|
+
/>
|
111
|
+
<Tool
|
112
|
+
Name="VCXMLDataGeneratorTool"
|
113
|
+
/>
|
114
|
+
<Tool
|
115
|
+
Name="VCWebServiceProxyGeneratorTool"
|
116
|
+
/>
|
117
|
+
<Tool
|
118
|
+
Name="VCMIDLTool"
|
119
|
+
/>
|
120
|
+
<Tool
|
121
|
+
Name="VCCLCompilerTool"
|
122
|
+
AdditionalIncludeDirectories=""C:\Development\msys\src\libiconv-1.12\include";"C:\Development\ruby\lib\ruby\1.8\i386-mswin32";"C:\Development\msys\src\libxml2-2.6.32\include";"C:\Development\msys\src\libxslt-1.1.24";C:\Development\msys\src\rlibxml\ext"
|
123
|
+
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBXML_EXPORTS"
|
124
|
+
RuntimeLibrary="2"
|
125
|
+
UsePrecompiledHeader="0"
|
126
|
+
WarningLevel="3"
|
127
|
+
Detect64BitPortabilityProblems="true"
|
128
|
+
DebugInformationFormat="3"
|
129
|
+
/>
|
130
|
+
<Tool
|
131
|
+
Name="VCManagedResourceCompilerTool"
|
132
|
+
/>
|
133
|
+
<Tool
|
134
|
+
Name="VCResourceCompilerTool"
|
135
|
+
/>
|
136
|
+
<Tool
|
137
|
+
Name="VCPreLinkEventTool"
|
138
|
+
/>
|
139
|
+
<Tool
|
140
|
+
Name="VCLinkerTool"
|
141
|
+
AdditionalDependencies="msvcrt-ruby18.lib libxml2.lib libxslt.lib libexslt.lib"
|
142
|
+
OutputFile="$(OutDir)\$(ProjectName).so"
|
143
|
+
LinkIncremental="1"
|
144
|
+
AdditionalLibraryDirectories="C:\Development\ruby\lib;"C:\Development\msys\src\libxslt-1.1.24\win32\bin.msvc""
|
145
|
+
GenerateDebugInformation="true"
|
146
|
+
SubSystem="2"
|
147
|
+
OptimizeReferences="2"
|
148
|
+
EnableCOMDATFolding="2"
|
149
|
+
RandomizedBaseAddress="1"
|
150
|
+
DataExecutionPrevention="0"
|
151
|
+
TargetMachine="1"
|
152
|
+
/>
|
153
|
+
<Tool
|
154
|
+
Name="VCALinkTool"
|
155
|
+
/>
|
156
|
+
<Tool
|
157
|
+
Name="VCManifestTool"
|
158
|
+
/>
|
159
|
+
<Tool
|
160
|
+
Name="VCXDCMakeTool"
|
161
|
+
/>
|
162
|
+
<Tool
|
163
|
+
Name="VCBscMakeTool"
|
164
|
+
/>
|
165
|
+
<Tool
|
166
|
+
Name="VCFxCopTool"
|
167
|
+
/>
|
168
|
+
<Tool
|
169
|
+
Name="VCAppVerifierTool"
|
170
|
+
/>
|
171
|
+
<Tool
|
172
|
+
Name="VCPostBuildEventTool"
|
173
|
+
/>
|
174
|
+
</Configuration>
|
175
|
+
</Configurations>
|
176
|
+
<References>
|
177
|
+
<ProjectReference
|
178
|
+
ReferencedProjectIdentifier="{0B65CD1D-EEB9-41AE-93BB-75496E504152}"
|
179
|
+
RelativePathToProject="..\..\..\libxml-ruby\ext\vc\libxml_ruby.vcproj"
|
180
|
+
/>
|
181
|
+
</References>
|
182
|
+
<Files>
|
183
|
+
<Filter
|
184
|
+
Name="Source Files"
|
185
|
+
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
186
|
+
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
187
|
+
>
|
188
|
+
<File
|
189
|
+
RelativePath="..\libxslt\libxslt.c"
|
190
|
+
>
|
191
|
+
</File>
|
192
|
+
<File
|
193
|
+
RelativePath="..\libxslt\ruby_xslt_stylesheet.c"
|
194
|
+
>
|
195
|
+
</File>
|
196
|
+
</Filter>
|
197
|
+
<Filter
|
198
|
+
Name="Header Files"
|
199
|
+
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
200
|
+
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
201
|
+
>
|
202
|
+
<File
|
203
|
+
RelativePath="..\libxslt\libxslt.h"
|
204
|
+
>
|
205
|
+
</File>
|
206
|
+
<File
|
207
|
+
RelativePath="..\libxslt\ruby_xslt_stylesheet.h"
|
208
|
+
>
|
209
|
+
</File>
|
210
|
+
<File
|
211
|
+
RelativePath="..\libxslt\version.h"
|
212
|
+
>
|
213
|
+
</File>
|
214
|
+
</Filter>
|
215
|
+
<Filter
|
216
|
+
Name="Resource Files"
|
217
|
+
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
218
|
+
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
219
|
+
>
|
220
|
+
</Filter>
|
221
|
+
</Files>
|
222
|
+
<Globals>
|
223
|
+
</Globals>
|
224
|
+
</VisualStudioProject>
|
data/lib/libxslt.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# First make sure libxml is loaded
|
2
|
+
require 'libxml'
|
3
|
+
|
4
|
+
# Now if running on Windows, then add the current directory to the PATH
|
5
|
+
# for the current process so it can find the pre-built libxml2 and
|
6
|
+
# iconv2 shared libraries (dlls).
|
7
|
+
if RUBY_PLATFORM.match(/mswin/i)
|
8
|
+
ENV['PATH'] += ";#{File.dirname(__FILE__)}"
|
9
|
+
end
|
10
|
+
|
11
|
+
require 'libxslt_ruby'
|
12
|
+
|
13
|
+
require 'libxslt/deprecated'
|
14
|
+
require 'libxslt/stylesheet'
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# :enddoc:
|
2
|
+
# These classes provide provide backwards compatibility with
|
3
|
+
# versions of libxslt-ruby prior to version 0.7.0
|
4
|
+
|
5
|
+
module LibXML
|
6
|
+
module XML
|
7
|
+
module XSLT
|
8
|
+
MAX_DEPTH = LibXSLT::XSLT::MAX_DEPTH
|
9
|
+
MAX_SORT = LibXSLT::XSLT::MAX_SORT
|
10
|
+
ENGINE_VERSION = LibXSLT::XSLT::ENGINE_VERSION
|
11
|
+
LIBXSLT_VERSION = LibXSLT::XSLT::LIBXSLT_VERSION
|
12
|
+
LIBXML_VERSION = LibXSLT::XSLT::LIBXML_VERSION
|
13
|
+
XSLT_NAMESPACE = LibXSLT::XSLT::XSLT_NAMESPACE
|
14
|
+
DEFAULT_VENDOR = LibXSLT::XSLT::DEFAULT_VENDOR
|
15
|
+
DEFAULT_VERSION = LibXSLT::XSLT::DEFAULT_VERSION
|
16
|
+
DEFAULT_URL = LibXSLT::XSLT::DEFAULT_URL
|
17
|
+
NAMESPACE_LIBXSLT = LibXSLT::XSLT::NAMESPACE_LIBXSLT
|
18
|
+
NAMESPACE_NORM_SAXON = LibXSLT::XSLT::NAMESPACE_NORM_SAXON
|
19
|
+
NAMESPACE_SAXON = LibXSLT::XSLT::NAMESPACE_SAXON
|
20
|
+
NAMESPACE_XT = LibXSLT::XSLT::NAMESPACE_XT
|
21
|
+
NAMESPACE_XALAN = LibXSLT::XSLT::NAMESPACE_XALAN
|
22
|
+
|
23
|
+
def self.new
|
24
|
+
Stylesheet.new(nil)
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.file(filename)
|
28
|
+
doc = ::LibXML::XML::Document.file(filename)
|
29
|
+
stylesheet = LibXSLT::XSLT::Stylesheet.new(doc)
|
30
|
+
|
31
|
+
result = Stylesheet.new(stylesheet)
|
32
|
+
result.filename = filename
|
33
|
+
result
|
34
|
+
end
|
35
|
+
|
36
|
+
class Stylesheet
|
37
|
+
attr_accessor :doc, :filename
|
38
|
+
|
39
|
+
def initialize(stylesheet)
|
40
|
+
@stylesheet = stylesheet
|
41
|
+
end
|
42
|
+
|
43
|
+
def filename=(value)
|
44
|
+
@doc = ::LibXML::XML::Document.file(value)
|
45
|
+
@filename = value
|
46
|
+
end
|
47
|
+
|
48
|
+
def parse
|
49
|
+
self
|
50
|
+
end
|
51
|
+
|
52
|
+
def apply
|
53
|
+
@result = @stylesheet.apply(@doc)
|
54
|
+
end
|
55
|
+
|
56
|
+
def save(filename)
|
57
|
+
raise(ArgumentError) unless @result
|
58
|
+
@result.save(filename)
|
59
|
+
end
|
60
|
+
|
61
|
+
def print(filename)
|
62
|
+
raise(ArgumentError) unless @result
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module LibXSLT
|
2
|
+
module XSLT
|
3
|
+
class Stylesheet
|
4
|
+
# options to be used for parsing stylesheets
|
5
|
+
PARSE_OPTIONS = LibXML::XML::Parser::Options::NOCDATA | LibXML::XML::Parser::Options::NOENT
|
6
|
+
class << self
|
7
|
+
# create a xslt stylesheet from a string
|
8
|
+
def string(xml)
|
9
|
+
doc = LibXML::XML::Parser.string(xml, :options => PARSE_OPTIONS).parse
|
10
|
+
return new(doc)
|
11
|
+
end
|
12
|
+
# create a xslt stylesheet from a file specified by its filename
|
13
|
+
def file(filename)
|
14
|
+
doc = LibXML::XML::Parser.file(filename, :options => PARSE_OPTIONS).parse
|
15
|
+
return new(doc)
|
16
|
+
end
|
17
|
+
# create a xslt stylesheet from an io object
|
18
|
+
def io(io_object)
|
19
|
+
doc = LibXML::XML::Parser.io(io_object, :options => PARSE_OPTIONS).parse
|
20
|
+
return new(doc)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
# transform a xml to a string
|
24
|
+
def transform_to_string(doc)
|
25
|
+
rdoc = apply(doc)
|
26
|
+
return dump_result(rdoc)
|
27
|
+
end
|
28
|
+
# transform a xml to a file (specified by an output stream)
|
29
|
+
def transform_to_file(doc, io = STDOUT)
|
30
|
+
rdoc = apply(doc)
|
31
|
+
return save_result(rdoc, io)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/xslt.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# This file loads libxslt and adds the LibXSLT namespace
|
2
|
+
# to the toplevel for conveneience. The end result
|
3
|
+
# is to have XSLT:: universally exposed.
|
4
|
+
#
|
5
|
+
# It is recommend that you only load this file for libs
|
6
|
+
# that do not have their own namespace, eg. administrative
|
7
|
+
# scripts, personal programs, etc. For other applications
|
8
|
+
# require 'libxslt' instead and include LibXSLT into your
|
9
|
+
# app/libs namespace.
|
10
|
+
|
11
|
+
require 'libxslt'
|
12
|
+
|
13
|
+
include LibXML
|
14
|
+
include LibXSLT
|
15
|
+
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
# ------- Default Package ----------
|
5
|
+
FILES = FileList[
|
6
|
+
'Rakefile',
|
7
|
+
'CHANGES',
|
8
|
+
'README',
|
9
|
+
'LICENSE',
|
10
|
+
'setup.rb',
|
11
|
+
'doc/**/*',
|
12
|
+
'lib/**/*',
|
13
|
+
'ext/libxslt/*.h',
|
14
|
+
'ext/libxslt/*.c',
|
15
|
+
'ext/mingw/Rakefile',
|
16
|
+
'ext/vc/*.sln',
|
17
|
+
'ext/vc/*.vcproj',
|
18
|
+
'test/**/*',
|
19
|
+
'libxslt-ruby.gemspec'
|
20
|
+
]
|
21
|
+
|
22
|
+
# Default GEM Specification
|
23
|
+
DEFAULT_SPEC = Gem::Specification.new do |spec|
|
24
|
+
spec.name = "libxslt-ruby-r19mingw1"
|
25
|
+
|
26
|
+
spec.homepage = "http://libxslt.rubyforge.org/"
|
27
|
+
spec.summary = "Ruby libxslt bindings"
|
28
|
+
spec.description = <<-EOF
|
29
|
+
The Libxslt-Ruby project provides Ruby language bindings for the GNOME
|
30
|
+
XSLT C library. It is free software, released under the MIT License.
|
31
|
+
EOF
|
32
|
+
|
33
|
+
# Determine the current version of the software
|
34
|
+
spec.version =
|
35
|
+
if File.read('ext/libxslt/version.h') =~ /\s*RUBY_LIBXSLT_VERSION\s*['"](\d.+)['"]/
|
36
|
+
CURRENT_VERSION = $1
|
37
|
+
else
|
38
|
+
CURRENT_VERSION = "0.0.0"
|
39
|
+
end
|
40
|
+
|
41
|
+
spec.author = "Charlie Savage"
|
42
|
+
spec.email = "libxml-devel@rubyforge.org"
|
43
|
+
spec.add_dependency('libxml-ruby-r19mingw','>=0.9.4')
|
44
|
+
spec.platform = Gem::Platform::RUBY
|
45
|
+
spec.require_paths = ["lib", "ext/libxslt"]
|
46
|
+
|
47
|
+
spec.bindir = "bin"
|
48
|
+
spec.extensions = ["ext/libxslt/extconf.rb"]
|
49
|
+
spec.files = FILES.to_a
|
50
|
+
spec.test_files = Dir.glob("test/tc_*.rb")
|
51
|
+
|
52
|
+
spec.required_ruby_version = '>= 1.8.4'
|
53
|
+
spec.date = DateTime.now
|
54
|
+
spec.rubyforge_project = 'libxslt-ruby'
|
55
|
+
|
56
|
+
spec.has_rdoc = true
|
57
|
+
end
|
58
|
+
|