Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 77 lines (68 sloc) 1.945 kb
dc37121 @ohadlevy Added required files to generate a safemode gem
ohadlevy authored
1 # encoding: utf-8
2
3 require 'rubygems'
4 require 'bundler'
5 begin
6 Bundler.setup(:default, :development)
7 rescue Bundler::BundlerError => e
8 $stderr.puts e.message
9 $stderr.puts "Run `bundle install` to install missing gems"
10 exit e.status_code
11 end
12
c4723e1 @kronn require "redgreen" if available to get a better feedback
kronn authored
13 # optional libraries
14 %w[ redgreen ].each do |lib|
15 begin
16 require lib
17 rescue LoadError
18 end
19 end
dc37121 @ohadlevy Added required files to generate a safemode gem
ohadlevy authored
20 require 'rake'
c4723e1 @kronn require "redgreen" if available to get a better feedback
kronn authored
21
dc37121 @ohadlevy Added required files to generate a safemode gem
ohadlevy authored
22 require 'jeweler'
23 Jeweler::Tasks.new do |gem|
24 # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
25 gem.name = "safemode"
26 gem.homepage = "http://github.com/svenfuchs/safemode"
27 gem.license = "MIT"
28 gem.summary = %Q{A library for safe evaluation of Ruby code based on ParseTree/RubyParser and Ruby2Ruby}
29 gem.description = %Q{A library for safe evaluation of Ruby code based on RubyParser and Ruby2Ruby. Provides Rails ActionView template handlers for ERB and Haml.}
30 gem.email = "ohadlevy@gmail.com"
dc6b1b0 @kronn add proper attributions and bump version to 1.0.1
kronn authored
31 gem.authors = [
32 "Sven Fuchs",
33 "Peter Cooper",
34 "Matthias Viehweger",
35 "Kingsley Hendrickse",
36 "Ohad Levy",
1ecaa28 @ohadlevy Version bump to 1.1.0
ohadlevy authored
37 "Dmitri Dolguikh",
dc6b1b0 @kronn add proper attributions and bump version to 1.0.1
kronn authored
38 ]
dc37121 @ohadlevy Added required files to generate a safemode gem
ohadlevy authored
39 # dependencies defined in Gemfile
40 end
41 Jeweler::RubygemsDotOrgTasks.new
1b3bf94 @kronn added Rakefile with basic test-task
kronn authored
42
dc37121 @ohadlevy Added required files to generate a safemode gem
ohadlevy authored
43 require 'rake/testtask'
44 Rake::TestTask.new(:test) do |test|
45 test.libs << 'lib' << 'test'
46 test.pattern = 'test/**/test_*.rb'
47 test.verbose = true
48 end
49
1e5370a @witlessbird updated to use latest version of ruby_parser, ruby2ruby, and sexp_proces...
witlessbird authored
50 if RUBY_VERSION >= "1.9"
51 desc "Generate coverage report for tests"
52 task :coverage do |cov|
53 ENV['COVERAGE'] = 'true'
54 Rake::Task[:test].execute
55 end
56 else
57 require 'rcov/rcovtask'
58 Rcov::RcovTask.new do |test|
59 test.libs << 'test'
60 test.pattern = 'test/**/test_*.rb'
61 test.verbose = true
62 test.rcov_opts << '--exclude "gems/*"'
63 end
dc37121 @ohadlevy Added required files to generate a safemode gem
ohadlevy authored
64 end
65
66 task :default => :test
67
68 require 'rdoc/task'
69 Rake::RDocTask.new do |rdoc|
70 version = File.exist?('VERSION') ? File.read('VERSION') : ""
71
72 rdoc.rdoc_dir = 'rdoc'
73 rdoc.title = "safemode #{version}"
74 rdoc.rdoc_files.include('README*')
75 rdoc.rdoc_files.include('lib/**/*.rb')
1b3bf94 @kronn added Rakefile with basic test-task
kronn authored
76 end
Something went wrong with that request. Please try again.