1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

'gemify' the source

This commit is contained in:
Charles Lowell 2009-12-15 07:35:55 +02:00
parent 14ed2e9b5b
commit 2df1f3f33b
36 changed files with 234 additions and 0 deletions

4
History.txt Normal file
View file

@ -0,0 +1,4 @@
=== 0.0.1 2009-12-14
* 1 major enhancement:
* Initial release

43
Manifest.txt Normal file
View file

@ -0,0 +1,43 @@
Doxyfile
History.txt
Manifest.txt
README.rdoc
Rakefile
config.sh
docs/data_conversion.txt
ext/v8/convert_ruby.cpp
ext/v8/convert_ruby.h
ext/v8/convert_string.cpp
ext/v8/convert_string.h
ext/v8/convert_v8.cpp
ext/v8/convert_v8.h
ext/v8/converters.h
ext/v8/extconf.rb
ext/v8/v8.cpp
ext/v8/v8_context.cpp
ext/v8/v8_context.h
ext/v8/v8_cxt.cpp
ext/v8/v8_cxt.h
ext/v8/v8_object.cpp
ext/v8/v8_object.h
ext/v8/v8_ref.cpp
ext/v8/v8_ref.h
ext/v8/v8_script.cpp
ext/v8/v8_script.h
ext/v8/v8_standalone.cpp
ext/v8/v8_standalone.h
ext/v8/v8_str.cpp
ext/v8/v8_str.h
ext/v8/v8_template.cpp
ext/v8/v8_template.h
lib/v8.rb
lib/v8/v8.bundle
script/console
script/destroy
script/generate
spec/spec.opts
spec/spec_helper.rb
spec/therubyracer_spec.rb
spike.rb
tasks/rspec.rake
therubyracer.gemspec

49
README.rdoc Normal file
View file

@ -0,0 +1,49 @@
= therubyracer
* http://github.com/cowboyd/therubyracer
== DESCRIPTION:
Embed the V8 Javascript interpreter into Ruby.
== FEATURES/PROBLEMS:
* Inspires fun.
* Not close to production ready.
== SYNOPSIS:
Check back in February 2009 for an alpha release.
== REQUIREMENTS:
* libv8 >= 0.4.0
== INSTALL:
* sudo gem install therubyracer
== LICENSE:
(The MIT License)
Copyright (c) 2009 FIXME full name
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

32
Rakefile Normal file
View file

@ -0,0 +1,32 @@
require 'rubygems'
gem 'hoe', '>= 2.1.0'
require 'hoe'
require 'fileutils'
require './lib/v8'
gem 'rake-compiler', '>= 0.4.1'
require "rake/extensiontask"
Hoe.plugin :newgem
# Generate all the Rake tasks
# Run 'rake -T' to see list of generated tasks (from gem root directory)
$hoe = Hoe.spec 'therubyracer' do
developer 'Charles Lowell', 'cowboyd@thefrontside.net'
developer 'Bill Robertson', 'billrobertson42@gmail.com'
self.rubyforge_name = self.name
self.spec_extras = { :extensions => ["ext/v8/extconf.rb"] }
self.clean_globs << "lib/v8/*.{o,so,bundle,a,log,dll}"
end
Rake::ExtensionTask.new("v8", $hoe.spec) do |ext|
ext.lib_dir = "lib/v8"
end
require 'newgem/tasks'
Dir['tasks/**/*.rake'].each { |t| load t }
# TODO - want other tests/tasks run by default? Add them to the list
# remove_task :default
# task :default => [:spec, :features]

7
lib/v8.rb Normal file
View file

@ -0,0 +1,7 @@
$:.unshift(File.dirname(__FILE__)) unless
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
module V8
VERSION = '0.4.0'
require 'v8/v8' #native glue
end

6
lib/v8/context.rb Normal file
View file

@ -0,0 +1,6 @@
module V8
# This doesn't do anything at the moment. But the ruby interface will go here
# The native interface is under the V8::C module.
class Context
end
end

10
script/console Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env ruby
# 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/therubyracer.rb'}"
puts "Loading therubyracer gem"
exec "#{irb} #{libs} --simple-prompt"

14
script/destroy Executable file
View file

@ -0,0 +1,14 @@
#!/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)

14
script/generate Executable file
View file

@ -0,0 +1,14 @@
#!/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)

21
tasks/rspec.rake Normal file
View file

@ -0,0 +1,21 @@
begin
require 'spec'
rescue LoadError
require 'rubygems' unless ENV['NO_RUBYGEMS']
require 'spec'
end
begin
require 'spec/rake/spectask'
rescue LoadError
puts <<-EOS
To use rspec for testing you must install rspec gem:
gem install rspec
EOS
exit(0)
end
desc "Run the specs under spec/models"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "spec/spec.opts"]
t.spec_files = FileList['spec/**/*_spec.rb']
end

34
therubyracer.gemspec Normal file
View file

@ -0,0 +1,34 @@
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{therubyracer}
s.version = "0.4.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Charles Lowell", "Bill Robertson"]
s.date = %q{2009-12-15}
s.description = %q{FIX (describe your package)}
s.email = ["cowboyd@thefrontside.net", "billrobertson42@gmail.com"]
s.extensions = ["ext/v8/extconf.rb"]
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "docs/data_conversion.txt"]
s.files = ["Doxyfile", "History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "config.sh", "docs/data_conversion.txt", "ext/v8/convert_ruby.cpp", "ext/v8/convert_ruby.h", "ext/v8/convert_string.cpp", "ext/v8/convert_string.h", "ext/v8/convert_v8.cpp", "ext/v8/convert_v8.h", "ext/v8/converters.h", "ext/v8/extconf.rb", "ext/v8/v8.cpp", "ext/v8/v8_context.cpp", "ext/v8/v8_context.h", "ext/v8/v8_cxt.cpp", "ext/v8/v8_cxt.h", "ext/v8/v8_object.cpp", "ext/v8/v8_object.h", "ext/v8/v8_ref.cpp", "ext/v8/v8_ref.h", "ext/v8/v8_script.cpp", "ext/v8/v8_script.h", "ext/v8/v8_standalone.cpp", "ext/v8/v8_standalone.h", "ext/v8/v8_str.cpp", "ext/v8/v8_str.h", "ext/v8/v8_template.cpp", "ext/v8/v8_template.h", "lib/v8.rb", "lib/v8/v8.bundle", "script/console", "script/destroy", "script/generate", "spec/spec.opts", "spec/spec_helper.rb", "spec/therubyracer_spec.rb", "spike.rb", "tasks/rspec.rake"]
s.homepage = %q{http://github.com/#{github_username}/#{project_name}}
s.rdoc_options = ["--main", "README.rdoc"]
s.require_paths = ["lib", "ext"]
s.rubyforge_project = %q{therubyracer}
s.rubygems_version = %q{1.3.5}
s.summary = %q{FIX (describe your package)}
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<hoe>, [">= 2.3.3"])
else
s.add_dependency(%q<hoe>, [">= 2.3.3"])
end
else
s.add_dependency(%q<hoe>, [">= 2.3.3"])
end
end