Sha256: e3704a10bb8ddca4c1d1495f364bf3d7431493a1837c5882b0f3cbee0c36c1c8

Contents?: true

Size: 1.11 KB

Versions: 241

Compression:

Stored size: 1.11 KB

Contents

#!/usr/bin/env ruby

require 'rbbt-util'
require 'rbbt/resource'
require 'rbbt/workflow'

options = SOPT.get <<EOF
-W--workflows* Workflows to use; 'all' for all in Rbbt.etc.workflows:
-r--requires* Files to require; 'all' for all in Rbbt.etc.requires:
-O--output* Where to save the file. Defaults to its proper location:
-s--server* Server to use:
-w--where* What path location to use
-h--help Help
EOF

if options[:help]
  puts SOPT.doc 
  exit
end

case options[:workflows]
when nil, false, "false", "none"
when "all"
  Rbbt.etc.workflows.list.each do |workflow|
    Workflow.require_workflow file
  end if Rbbt.etc.workflows.exists?
else
  options[:workflows].split(/[ ,;|]/).each do |workflow|
    Workflow.require_workflow workflow
  end
end

case options[:requires]
when nil, false, "false", "none"
when "all"
  Rbbt.etc.requires.list.each do |file|
    require file
  end if Rbbt.etc.requires.exists?
else
  options[:requires].split(/[ ,;|]/).each do |file|
    require file
  end
end

resource, path = ARGV

resource = Kernel.const_get(resource)

Misc.consume_stream resource[path].find(options[:where]).open, false, STDOUT

Version data entries

241 entries across 241 versions & 1 rubygems

Version Path
rbbt-util-5.26.153 share/rbbt_commands/resource/read
rbbt-util-5.26.152 share/rbbt_commands/resource/read
rbbt-util-5.26.151 share/rbbt_commands/resource/read
rbbt-util-5.26.150 share/rbbt_commands/resource/read
rbbt-util-5.26.149 share/rbbt_commands/resource/read
rbbt-util-5.26.148 share/rbbt_commands/resource/read
rbbt-util-5.26.147 share/rbbt_commands/resource/read
rbbt-util-5.26.146 share/rbbt_commands/resource/read
rbbt-util-5.26.145 share/rbbt_commands/resource/read
rbbt-util-5.26.144 share/rbbt_commands/resource/read
rbbt-util-5.26.143 share/rbbt_commands/resource/read
rbbt-util-5.26.142 share/rbbt_commands/resource/read
rbbt-util-5.26.141 share/rbbt_commands/resource/read
rbbt-util-5.26.140 share/rbbt_commands/resource/read
rbbt-util-5.26.139 share/rbbt_commands/resource/read
rbbt-util-5.26.138 share/rbbt_commands/resource/read
rbbt-util-5.26.137 share/rbbt_commands/resource/read
rbbt-util-5.26.136 share/rbbt_commands/resource/read
rbbt-util-5.26.135 share/rbbt_commands/resource/read
rbbt-util-5.26.134 share/rbbt_commands/resource/read