Sha256: 74dfa31b504f4e4917ec759991e635555e8bddd4273cefe3f7c5df844830f40e

Contents?: true

Size: 770 Bytes

Versions: 2

Compression:

Stored size: 770 Bytes

Contents

#!/usr/bin/env ruby

version = File.read(File.dirname(__FILE__)+'/../VERSION')

unless ARGV == ['init']
  puts "GitDoc version #{version}"
  puts "Run with 'init' to make the current directory a GitDoc instance"
  exit
end

if File.exists? 'config.ru'
  abort "config.ru exists, is GitDoc already set up for this folder?"
end

config = <<-END
require 'gitdoc'

GitDoc!
END

rakefile = <<-END
require 'bundler/setup' unless $LOAD_PATH.detect { |p| p =~ /gitdoc$/ }
require 'gitdoc/tasks'
END

gemfile = <<-END
source :rubygems
gem 'gitdoc', '#{version}'
END

index = <<-END
Welcome to GitDoc
END

File.open('config.ru','w') { |f| f.write config }
File.open('Rakefile','w') { |f| f.write rakefile }
File.open('Gemfile','w') { |f| f.write gemfile }

system 'bundle install'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gitdoc-3.1.0 bin/gitdoc
gitdoc-3.0.0 bin/gitdoc