Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bundler compatibility.

  • Loading branch information...
commit 622e432cba2228ec0ff714454f85efaec1c56963 1 parent 6a5527d
@rgrove authored
Showing with 48 additions and 79 deletions.
  1. +2 −0  Gemfile
  2. +20 −0 Gemfile.lock
  3. +2 −49 Rakefile
  4. +24 −30 sanitize.gemspec
View
2  Gemfile
@@ -0,0 +1,2 @@
+source "http://rubygems.org"
+gemspec
View
20 Gemfile.lock
@@ -0,0 +1,20 @@
+PATH
+ remote: .
+ specs:
+ sanitize (2.0.3)
+ nokogiri (>= 1.4.4, < 1.6)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ minitest (2.0.2)
+ nokogiri (1.5.2)
+ rake (0.8.7)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ minitest (~> 2.0.0)
+ rake (~> 0.8.0)
+ sanitize!
View
51 Rakefile
@@ -20,47 +20,12 @@
# SOFTWARE.
#++
-require 'rubygems'
-require 'rubygems/package_task'
+require 'bundler'
require 'rake/clean'
require 'rake/testtask'
require 'rdoc/task'
-require './lib/sanitize/version'
-
-gemspec = Gem::Specification.new do |s|
- s.rubyforge_project = 'riposte'
-
- s.name = 'sanitize'
- s.summary = 'Whitelist-based HTML sanitizer.'
- s.version = Sanitize::VERSION
- s.author = 'Ryan Grove'
- s.email = 'ryan@wonko.com'
- s.homepage = 'https://github.com/rgrove/sanitize/'
- s.platform = Gem::Platform::RUBY
-
- s.require_path = 'lib'
- s.required_ruby_version = '>= 1.8.7'
-
- # Runtime dependencies.
- s.add_dependency('nokogiri', '>= 1.4.4', '< 1.6')
-
- # Development dependencies.
- s.add_development_dependency('minitest', '~> 2.0.0')
- s.add_development_dependency('rake', '~> 0.8.0')
-
- s.files = FileList[
- 'HISTORY.md',
- 'LICENSE',
- 'README.rdoc',
- 'lib/**/*.rb'
- ].to_a
-end
-
-Gem::PackageTask.new(gemspec) do |p|
- p.need_tar = false
- p.need_zip = false
-end
+Bundler::GemHelper.install_tasks
RDoc::Task.new do |rd|
rd.main = 'README.rdoc'
@@ -73,15 +38,3 @@ end
Rake::TestTask.new
task :default => [:test]
-
-desc 'generate an updated gemspec'
-task :gemspec do
- filename = File.join(File.dirname(__FILE__), "#{gemspec.name}.gemspec")
- File.open(filename, 'w') {|f| f << gemspec.to_ruby }
- puts "Created gemspec: #{filename}"
-end
-
-desc 'install Sanitize'
-task :install => :gem do
- sh "gem install pkg/sanitize-#{Sanitize::VERSION}.gem"
-end
View
54 sanitize.gemspec
@@ -1,36 +1,30 @@
-# -*- encoding: utf-8 -*-
+# encoding: utf-8
+require './lib/sanitize/version'
Gem::Specification.new do |s|
- s.name = %q{sanitize}
- s.version = "2.0.3"
+ s.name = 'sanitize'
+ s.summary = 'Whitelist-based HTML sanitizer.'
+ s.version = Sanitize::VERSION
+ s.authors = ['Ryan Grove']
+ s.email = 'ryan@wonko.com'
+ s.homepage = 'https://github.com/rgrove/sanitize/'
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = [%q{Ryan Grove}]
- s.date = %q{2011-07-02}
- s.email = %q{ryan@wonko.com}
- s.files = [%q{HISTORY.md}, %q{LICENSE}, %q{README.rdoc}, %q{lib/sanitize/config/basic.rb}, %q{lib/sanitize/config/relaxed.rb}, %q{lib/sanitize/config/restricted.rb}, %q{lib/sanitize/config.rb}, %q{lib/sanitize/transformers/clean_cdata.rb}, %q{lib/sanitize/transformers/clean_comment.rb}, %q{lib/sanitize/transformers/clean_element.rb}, %q{lib/sanitize/version.rb}, %q{lib/sanitize.rb}]
- s.homepage = %q{https://github.com/rgrove/sanitize/}
- s.require_paths = [%q{lib}]
- s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
- s.rubyforge_project = %q{riposte}
- s.rubygems_version = %q{1.8.5}
- s.summary = %q{Whitelist-based HTML sanitizer.}
+ s.platform = Gem::Platform::RUBY
+ s.required_ruby_version = Gem::Requirement.new('>= 1.8.7')
+ s.required_rubygems_version = Gem::Requirement.new('>= 1.2.0')
- if s.respond_to? :specification_version then
- s.specification_version = 3
+ # Runtime dependencies.
+ s.add_dependency('nokogiri', '>= 1.4.4', '< 1.6')
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<nokogiri>, ["< 1.6", ">= 1.4.4"])
- s.add_development_dependency(%q<minitest>, ["~> 2.0.0"])
- s.add_development_dependency(%q<rake>, ["~> 0.8.0"])
- else
- s.add_dependency(%q<nokogiri>, ["< 1.6", ">= 1.4.4"])
- s.add_dependency(%q<minitest>, ["~> 2.0.0"])
- s.add_dependency(%q<rake>, ["~> 0.8.0"])
- end
- else
- s.add_dependency(%q<nokogiri>, ["< 1.6", ">= 1.4.4"])
- s.add_dependency(%q<minitest>, ["~> 2.0.0"])
- s.add_dependency(%q<rake>, ["~> 0.8.0"])
- end
+ # Development dependencies.
+ s.add_development_dependency('minitest', '~> 2.0.0')
+ s.add_development_dependency('rake', '~> 0.8.0')
+
+ s.require_paths = ['lib']
+
+ s.files = [
+ 'HISTORY.md',
+ 'LICENSE',
+ 'README.rdoc'
+ ] + Dir.glob('lib/**/*.rb')
end
Please sign in to comment.
Something went wrong with that request. Please try again.