From 9d914717048d62f7e92ad2b69bba72c4bd967c69 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 10 Aug 2010 12:15:04 -0500 Subject: [PATCH] remove build dependency on hoe --- .gitignore | 4 ++-- Manifest.txt | 27 ------------------------- Rakefile | 47 +++++++++++++++++++++++++++++--------------- lib/rhino.rb | 2 +- script/console | 10 ---------- script/destroy | 14 ------------- script/generate | 14 ------------- therubyrhino.gemspec | 22 +++++++-------------- 8 files changed, 41 insertions(+), 99 deletions(-) delete mode 100644 Manifest.txt delete mode 100755 script/console delete mode 100755 script/destroy delete mode 100755 script/generate diff --git a/.gitignore b/.gitignore index a542c38..932858e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .idea -pkg -doc \ No newline at end of file +doc +*.gem \ No newline at end of file diff --git a/Manifest.txt b/Manifest.txt deleted file mode 100644 index 9c1366d..0000000 --- a/Manifest.txt +++ /dev/null @@ -1,27 +0,0 @@ -History.txt -Manifest.txt -README.rdoc -Rakefile -lib/rhino.rb -lib/rhino/context.rb -lib/rhino/java.rb -lib/rhino/native_function.rb -lib/rhino/native_object.rb -lib/rhino/object.rb -lib/rhino/rhino-1.7R2.jar -lib/rhino/ruby_function.rb -lib/rhino/ruby_object.rb -lib/rhino/wormhole.rb -script/console -script/destroy -script/generate -spec/redjs/README.txt -spec/redjs/jsapi_spec.rb -spec/redjs_helper.rb -spec/rhino/context_spec.rb -spec/rhino/wormhole_spec.rb -spec/spec.opts -spec/spec_helper.rb -tasks/jruby.rake -tasks/rspec.rake -therubyrhino.gemspec diff --git a/Rakefile b/Rakefile index 7b8cfd8..b0bdc48 100644 --- a/Rakefile +++ b/Rakefile @@ -1,21 +1,36 @@ require 'rubygems' -gem 'hoe', '>= 2.1.0' -require 'hoe' -require 'fileutils' require './lib/rhino' - -Hoe.plugin :newgem - -# Generate all the Rake tasks -# Run 'rake -T' to see list of generated tasks (from gem root directory) -$hoe = Hoe.spec 'therubyrhino' do - self.developer 'Charles Lowell', 'cowboyd@thefrontside.net' - self.rubyforge_name = self.name - self.summary = "Embed the Rhino Javascript engine into JRuby" - - self.spec_extras['platform'] = 'jruby' # JRuby gem created, e.g. therubyrhino-X.Y.Z-jruby.gem +Gem::Specification.new do |gemspec| + $gemspec = gemspec + gemspec.name = gemspec.rubyforge_project = "therubyrhino" + gemspec.version = Rhino::VERSION + gemspec.summary = "Embed the Rhino JavaScript interpreter into JRuby" + gemspec.description = "Call javascript code and manipulate javascript objects from ruby. Call ruby code and manipulate ruby objects from javascript." + gemspec.email = "cowboyd@thefrontside.net" + gemspec.homepage = "http://github.com/cowboyd/therubyrhino" + gemspec.authors = ["Charles Lowell"] + gemspec.extra_rdoc_files = ["README.rdoc"] + gemspec.files = Rake::FileList.new("**/*").tap do |manifest| + manifest.exclude "*.gem" + end end -require 'newgem/tasks' -Dir['tasks/**/*.rake'].each { |t| load t } +desc "Build gem" +task :gem => :gemspec do + Gem::Builder.new($gemspec).build +end +desc "build the gemspec" +task :gemspec => :clean do + File.open("#{$gemspec.name}.gemspec", "w") do |f| + f.write($gemspec.to_ruby) + end +end + +task :clean do + sh "rm -rf *.gem" +end + +for file in Dir['tasks/*.rake'] + load file +end diff --git a/lib/rhino.rb b/lib/rhino.rb index 21f272d..966be10 100644 --- a/lib/rhino.rb +++ b/lib/rhino.rb @@ -3,7 +3,7 @@ $:.unshift(File.dirname(__FILE__)) unless module Rhino - VERSION = '1.72.6' + VERSION = '1.72.7.pre' require 'rhino/java' require 'rhino/object' require 'rhino/context' diff --git a/script/console b/script/console deleted file mode 100755 index 6480595..0000000 --- a/script/console +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env jruby -# File: script/console -irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb' - -libs = " -r irb/completion" -# Perhaps use a console_lib to store any extra methods I may want available in the cosole -# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}" -libs << " -r #{File.dirname(__FILE__) + '/../lib/rhino.rb'}" -puts "Loading therubyrhino gem" -exec "#{irb} #{libs} --simple-prompt" \ No newline at end of file diff --git a/script/destroy b/script/destroy deleted file mode 100755 index e48464d..0000000 --- a/script/destroy +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env ruby -APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) - -begin - require 'rubigen' -rescue LoadError - require 'rubygems' - require 'rubigen' -end -require 'rubigen/scripts/destroy' - -ARGV.shift if ['--help', '-h'].include?(ARGV[0]) -RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit] -RubiGen::Scripts::Destroy.new.run(ARGV) diff --git a/script/generate b/script/generate deleted file mode 100755 index c27f655..0000000 --- a/script/generate +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env ruby -APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) - -begin - require 'rubigen' -rescue LoadError - require 'rubygems' - require 'rubigen' -end -require 'rubigen/scripts/generate' - -ARGV.shift if ['--help', '-h'].include?(ARGV[0]) -RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit] -RubiGen::Scripts::Generate.new.run(ARGV) diff --git a/therubyrhino.gemspec b/therubyrhino.gemspec index 2f58248..22649ec 100644 --- a/therubyrhino.gemspec +++ b/therubyrhino.gemspec @@ -2,36 +2,28 @@ Gem::Specification.new do |s| s.name = %q{therubyrhino} - s.version = "1.72.6" - s.platform = %q{jruby} + s.version = "1.72.7.pre" - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version= s.authors = ["Charles Lowell"] s.date = %q{2010-08-10} - s.description = %q{Embed the Mozilla Rhino Javascript interpreter into Ruby} - s.email = ["cowboyd@thefrontside.net"] - s.extra_rdoc_files = ["History.txt", "Manifest.txt"] - s.files = ["History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "lib/rhino.rb", "lib/rhino/context.rb", "lib/rhino/java.rb", "lib/rhino/native_function.rb", "lib/rhino/native_object.rb", "lib/rhino/object.rb", "lib/rhino/rhino-1.7R2.jar", "lib/rhino/ruby_function.rb", "lib/rhino/ruby_object.rb", "lib/rhino/wormhole.rb", "script/console", "script/destroy", "script/generate", "spec/redjs/README.txt", "spec/redjs/jsapi_spec.rb", "spec/redjs_helper.rb", "spec/rhino/context_spec.rb", "spec/rhino/wormhole_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/jruby.rake", "tasks/rspec.rake", "therubyrhino.gemspec"] + s.description = %q{Call javascript code and manipulate javascript objects from ruby. Call ruby code and manipulate ruby objects from javascript.} + s.email = %q{cowboyd@thefrontside.net} + s.extra_rdoc_files = ["README.rdoc"] + s.files = ["History.txt", "lib", "Rakefile", "README.rdoc", "spec", "tasks", "therubyrhino.gemspec", "lib/rhino", "lib/rhino.rb", "lib/rhino/context.rb", "lib/rhino/java.rb", "lib/rhino/native_function.rb", "lib/rhino/native_object.rb", "lib/rhino/object.rb", "lib/rhino/rhino-1.7R2.jar", "lib/rhino/ruby_function.rb", "lib/rhino/ruby_object.rb", "lib/rhino/wormhole.rb", "spec/redjs", "spec/redjs_helper.rb", "spec/rhino", "spec/spec.opts", "spec/spec_helper.rb", "spec/redjs/jsapi_spec.rb", "spec/redjs/README.txt", "spec/rhino/context_spec.rb", "spec/rhino/wormhole_spec.rb", "tasks/jruby.rake", "tasks/rspec.rake"] s.homepage = %q{http://github.com/cowboyd/therubyrhino} - s.rdoc_options = ["--main", "README.rdoc"] s.require_paths = ["lib"] s.rubyforge_project = %q{therubyrhino} s.rubygems_version = %q{1.3.6} - s.summary = %q{Embed the Rhino Javascript engine into JRuby} + s.summary = %q{Embed the Rhino JavaScript interpreter into JRuby} 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, [">= 2.0.4"]) - s.add_development_dependency(%q, [">= 2.6.1"]) else - s.add_dependency(%q, [">= 2.0.4"]) - s.add_dependency(%q, [">= 2.6.1"]) end else - s.add_dependency(%q, [">= 2.0.4"]) - s.add_dependency(%q, [">= 2.6.1"]) end end