Skip to content

Commit

Permalink
Integrated with Jeweler
Browse files Browse the repository at this point in the history
* Closes #81.
  • Loading branch information
h3rald committed Feb 13, 2010
1 parent 39503bd commit 04246ab
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 33 deletions.
52 changes: 30 additions & 22 deletions Rakefile
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion extras/handbook/output/html/glyph_handbook.html
Expand Up @@ -196,7 +196,7 @@ <h1>


<div class="pubdate">
07 February 2010
13 February 2010
</div>
</div>

Expand Down
12 changes: 12 additions & 0 deletions glyph.gemspec
Expand Up @@ -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<gli>, [">= 0.3.1"])
s.add_runtime_dependency(%q<extlib>, [">= 0.9.12"])
s.add_runtime_dependency(%q<treetop>, [">= 0.4.3"])
s.add_runtime_dependency(%q<rake>, [">= 0.8.7"])
s.add_development_dependency(%q<rspec>, [">= 0"])
else
s.add_dependency(%q<gli>, [">= 0.3.1"])
s.add_dependency(%q<extlib>, [">= 0.9.12"])
s.add_dependency(%q<treetop>, [">= 0.4.3"])
s.add_dependency(%q<rake>, [">= 0.8.7"])
s.add_dependency(%q<rspec>, [">= 0"])
end
else
s.add_dependency(%q<gli>, [">= 0.3.1"])
s.add_dependency(%q<extlib>, [">= 0.9.12"])
s.add_dependency(%q<treetop>, [">= 0.4.3"])
s.add_dependency(%q<rake>, [">= 0.8.7"])
s.add_dependency(%q<rspec>, [">= 0"])
end
end
Expand Down
20 changes: 10 additions & 10 deletions lib/glyph.rb
Expand Up @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit 04246ab

Please sign in to comment.