Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add gemspec file

  • Loading branch information...
commit baa0616e696f78f50eadacf4fdcd20819835884a 1 parent ad8883b
@joloudov authored
Showing with 114 additions and 15 deletions.
  1. +50 −14 Rakefile
  2. +1 −1  VERSION
  3. +63 −0 rails_xss.gemspec
View
64 Rakefile
@@ -1,23 +1,59 @@
+require 'rubygems'
require 'rake'
+
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gem|
+ gem.name = "rails_xss"
+ gem.summary = %Q{A plugin for rails 2.3 apps which switches the default to escape by default}
+ gem.description = %Q{This plugin replaces the default ERB template handlers with erubis, and switches the behaviour to escape by default rather than requiring you to escape. This is consistent with the behaviour in Rails 3.0.}
+ gem.email = "joloudov@gmail.com"
+ gem.homepage = "http://github.com/joloudov/rails_xss"
+ gem.authors = ["joloudov"]
+ gem.add_development_dependency "erubis", ">= 2.6.5"
+ gem.files = [
+ '[A-Z]*',
+ '*.rb',
+ 'lib/*.rb',
+ 'lib/**/*.rb',
+ 'lib/**/*.rake',
+ ]
+ end
+ Jeweler::GemcutterTasks.new
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
+end
+
require 'rake/testtask'
-require 'rake/rdoctask'
+Rake::TestTask.new(:test) do |test|
+ test.libs << 'lib' << 'test'
+ test.pattern = 'test/**/test_*.rb'
+ test.verbose = true
+end
+
+begin
+ require 'rcov/rcovtask'
+ Rcov::RcovTask.new do |test|
+ test.libs << 'test'
+ test.pattern = 'test/**/test_*.rb'
+ test.verbose = true
+ end
+rescue LoadError
+ task :rcov do
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
+ end
+end
+
+task :test => :check_dependencies
-desc 'Default: run unit tests.'
task :default => :test
-desc 'Test the rails_xss plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.libs << 'test'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
-end
+require 'rake/rdoctask'
+Rake::RDocTask.new do |rdoc|
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
-desc 'Generate documentation for the rails_xss plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'RailsXss'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README')
+ rdoc.title = "rails_xss #{version}"
+ rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
View
2  VERSION
@@ -1 +1 @@
-0.1.2
+0.1.3
View
63 rails_xss.gemspec
@@ -0,0 +1,63 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{rails_xss}
+ s.version = "0.1.3"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["joloudov"]
+ s.date = %q{2010-07-14}
+ s.description = %q{This plugin replaces the default ERB template handlers with erubis, and switches the behaviour to escape by default rather than requiring you to escape. This is consistent with the behaviour in Rails 3.0.}
+ s.email = %q{joloudov@gmail.com}
+ s.extra_rdoc_files = [
+ "README.markdown"
+ ]
+ s.files = [
+ "MIT-LICENSE",
+ "README.markdown",
+ "Rakefile",
+ "VERSION",
+ "init.rb",
+ "lib/rails_xss.rb",
+ "lib/rails_xss/action_view.rb",
+ "lib/rails_xss/erubis.rb",
+ "lib/rails_xss/string_ext.rb",
+ "lib/tasks/rails_xss_tasks.rake"
+ ]
+ s.homepage = %q{http://github.com/joloudov/rails_xss}
+ s.rdoc_options = ["--charset=UTF-8"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.7}
+ s.summary = %q{A plugin for rails 2.3 apps which switches the default to escape by default}
+ s.test_files = [
+ "test/deprecated_output_safety_test.rb",
+ "test/output_safety_test.rb",
+ "test/form_tag_helper_test.rb",
+ "test/form_helper_test.rb",
+ "test/test_helper.rb",
+ "test/erb_util_test.rb",
+ "test/date_helper_test.rb",
+ "test/active_record_helper_test.rb",
+ "test/caching_test.rb",
+ "test/text_helper_test.rb",
+ "test/asset_tag_helper_test.rb",
+ "test/rails_xss_test.rb"
+ ]
+
+ 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
+ s.add_development_dependency(%q<erubis>, [">= 2.6.5"])
+ else
+ s.add_dependency(%q<erubis>, [">= 2.6.5"])
+ end
+ else
+ s.add_dependency(%q<erubis>, [">= 2.6.5"])
+ end
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.