Sha256: 08e7af5d7dc1c6ffbba2bda9a5b7a4659fc62eea55a2f5622eb6189453792e15
Contents?: true
Size: 919 Bytes
Versions: 2
Compression:
Stored size: 919 Bytes
Contents
#!/usr/bin/env ruby version = File.read(File.dirname(__FILE__)+'/../VERSION').strip 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 'bundler/setup' if $LOAD_PATH.grep(/gitdoc$/).empty? require 'gitdoc' GitDoc! END rakefile = <<-END require 'bundler/setup' if $LOAD_PATH.grep(/gitdoc$/).empty? require 'gitdoc/tasks' END gemfile = <<-END source :rubygems gem 'gitdoc', '#{version}' END powrc = <<-END export RUBYOPT="rubygems" 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 } File.open('.powrc','w') { |f| f.write powrc } system 'bundle install'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gitdoc-4.5.0 | bin/gitdoc |
gitdoc-4.4.0 | bin/gitdoc |