From 660656205297abe0ea63dfac66c0966756c8153a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aslak=20Helles=C3=B8y?= Date: Mon, 30 Mar 2009 10:30:46 +0200 Subject: [PATCH] Polyglot is no longer forced upon people. 2 minor gemspec updates. --- History.txt | 7 +++++++ lib/treetop.rb | 3 --- lib/treetop/polyglot.rb | 2 ++ treetop.gemspec | 6 +++--- 4 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 lib/treetop/polyglot.rb diff --git a/History.txt b/History.txt index 7b4069c..e533b78 100644 --- a/History.txt +++ b/History.txt @@ -1,3 +1,10 @@ +== 1.2.6 (In Git) + +* 2 minor enhancement: + * Set the treetop rubyforge project in gemspec + * Deprecated autorequire no longer used in gemspec + * Polyglot is no longer loaded automatically - it must be done explicitly with require 'treetop/polyglot' + == 1.2.5 2009-03-10 * 1 minor enhancement: diff --git a/lib/treetop.rb b/lib/treetop.rb index ed00cbf..1a93582 100644 --- a/lib/treetop.rb +++ b/lib/treetop.rb @@ -6,6 +6,3 @@ require File.join(TREETOP_ROOT, "ruby_extensions") require File.join(TREETOP_ROOT, "runtime") require File.join(TREETOP_ROOT, "compiler") - -require 'polyglot' -Polyglot.register(["treetop", "tt"], Treetop) diff --git a/lib/treetop/polyglot.rb b/lib/treetop/polyglot.rb new file mode 100644 index 0000000..fa73fa0 --- /dev/null +++ b/lib/treetop/polyglot.rb @@ -0,0 +1,2 @@ +require 'polyglot' +Polyglot.register(["treetop", "tt"], Treetop) diff --git a/treetop.gemspec b/treetop.gemspec index 2e90bc3..ab1e81c 100644 --- a/treetop.gemspec +++ b/treetop.gemspec @@ -7,12 +7,12 @@ $gemspec = Gem::Specification.new do |s| s.homepage = "http://functionalform.blogspot.com" s.platform = Gem::Platform::RUBY s.summary = "A Ruby-based text parsing and interpretation DSL" - s.files = ["README", "Rakefile", "{test,lib,bin,doc,examples}/**/*"].map{|p| Dir[p]}.flatten + s.files = ["README", "History.txt", "Rakefile", "{test,lib,bin,doc,examples}/**/*"].map{|p| Dir[p]}.flatten s.bindir = "bin" s.executables = ["tt"] + s.rubyforge_project = "treetop" s.require_path = "lib" - s.autorequire = "treetop" s.has_rdoc = false - s.add_dependency "polyglot" + s.add_dependency "polyglot", ">= 0.2.5" end