Sha256: 95c9d7e31f453646e6464dd1e16881f8e4e21915154063017451cfe532aaec65

Contents?: true

Size: 1.41 KB

Versions: 28

Compression:

Stored size: 1.41 KB

Contents

#!/usr/bin/env ruby

$:.unshift(File.dirname(__FILE__)+"/../lib")

require 'logger'

require 'rtext/default_loader'
require 'rtext/default_service_provider'
require 'rtext/service'
require 'rgen/environment'
require 'rgen/fragment/fragmented_model'

require_relative '../lib/bake/model/language'
require_relative '../lib/bake/model/metamodel'
require_relative '../lib/rtext-service/options/options'

$options = Bake::BakeRtextServiceOptions.new(ARGV)
$options.parse_options()

model = RGen::Fragment::FragmentedModel.new(:env => @env)
patterns = $options.patterns.map { |dir| File.join(dir, "{Project,Adapt}.meta") }

loader = RText::DefaultLoader.new(
  Bake::Language,
  model,
  :file_provider => proc { Dir.glob(patterns) })

bake_service_provider = RText::DefaultServiceProvider.new(Bake::Language, model, loader)

logger = Logger.new(STDOUT)
logger.level =
  case $options.loglevel
  when 'debug' then Logger::DEBUG
  when 'info' then Logger::INFO
  when 'warn' then Logger::WARN
  when 'error' then Logger::ERROR
  when 'fatal' then Logger::FATAL
  else Logger::INFO
  end

on_startup = -> {
  Bake::Version.printBakeRtextServiceVersion
  puts "Idle timeout #{$options.timeout} seconds, log level '#{$options.loglevel}'"
}

rtext_rervice = RText::Service.new(bake_service_provider,
  { :timeout => $options.timeout, :logger => logger, :on_startup => on_startup })
rtext_rervice.run()

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
bake-toolkit-2.72.0 bin/bake-rtext-service
bake-toolkit-2.71.0 bin/bake-rtext-service
bake-toolkit-2.70.1 bin/bake-rtext-service
bake-toolkit-2.70.0 bin/bake-rtext-service
bake-toolkit-2.69.0 bin/bake-rtext-service
bake-toolkit-2.68.1 bin/bake-rtext-service
bake-toolkit-2.68.0 bin/bake-rtext-service
bake-toolkit-2.67.0 bin/bake-rtext-service
bake-toolkit-2.66.0 bin/bake-rtext-service
bake-toolkit-2.65.2 bin/bake-rtext-service
bake-toolkit-2.65.1 bin/bake-rtext-service
bake-toolkit-2.65.0 bin/bake-rtext-service
bake-toolkit-2.64.4 bin/bake-rtext-service
bake-toolkit-2.64.3 bin/bake-rtext-service
bake-toolkit-2.64.2 bin/bake-rtext-service
bake-toolkit-2.64.1 bin/bake-rtext-service
bake-toolkit-2.64.0 bin/bake-rtext-service
bake-toolkit-2.63.2 bin/bake-rtext-service
bake-toolkit-2.63.1 bin/bake-rtext-service
bake-toolkit-2.63.0 bin/bake-rtext-service