Skip to content

Commit

Permalink
add initial gemspec and build
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Jan 12, 2016
1 parent aa0c062 commit 990b8b5
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,3 +1,5 @@
/_*/
/Gemfile.lock
/pkg/
/.ruby-gemset
/.ruby-version
4 changes: 4 additions & 0 deletions Gemfile
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

# Look in asciidoctor-bespoke.gemspec for runtime and development dependencies.
gemspec
7 changes: 7 additions & 0 deletions Rakefile
@@ -0,0 +1,7 @@
begin
require 'bundler/gem_tasks'
rescue LoadError => e
warn e.message
end

task default: ['build']
32 changes: 32 additions & 0 deletions asciidoctor-bespoke.gemspec
@@ -0,0 +1,32 @@
# -*- encoding: utf-8 -*-
require File.expand_path '../lib/asciidoctor-bespoke/version', __FILE__

Gem::Specification.new do |s|
s.name = 'asciidoctor-bespoke'
s.version = Asciidoctor::Bespoke::VERSION
s.authors = ['Dan Allen']
s.email = ['dan.j.allen@gmail.com']
s.homepage = 'https://github.com/asciidoctor/asciidoctor-bespoke'
s.summary = 'Converts AsciiDoc to the HTML part of a Bespoke.js presentation'
s.description = 'A converter for Asciidoctor that produces the HTML part of a Bespoke.js presentation from an AsciiDoc source file.'
s.license = 'MIT'
s.required_ruby_version = '>= 1.9.3'

begin
s.files = `git ls-files -z -- {bin,lib,templates}/* {LICENSE,README}.adoc Rakefile`.split "\0"
rescue
s.files = Dir['**/*']
end

s.executables = ['asciidoctor-bespoke']
s.extra_rdoc_files = Dir['README.doc', 'LICENSE.adoc']
s.require_paths = ['lib']

#s.add_runtime_dependency 'asciidoctor', '~> 1.5.0'

s.add_development_dependency 'asciidoctor', '~> 1.5.0'
s.add_development_dependency 'rake', '~> 10.4.2'
s.add_development_dependency 'slim', '~> 3.0.6'
s.add_development_dependency 'thread_safe', '~> 0.3.5'
s.add_development_dependency 'tilt', '~> 2.0.2'
end
20 changes: 20 additions & 0 deletions bin/asciidoctor-bespoke
@@ -0,0 +1,20 @@
#!/usr/bin/env ruby

if File.exist?(asciidoctor_bespoke = (File.expand_path '../../lib/asciidoctor-bespoke', __FILE__))
require asciidoctor_bespoke
else
require 'asciidoctor-bespoke'
end
require 'asciidoctor/cli'

options = Asciidoctor::Cli::Options.new backend: 'bespoke'

# FIXME This is a really bizarre API. Please make me simpler.
if Integer === (result = options.parse! ARGV)
exit result
else
invoker = Asciidoctor::Cli::Invoker.new options
GC.start
invoker.invoke!
exit invoker.code
end
5 changes: 5 additions & 0 deletions lib/asciidoctor-bespoke/version.rb
@@ -0,0 +1,5 @@
module Asciidoctor
module Bespoke
VERSION = '1.0.0.dev'
end
end

0 comments on commit 990b8b5

Please sign in to comment.