From 04246abd0539484a8199ceaa45f4b495128e20b0 Mon Sep 17 00:00:00 2001 From: h3rald Date: Sat, 13 Feb 2010 19:54:02 +0100 Subject: [PATCH] Integrated with Jeweler * Closes #81. --- Rakefile | 52 +++++++++++-------- .../handbook/output/html/glyph_handbook.html | 2 +- glyph.gemspec | 12 +++++ lib/glyph.rb | 20 +++---- 4 files changed, 53 insertions(+), 33 deletions(-) diff --git a/Rakefile b/Rakefile index af027b9..607ba4c 100644 --- a/Rakefile +++ b/Rakefile @@ -2,41 +2,49 @@ $: << File.expand_path(File.dirname(__FILE__) + '/lib') require 'rubygems' require 'rake/clean' -require 'spec/rake/spectask' require 'glyph' task :default => :spec begin - require 'yard' - YARD::Rake::YardocTask.new(:yardoc) do |t| - t.files = ['lib/**/*.rb', 'README.textile', 'lib/*.rb'] - t.options = ['--no-private'] + require 'yard' + YARD::Rake::YardocTask.new(:yardoc) do |t| + t.files = ['lib/**/*.rb', 'README.textile', 'lib/*.rb'] + t.options = ['--no-private'] end rescue LoadError - task :yardoc do - abort "YARD is not available. Install it with: gem install yard" - end + task :yardoc do + abort "YARD is not available. Install it with: gem install yard" + end end begin - require 'jeweler' - Jeweler::Tasks.new do |s| - s.name = "glyph" - s.summary = "Glyph -- A Ruby-powered Document Authoring Framework" - s.description = "Glyph is a framework for structured document authoring." - s.email = "h3rald@h3rald.com" - s.homepage = "http://www.h3rald.com/glyph/" - s.authors = ["Fabio Cevasco"] - s.add_development_dependency "rspec" - end - Jeweler::GemcutterTasks.new + require 'jeweler' + Jeweler::Tasks.new do |s| + s.name = "glyph" + s.summary = "Glyph -- A Ruby-powered Document Authoring Framework" + s.description = "Glyph is a framework for structured document authoring." + s.email = "h3rald@h3rald.com" + s.homepage = "http://www.h3rald.com/glyph/" + s.authors = ["Fabio Cevasco"] + s.add_dependency 'gli', '>= 0.3.1' + s.add_dependency 'extlib', '>= 0.9.12' + s.add_dependency 'treetop', '>= 0.4.3' + s.add_dependency 'rake', '>= 0.8.7' + s.add_development_dependency 'rspec' + end + Jeweler::GemcutterTasks.new rescue LoadError - puts "Jeweler not available. Install it with: gem install jeweler" + puts "Jeweler is not available. Install it with: gem install jeweler" end -Spec::Rake::SpecTask.new('spec') do |t| - t.spec_files = FileList['spec/**/*_spec.rb'] +begin + require 'spec/rake/spectask' + Spec::Rake::SpecTask.new('spec') do |t| + t.spec_files = FileList['spec/**/*_spec.rb'] + end +rescue LoadError + puts "RSpec is not available. Install it with: gem install rspec" end FileList['tasks/**/*.rake'].each { |t| load t} diff --git a/extras/handbook/output/html/glyph_handbook.html b/extras/handbook/output/html/glyph_handbook.html index 2c65036..94e9a79 100644 --- a/extras/handbook/output/html/glyph_handbook.html +++ b/extras/handbook/output/html/glyph_handbook.html @@ -196,7 +196,7 @@

- 07 February 2010 + 13 February 2010
diff --git a/glyph.gemspec b/glyph.gemspec index a50db3f..3b58d74 100644 --- a/glyph.gemspec +++ b/glyph.gemspec @@ -99,11 +99,23 @@ Gem::Specification.new do |s| s.specification_version = 3 if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then + s.add_runtime_dependency(%q, [">= 0.3.1"]) + s.add_runtime_dependency(%q, [">= 0.9.12"]) + s.add_runtime_dependency(%q, [">= 0.4.3"]) + s.add_runtime_dependency(%q, [">= 0.8.7"]) s.add_development_dependency(%q, [">= 0"]) else + s.add_dependency(%q, [">= 0.3.1"]) + s.add_dependency(%q, [">= 0.9.12"]) + s.add_dependency(%q, [">= 0.4.3"]) + s.add_dependency(%q, [">= 0.8.7"]) s.add_dependency(%q, [">= 0"]) end else + s.add_dependency(%q, [">= 0.3.1"]) + s.add_dependency(%q, [">= 0.9.12"]) + s.add_dependency(%q, [">= 0.4.3"]) + s.add_dependency(%q, [">= 0.8.7"]) s.add_dependency(%q, [">= 0"]) end end diff --git a/lib/glyph.rb b/lib/glyph.rb index 1a30dbe..9e9958a 100644 --- a/lib/glyph.rb +++ b/lib/glyph.rb @@ -13,12 +13,20 @@ # Glyph is a Rapid Document Authoring Framework able to produce structured documents effortlessly. module Glyph - VERSION = '0.1.0' - LIB = Pathname(__FILE__).dirname.expand_path/'glyph' HOME = LIB/'../../' + require LIB/'system_extensions' + require LIB/'config' + require LIB/'node' + require LIB/'document' + require LIB/'glyph_language' + require LIB/'macro' + require LIB/'interpreter' + + VERSION = file_load HOME/'VERSION' + SPEC_DIR = Pathname(__FILE__).dirname.expand_path/'../spec' TASKS_DIR = Pathname(__FILE__).dirname.expand_path/'../tasks' @@ -33,14 +41,6 @@ module Glyph ERRORS = [] - require LIB/'system_extensions' - require LIB/'config' - require LIB/'node' - require LIB/'document' - require LIB/'glyph_language' - require LIB/'macro' - require LIB/'interpreter' - # Returns true if Glyph is running in test mode def self.testing? const_defined? :TEST_MODE rescue false