Commit 63d2d192 authored by Seba Gamboa's avatar Seba Gamboa

Expose MRuby source as a gem

parent 64d7dec4
...@@ -20,4 +20,4 @@ cscope.out ...@@ -20,4 +20,4 @@ cscope.out
/src/y.tab.c /src/y.tab.c
/bin /bin
/build /build
/lib /mruby-source-*.gem
require "mruby/source/path"
require "mruby/source/version"
require "pathname"
module MRuby
module Source
def self.path
Pathname.new(File.expand_path('../../../../',__FILE__))
end
end
end
require "mruby/source/path"
module MRuby
module Source
# Reads a constant defined at version.h
MRUBY_READ_VERSION_CONSTANT = -> (name) { Source.path.join('include','mruby','version.h').read.match(/^#define #{name} "?(\w+)"?$/)[1] }
MRUBY_RELEASE_MAJOR = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_MAJOR'])
MRUBY_RELEASE_MINOR = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_MINOR'])
MRUBY_RELEASE_TEENY = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_TEENY'])
MRUBY_VERSION = [MRUBY_RELEASE_MAJOR,MRUBY_RELEASE_MINOR,MRUBY_RELEASE_TEENY].join('.')
end
end
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'mruby/source/version'
Gem::Specification.new do |spec|
spec.name = "mruby-source"
spec.version = MRuby::Source::MRUBY_VERSION
spec.authors = ["mruby developers"]
spec.summary = %q{MRuby source code wrapper.}
spec.description = %q{MRuby source code wrapper for use with Ruby libs.}
spec.homepage = "http://www.mruby.org/"
spec.license = "MIT"
spec.files = `git ls-files -z`.split("\x0")
spec.require_paths = ["lib"]
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment