forked from sporkmonger/addressable
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7411808
commit 7094546
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,38 @@ Ruby's standard library. It more closely conforms to the relevant RFCs and | |
adds support for IRIs and URI templates. | ||
TEXT | ||
|
||
desc "generates .gemspec file" | ||
task :gemspec do | ||
spec = Gem::Specification.new do |p| | ||
p.name = 'addressable' | ||
p.version = PKG_VERSION | ||
|
||
p.summary = PKG_SUMMARY | ||
p.description = PKG_DESCRIPTION | ||
|
||
p.author = 'Bob Aman' | ||
p.email = '[email protected]' | ||
p.homepage = 'http://github.com/mislav/addressable' | ||
p.rubyforge_project = nil | ||
|
||
p.files = FileList['Rakefile', '{bin,lib,tasks,spec}/**/*', 'README*', 'LICENSE*', 'CHANGELOG*'] & `git ls-files`.split | ||
|
||
p.executables = Dir['bin/*'].map { |f| File.basename(f) } | ||
|
||
p.has_rdoc = true | ||
end | ||
|
||
spec_string = spec.to_ruby | ||
|
||
begin | ||
Thread.new { eval("$SAFE = 3\n#{spec_string}", binding) }.join | ||
rescue | ||
abort "unsafe gemspec: #{$!}" | ||
else | ||
File.open("#{spec.name}.gemspec", 'w') { |file| file.write spec_string } | ||
end | ||
end | ||
|
||
PKG_FILES = FileList[ | ||
"lib/**/*", "spec/**/*", "vendor/**/*", | ||
"tasks/**/*", "website/**/*", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# -*- encoding: utf-8 -*- | ||
|
||
Gem::Specification.new do |s| | ||
s.name = %q{addressable} | ||
s.version = "2.1.1" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.authors = ["Bob Aman"] | ||
s.date = %q{2009-09-27} | ||
s.description = %q{Addressable is a replacement for the URI implementation that is part of | ||
Ruby's standard library. It more closely conforms to the relevant RFCs and | ||
adds support for IRIs and URI templates. | ||
} | ||
s.email = %q{[email protected]} | ||
s.files = ["Rakefile", "lib/addressable/idna.rb", "lib/addressable/template.rb", "lib/addressable/uri.rb", "lib/addressable/version.rb", "tasks/clobber.rake", "tasks/gem.rake", "tasks/git.rake", "tasks/metrics.rake", "tasks/rdoc.rake", "tasks/rubyforge.rake", "tasks/spec.rake", "spec/addressable/idna_spec.rb", "spec/addressable/template_spec.rb", "spec/addressable/uri_spec.rb", "spec/data/rfc3986.txt", "README", "LICENSE", "CHANGELOG"] | ||
s.homepage = %q{http://github.com/mislav/addressable} | ||
s.require_paths = ["lib"] | ||
s.rubygems_version = %q{1.3.5} | ||
s.summary = %q{URI Implementation} | ||
|
||
if s.respond_to? :specification_version then | ||
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION | ||
s.specification_version = 3 | ||
|
||
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then | ||
else | ||
end | ||
else | ||
end | ||
end |