Sha256: 569b75d1915b8c8f917db59ab8ec3e4743b7e7bd351fde1f5f9149956f723f43

Contents?: true

Size: 909 Bytes

Versions: 16

Compression:

Stored size: 909 Bytes

Contents

require 'thor'
require 'thor/group'

module Utter
  module Generators
    class Domain < Thor::Group
      include Thor::Actions

      desc 'Generate an utter project skleton'
      def create_domain params={}
	path = params[:path]
	# config.ru
	create_file "#{path}/domain/main.rb"
	@file = <<-FOO
require 'utter'
Dir[File.dirname(__FILE__) + '/**/*.rb'].each {|file| require_relative file }
#TODO require all extentions in the domain/extentions dir
#TODO require a relevant domain-specific framework
#TODO write some domain-specific rules here thus that the 
#recievied rules{}from the microservices gets evaluated based on them. 
	FOO
	append_to_file "#{path}/domain/main.rb", @file

	#open("#{path}/domain/main.rb", 'a') do |f|
	#  f.puts @file
	#end
	# end of config.ru
	############################	
	# create domain/extensions
	#empty_directory "#{path}/domain/extensions"
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
utter-1.9.0 lib/generators/domain_gem_generator.rb
utter-1.8.0 lib/generators/domain_gem_generator.rb
utter-1.7.0 lib/generators/domain_gem_generator.rb
utter-1.6.0 lib/generators/domain_gem_generator.rb
utter-1.5.0 lib/generators/domain_gem_generator.rb
utter-1.4.0 lib/generators/domain_gem_generator.rb
utter-1.3.2 lib/generators/domain_gem_generator.rb
utter-1.3.1 lib/generators/domain_gem_generator.rb
utter-1.3.0 lib/generators/domain_gem_generator.rb
utter-1.2.0 lib/generators/domain_gem_generator.rb
utter-1.1.0 lib/generators/domain_gem_generator.rb
utter-1.0.23 lib/generators/domain_gem_generator.rb
utter-1.0.21 bin/generators/domain.rb
utter-1.0.20 bin/generators/domain.rb
utter-1.0.19 bin/generators/domain.rb
utter-1.0.18 bin/generators/domain.rb