Sha256: e6611f6431e208623122689177f1356c2dcfb9b5d4e0a80f1c5f6f9208cd7fae
Contents?: true
Size: 1.37 KB
Versions: 1
Compression:
Stored size: 1.37 KB
Contents
require 'fileutils' require 'rails/version' require 'rails_generator' require 'rails_generator/scripts/generate' module Provisional module SCM class Svn def initialize(options) @options = options end def rescuing_exceptions(&block) begin yield rescue raise RuntimeError, "Repository not created due to exception: #{$!}" end end def init raise NotImplementedError, "The SVN scm cannot currently be used directly" end def generate_rails rescuing_exceptions do system("svn co --username=#{@options['username']} --password=#{@options['password']} #{@options['url']} #{@options['name']}") Dir.chdir @options['name'] %w(branches tags trunk).each {|d| Dir.mkdir(d)} system("svn add branches tags trunk") system("svn commit -m 'Structure by Provisional'") Dir.chdir 'trunk' generator_options = ['.', '-m', @options['template_path']] Rails::Generator::Base.use_application_sources! Rails::Generator::Scripts::Generate.new.run generator_options, :generator => 'app' end end def checkin # TODO: set svn:ignores rescuing_exceptions do system("svn add *") system("svn commit -m 'Initial commit by Provisional'") end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vigetlabs-provisional-2.1.1 | lib/provisional/scm/svn.rb |