mime-types 1.15 → 1.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ @3��|gUޠ�!�% ���lA[�!�@m�
2
+ ;
@@ -1,7 +1,12 @@
1
- = MIME::Types Change Log
2
-
3
- Unless explicitly stated differently are all changes produced by Austin
4
- Ziegler <mime-types@halostatue.ca>.
1
+ == MIME::Types 1.16
2
+ * Made compatible with Ruby 1.8.6, 1.8.7, and 1.9.1.
3
+ * Switched to the 'hoe' gem system and added a lot of build-time tools.
4
+ * Updated the MIME types to the list based on the values in the Perl library
5
+ version 1.27. Also updated based on external source information and bug
6
+ reports.
7
+ * This is the last planned version of MIME::Types 1.x. Work will be
8
+ starting soon on MIME::Types 2.x with richer data querying mechanisms
9
+ and support for external data sources.
5
10
 
6
11
  == MIME::Types 1.15
7
12
  * Removed lib/mime/type.rb to form a single MIME::Types database source. It
@@ -26,7 +31,7 @@ Ziegler <mime-types@halostatue.ca>.
26
31
  MIME::Types implementation (1.13). Do not rely on these until the purpose
27
32
  and implementation is stabilised.
28
33
  * Updated the MIME list to reflect changes noted by
29
- Ville Skytt� <ville.skytta@iki.fi>.
34
+ Ville Skyttä <ville.skytta@iki.fi>.
30
35
  * Added a new constant to MIME::Types, DATA_VERSION. This will allow the Ruby
31
36
  version number to be updated separately from the Perl version while keeping
32
37
  the MIME Type list version in sync.
@@ -73,7 +78,7 @@ Ziegler <mime-types@halostatue.ca>.
73
78
  == MIME::Types 1.07
74
79
  * Changed version numbering to match Perl MIME::Types 1.07.
75
80
  * Re-synchronized with Mark Overmeer's list in Perl PMIME::Types 1.07.
76
- - [NN Poster] updated the attributes for the PGP types.
81
+ * [NN Poster] updated the attributes for the PGP types.
77
82
 
78
83
  == MIME::Types 1.005
79
84
  * Changed to Phil Thomson's InstallPackage.
@@ -90,12 +95,13 @@ Ziegler <mime-types@halostatue.ca>.
90
95
  == MIME::Types 1.003
91
96
  * Initial release based on Perl MIME::Types 1.003.
92
97
 
93
- #--
94
- # MIME::Types for Ruby
95
- # http://rubyforge.org/projects/mime-types/
96
- # Copyright 2003 - 2006 Austin Ziegler.
97
- # Licensed under a MIT-style licence.
98
- #
99
- # $Id: ChangeLog,v 1.3 2006/02/12 21:27:21 austin Exp $
100
- #++
101
- # vim: sts=2 sw=2 ts=4 et ai tw=77
98
+ == Copyright
99
+ MIME::Types
100
+ A Ruby implementation of a MIME Types information library. Based in spirit
101
+ on the Perl MIME::Types information library by Mark Overmeer.
102
+ http://rubyforge.org/projects/mime-types/
103
+
104
+ Licensed under the Ruby disjunctive licence with the GNU GPL or the Perl
105
+ Artistic licence. See Licence.txt for more information.
106
+
107
+ Copyright 2003 - 2009 Austin Ziegler
@@ -0,0 +1,17 @@
1
+ Installing this package is as simple as:
2
+
3
+ % ruby setup.rb
4
+
5
+ Alternatively, you can use the Gem version of MIME::Types available as
6
+ mime-types-1.16.gem from the usual sources.
7
+
8
+ == Copyright
9
+ MIME::Types
10
+ A Ruby implementation of a MIME Types information library. Based in spirit
11
+ on the Perl MIME::Types information library by Mark Overmeer.
12
+ http://rubyforge.org/projects/mime-types/
13
+
14
+ Licensed under the Ruby disjunctive licence with the GNU GPL or the Perl
15
+ Artistic licence. See Licence.txt for more information.
16
+
17
+ Copyright 2003 - 2009 Austin Ziegler
@@ -13,6 +13,3 @@ http://www.perl.com/pub/a/language/misc/Artistic.html
13
13
  The text of the GNU GPL can be found at: http://www.gnu.org/copyleft/gpl.html
14
14
 
15
15
  If you do not accept one of these licences, you may not use this software.
16
-
17
- $Id: LICENCE,v 1.1 2006/02/12 21:27:21 austin Exp $
18
- # vim: sts=2 sw=2 ts=4 et ai tw=77
@@ -0,0 +1,12 @@
1
+ History.txt
2
+ Install.txt
3
+ Licence.txt
4
+ Manifest.txt
5
+ README.txt
6
+ Rakefile
7
+ lib/mime/types.rb
8
+ lib/mime/types.rb.data
9
+ mime-types.gemspec
10
+ setup.rb
11
+ test/test_mime_type.rb
12
+ test/test_mime_types.rb
@@ -0,0 +1,28 @@
1
+ = README: Mime::Types for Ruby
2
+ This library allows for the identification of a file's likely MIME content
3
+ type. This is release 1.16. The identification of MIME content type is based
4
+ on a file's filename extensions.
5
+
6
+ MIME::Types for Ruby originally based on and synchronized with MIME::Types
7
+ for Perl by Mark Overmeer, copyright 2001 - 2009. As of version 1.15, the
8
+ data format for the MIME::Type list has changed and the synchronization will
9
+ no longer happen.
10
+
11
+ Homepage:: http://mime-types.rubyforge.org/
12
+ Copyright:: 2002 - 2009, Austin Ziegler
13
+ Based in part on prior work copyright Mark Overmeer
14
+
15
+ == Licensing
16
+ MIME::Types is available under three disjunctive licences, as detailed in the
17
+ Licence.txt file.
18
+
19
+ == Copyright
20
+ MIME::Types
21
+ A Ruby implementation of a MIME Types information library. Based in spirit
22
+ on the Perl MIME::Types information library by Mark Overmeer.
23
+ http://rubyforge.org/projects/mime-types/
24
+
25
+ Licensed under the Ruby disjunctive licence with the GNU GPL or the Perl
26
+ Artistic licence. See Licence.txt for more information.
27
+
28
+ Copyright 2003 - 2009 Austin Ziegler
data/Rakefile CHANGED
@@ -1,208 +1,316 @@
1
1
  #! /usr/bin/env rake
2
2
  #--
3
- # MIME::Types for Ruby
4
- # http://rubyforge.org/projects/mime-types/
5
- # Copyright 2003 - 2005 Austin Ziegler.
6
- # Licensed under a MIT-style licence.
3
+ # MIME::Types
4
+ # A Ruby implementation of a MIME Types information library. Based in spirit
5
+ # on the Perl MIME::Types information library by Mark Overmeer.
6
+ # http://rubyforge.org/projects/mime-types/
7
7
  #
8
- # $Id: Rakefile,v 1.8 2006/02/12 22:05:20 austin Exp $
8
+ # Licensed under the Ruby disjunctive licence with the GNU GPL or the Perl
9
+ # Artistic licence. See Licence.txt for more information.
10
+ #
11
+ # Copyright 2003 - 2009 Austin Ziegler
9
12
  #++
10
- require 'meta_project'
11
- require 'rake/gempackagetask'
12
- require 'rake/contrib/xforge'
13
- require 'rake/clean'
14
-
15
- require 'gmailer'
16
13
 
17
- require 'archive/tar/minitar'
18
- require 'zlib'
14
+ require 'rubygems'
15
+ require 'hoe'
19
16
 
20
17
  $LOAD_PATH.unshift('lib')
21
18
 
22
19
  require 'mime/types'
23
20
 
24
- $version = MIME::Types::VERSION
25
- $name = MIME::Types.to_s
26
- $project = MetaProject::Project::XForge::RubyForge.new('mime-types')
27
- $distdir = "mime-types-#$version"
28
- $tardist = "../#$distdir.tar.gz"
21
+ PKG_NAME = 'mime-types'
22
+ PKG_VERSION = MIME::Types::VERSION
23
+ PKG_DIST = "#{PKG_NAME}-#{PKG_VERSION}"
24
+ PKG_TAR = "pkg/#{PKG_DIST}.tar.gz"
25
+ MANIFEST = File.read("Manifest.txt").split
29
26
 
30
- $release_date = nil
31
- $release_date = Time.parse(ENV['RELEASE_DATE']) if ENV['RELEASE_DATE']
27
+ hoe = Hoe.new PKG_NAME, PKG_VERSION do |p|
28
+ p.rubyforge_name = PKG_NAME
29
+ # This is a lie because I will continue to use Archive::Tar::Minitar.
30
+ p.need_tar = false
31
+ # need_zip - Should package create a zipfile? [default: false]
32
32
 
33
- desc "Run the tests for #$name."
34
- task :test do |t|
35
- require 'test/unit/testsuite'
36
- require 'test/unit/ui/console/testrunner'
33
+ p.author = [ "Austin Ziegler" ]
34
+ p.email = %W(austin@rubyforge.org)
35
+ p.url = "http://mime-types.rubyforge.org/"
36
+ p.summary = %q{Manages a MIME Content-Type database that will return the Content-Type for a given filename.}
37
+ p.changes = p.paragraphs_of("History.txt", 0..0).join("\n\n")
38
+ p.description = p.paragraphs_of("README.txt", 1..1).join("\n\n")
37
39
 
38
- runner = Test::Unit::UI::Console::TestRunner
40
+ p.extra_dev_deps << %w(archive-tar-minitar ~>0.5)
41
+ p.extra_dev_deps << %w(nokogiri ~>1.2)
42
+ p.extra_dev_deps << %w(rcov ~>0.8)
39
43
 
40
- $LOAD_PATH.unshift('tests')
41
- $stderr.puts "Checking for test cases:" if t.verbose
42
- Dir['tests/tc_*.rb'].each do |testcase|
43
- $stderr.puts "\t#{testcase}" if t.verbose
44
- load testcase
45
- end
44
+ p.clean_globs << "coverage"
46
45
 
47
- suite = Test::Unit::TestSuite.new($name)
46
+ p.spec_extras[:extra_rdoc_files] = MANIFEST.grep(/txt$/) - ["Manifest.txt"]
47
+ end
48
48
 
49
- ObjectSpace.each_object(Class) do |testcase|
50
- suite << testcase.suite if testcase < Test::Unit::TestCase
49
+ begin
50
+ require 'rcov/rcovtask'
51
+ Rcov::RcovTask.new do |t|
52
+ t.libs << 'test'
53
+ t.test_files = hoe.test_files
54
+ t.verbose = true
51
55
  end
52
-
53
- runner.run(suite)
56
+ rescue LoadError
57
+ puts "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
54
58
  end
55
59
 
56
- desc "Look for TODO and FIXME tags in the code"
57
- task :todo do
58
- rx = %r{#.*(FIXME|TODO|TBD|DEPRECATED)}
59
- Pathname.new(File.dirname(__FILE__)).egrep(rx) do |match|
60
- puts match
60
+ =begin
61
+ require 'cucumber/rake/task'
62
+ Cucumber::Rake::Task.new(:features)
63
+ rescue LoadError
64
+ puts "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
65
+ =end
66
+
67
+ desc "Build a MIME::Types .tar.gz distribution."
68
+ task :tar => [ PKG_TAR ]
69
+ file PKG_TAR => [ :test ] do |t|
70
+ require 'archive/tar/minitar'
71
+ require 'zlib'
72
+ files = MANIFEST.map { |f|
73
+ fn = File.join(PKG_DIST, f)
74
+ tm = File.stat(f).mtime
75
+
76
+ if File.directory?(f)
77
+ { :name => fn, :mode => 0755, :dir => true, :mtime => tm }
78
+ else
79
+ mode = if f =~ %r{^bin}
80
+ 0755
81
+ else
82
+ 0644
83
+ end
84
+ data = File.read(f)
85
+ { :name => fn, :mode => mode, :data => data, :size => data.size,
86
+ :mtime => tm }
87
+ end
88
+ }
89
+
90
+ begin
91
+ unless File.directory?(File.dirname(t.name))
92
+ require 'fileutils'
93
+ FileUtils.mkdir_p File.dirname(t.name)
94
+ end
95
+ tf = File.open(t.name, 'wb')
96
+ gz = Zlib::GzipWriter.new(tf)
97
+ tw = Archive::Tar::Minitar::Writer.new(gz)
98
+
99
+ files.each do |entry|
100
+ if entry[:dir]
101
+ tw.mkdir(entry[:name], entry)
102
+ else
103
+ tw.add_file_simple(entry[:name], entry) { |os|
104
+ os.write(entry[:data])
105
+ }
106
+ end
107
+ end
108
+ ensure
109
+ tw.close if tw
110
+ gz.close if gz
61
111
  end
62
112
  end
113
+ task :package => [ PKG_TAR ]
114
+
115
+ desc "Build the manifest file from the current set of files."
116
+ task :build_manifest do |t|
117
+ require 'find'
118
+
119
+ hoerc = File.join(File.dirname(__FILE__), ".hoerc")
120
+ hoerc = File.open(hoerc, "rb") { |f| f.read }
121
+ hoerc = YAML::load(hoerc)
122
+
123
+ paths = []
124
+ Find.find(".") do |path|
125
+ next if File.directory?(path) || path =~ hoerc["exclude"]
126
+ paths << path.sub(%r{^\./}, '')
127
+ end
128
+
129
+ paths = paths.sort.join("\n")
130
+
131
+ File.open("Manifest.txt", "w") do |f|
132
+ f.puts paths
133
+ end
63
134
 
64
- spec = eval(File.read("mime-types.gemspec"))
65
- spec.version = $version
66
- desc "Build the RubyGem for #$name."
67
- task :gem => [ :test ]
68
- Rake::GemPackageTask.new(spec) do |g|
69
- g.need_tar = false
70
- g.need_zip = false
71
- g.package_dir = ".."
135
+ puts paths
72
136
  end
73
137
 
74
- desc "Build a #$name .tar.gz distribution."
75
- task :tar => [ $tardist ]
76
- file $tardist => [ :test ] do |t|
77
- current = File.basename(Dir.pwd)
78
- Dir.chdir("..") do
79
- begin
80
- files = %W(bin/**/* lib/**/* tests/**/* ChangeLog README LICENCE
81
- Rakefile mime-types.gemspec setup.rb pre-setup.rb)
82
- files = FileList[files.map { |file| File.join(current, file) }].to_a
83
- files.map! do |dd|
84
- ddnew = dd.gsub(/^#{current}/, $distdir)
85
- mtime = $release_date || File.stat(dd).mtime
86
- if File.directory?(dd)
87
- { :name => ddnew, :mode => 0755, :dir => true, :mtime => mtime }
88
- else
89
- if dd =~ %r{bin/}
90
- mode = 0755
91
- else
92
- mode = 0644
93
- end
94
- data = File.open(dd, "rb") { |ff| ff.read }
95
- { :name => ddnew, :mode => mode, :data => data, :size =>
96
- data.size, :mtime => mtime }
138
+ desc "Download the current MIME type registrations from IANA."
139
+ task :iana, :save, :destination do |t, args|
140
+ save_type = args.save || :text
141
+ save_type = save_type.to_sym
142
+
143
+ case save_type
144
+ when :text, :both, :html
145
+ nil
146
+ else
147
+ raise "Unknown save type provided. Must be one of text, both, or html."
148
+ end
149
+
150
+ destination = args.destination || "type-lists"
151
+
152
+ require 'open-uri'
153
+ require 'nokogiri'
154
+ require 'cgi'
155
+
156
+ class IANAParser
157
+ include Comparable
158
+
159
+ INDEX = %q(http://www.iana.org/assignments/media-types/)
160
+ CONTACT_PEOPLE = %r{http://www.iana.org/assignments/contact-people.html?#(.*)}
161
+ RFC_EDITOR = %r{http://www.rfc-editor.org/rfc/rfc(\d+).txt}
162
+ IETF_RFC = %r{http://www.ietf.org/rfc/rfc(\d+).txt}
163
+ IETF_RFC_TOOLS = %r{http://tools.ietf.org/html/rfc(\d+)}
164
+
165
+ class << self
166
+ def load_index
167
+ @types ||= {}
168
+
169
+ Nokogiri::HTML(open(INDEX) { |f| f.read }).xpath('//p/a').each do |tag|
170
+ href_match = %r{^/assignments/media-types/(.+)/$}.match(tag['href'])
171
+ next if href_match.nil?
172
+ type = href_match.captures[0]
173
+ @types[tag.content] = IANAParser.new(tag.content, type)
97
174
  end
98
175
  end
99
176
 
100
- ff = File.open(t.name.gsub(%r{^\.\./}o, ''), "wb")
101
- gz = Zlib::GzipWriter.new(ff)
102
- tw = Archive::Tar::Minitar::Writer.new(gz)
177
+ attr_reader :types
178
+ end
179
+
180
+ def initialize(name, type)
181
+ @name = name
182
+ @type = type
183
+ @url = File.join(INDEX, @type)
184
+ end
185
+
186
+ attr_reader :name
187
+ attr_reader :type
188
+ attr_reader :url
189
+ attr_reader :html
190
+
191
+ def download(name = nil)
192
+ @html = Nokogiri::HTML(open(name || @url) { |f| f.read })
193
+ end
194
+
195
+ def save_html
196
+ File.open("#@name.html", "wb") { |w| w.write @html }
197
+ end
198
+
199
+ def <=>(o)
200
+ self.name <=> o.name
201
+ end
202
+
203
+ def parse
204
+ nodes = html.xpath("//table//table//tr")
205
+
206
+ # How many <td> children does the first node have?
207
+ node_count = nodes.first.children.select { |node| node.elem? }.size
208
+
209
+ @mime_types = nodes.map do |node|
210
+ next if node == nodes.first
211
+ elems = node.children.select { |n| n.elem? }
212
+ next if elems.size.zero?
213
+ raise "size mismatch #{elems.size} != #{node_count}" if node_count != elems.size
103
214
 
104
- files.each do |entry|
105
- if entry[:dir]
106
- tw.mkdir(entry[:name], entry)
215
+ case elems.size
216
+ when 3
217
+ subtype_index = 1
218
+ refnode_index = 2
219
+ when 4
220
+ subtype_index = 1
221
+ refnode_index = 3
107
222
  else
108
- tw.add_file_simple(entry[:name], entry) { |os| os.write(entry[:data]) }
223
+ raise "Unknown element size."
109
224
  end
110
- end
111
- ensure
112
- tw.close if tw
113
- gz.finish if gz
114
- ff.close
225
+
226
+ subtype = elems[subtype_index].content.chomp.strip
227
+ refnodes = elems[refnode_index].children.select { |n| n.elem? }.map { |ref|
228
+ case ref['href']
229
+ when CONTACT_PEOPLE
230
+ tag = CGI::unescape($1).chomp.strip
231
+ if tag == ref.content
232
+ "[#{ref.content}]"
233
+ else
234
+ "[#{ref.content}=#{tag}]"
235
+ end
236
+ when RFC_EDITOR, IETF_RFC, IETF_RFC_TOOLS
237
+ "RFC#$1"
238
+ when %r{(https?://.*)}
239
+ "{#{ref.content}=#$1}"
240
+ else
241
+ ref
242
+ end
243
+ }
244
+ refs = refnodes.join(',')
245
+
246
+ "#@type/#{subtype} 'IANA,#{refs}"
247
+ end.compact
248
+
249
+ @mime_types
250
+ end
251
+
252
+ def save_text
253
+ File.open("#@name.txt", "wb") { |w| w.write @mime_types.join("\n") }
115
254
  end
116
255
  end
117
- end
118
- task $tardist => [ :test ]
119
-
120
- desc "Build the RDoc documentation for #$name."
121
- task :docs do
122
- require 'rdoc/rdoc'
123
- rdoc_options = %W(--title #$name --main README --line-numbers)
124
- files = FileList[*%w(README LICENCE ChangeLog bin/**/*.rb lib/**/*.rb)]
125
- rdoc_options += files.to_a
126
- RDoc::RDoc.new.document(rdoc_options)
127
- end
128
256
 
129
- task :verify_rubyforge do
130
- raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
131
- raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
132
- end
257
+ puts "Downloading index of MIME types from #{IANAParser::INDEX}."
258
+ IANAParser.load_index
133
259
 
134
- task :verify_gmail do
135
- raise "GMAIL_USER environment variable not set!" unless ENV['GMAIL_USER']
136
- raise "GMAIL_PASSWORD environment variable not set!" unless ENV['GMAIL_PASSWORD']
137
- end
260
+ require 'fileutils'
261
+ FileUtils.mkdir_p destination
262
+ Dir.chdir destination do
263
+ IANAParser.types.values.sort.each do |parser|
264
+ next if parser.name == "example" or parser.name == "mime"
265
+ puts "Downloading #{parser.name} from #{parser.url}"
266
+ parser.download
138
267
 
139
- desc "Release files on RubyForge."
140
- task :release_files => [ :verify_rubyforge, :tar, :gem ] do
141
- release_files = FileList[$tardist, "../#$distdir.gem"]
142
- Rake::XForge::Release.new($project) do |release|
143
- release.user_name = ENV['RUBYFORGE_USER']
144
- release.password = ENV['RUBYFORGE_PASSWORD']
145
- release.files = release_files.to_a
146
- release.release_name = "#$name #$version"
147
- release.package_name = "mime-types"
148
-
149
- notes = []
150
- File.open("README") do |file|
151
- file.each do |line|
152
- line.chomp!
153
- line.gsub!(/^#.*$/, '') and next
154
- notes << line
268
+ if :html == save_type || :both == save_type
269
+ puts "Saving #{parser.name}.html"
270
+ parser.save_html
155
271
  end
156
- end
157
- release.release_notes = notes.join("\n")
158
272
 
159
- changes = []
160
- File.open("ChangeLog") do |file|
161
- current = true
273
+ puts "Parsing #{parser.name} HTML"
274
+ parser.parse
162
275
 
163
- file.each do |line|
164
- line.chomp!
165
- current = false if current and line =~ /^==/
166
- break if line.empty? and not current
167
- changes << line
276
+ if :text == save_type || :both == save_type
277
+ puts "Saving #{parser.name}.txt"
278
+ parser.save_text
168
279
  end
169
280
  end
170
- release.release_changes = changes.join("\n")
171
281
  end
172
282
  end
173
283
 
174
- desc "Publish news on RubyForge"
175
- task :publish_news => [ :verify_rubyforge, :tar, :gem ] do
176
- Rake::XForge::NewsPublisher.new($project) do |news|
177
- news.user_name = ENV['RUBYFORGE_USER']
178
- news.password = ENV['RUBYFORGE_PASSWORD']
179
- news.subject = "#$name #$version Released"
180
- news.changes_file = nil
181
-
182
- details = []
183
- File.open("Release-Announcement") do |file|
184
- file.each do |line|
185
- line.chomp!
186
- break if line =~ /^=/
187
- details << line
188
- end
189
- end
190
- news.details = details.join("\n")
191
- end
284
+ desc "Shows known MIME type sources."
285
+ task :mime_type_sources do
286
+ puts <<-EOS
287
+ http://www.ltsw.se/knbase/internet/mime.htp
288
+ http://www.webmaster-toolkit.com/mime-types.shtml
289
+ http://plugindoc.mozdev.org/winmime.php
290
+ http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
291
+ http://www.feedforall.com/mime-types.htm
292
+ http://www.iana.org/assignments/media-types/
293
+ EOS
192
294
  end
193
295
 
194
- desc "Post a release announcement via GMail."
195
- task :email_announcement => [ :verify_gmail ] do
196
- GMailer.connect(ENV["GMAIL_USER"], ENV["GMAIL_PASSWORD"]) do |gmail|
197
- gmail.send :to => "ruby-talk@ruby-lang.org",
198
- :subject => "[ANN] #$name #$version",
199
- :body => File.read("Release-Announcement")
296
+ desc "Validate the RubyGem spec for GitHub."
297
+ task :github_validate_spec do |t|
298
+ require 'yaml'
299
+
300
+ require 'rubygems/specification'
301
+ data = File.read("#{PKG_NAME}.gemspec")
302
+ spec = nil
303
+
304
+ if data !~ %r{!ruby/object:Gem::Specification}
305
+ code = "$SAFE = 3\n#{data}"
306
+ p code.split($/)[44]
307
+ Thread.new { spec = eval("$SAFE = 3\n#{data}") }.join
308
+ else
309
+ spec = YAML.load(data)
200
310
  end
201
- end
202
311
 
203
- desc "Release the latest version."
204
- task :release => [ :verify_rubyforge, :verify_gmail, :release_files,
205
- :publish_news, :email_announcement, :docs ]
312
+ spec.validate
206
313
 
207
- desc "Build everything."
208
- task :default => [ :tar, :gem ]
314
+ puts spec
315
+ puts "OK"
316
+ end