Module: CPEE::Instantiation
- Defined in:
- lib/cpee/instantiation.rb
Defined Under Namespace
Modules: Helpers Classes: ContinueTask, HandleInstance, InstantiateUrl, InstantiateXML
Constant Summary collapse
- SERVER =
File.(__dir__ + '/../instantiation.xml')
Class Method Summary collapse
Class Method Details
.implementation(opts) ⇒ Object
}}}
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/cpee/instantiation.rb', line 228 def self::implementation(opts) opts[:cpee] ||= 'http://localhost:9298/' opts[:self] ||= "http#{opts[:secure] ? 's' : ''}://#{opts[:host]}:#{opts[:port]}/" opts[:cblist] = Redis.new(path: "/tmp/redis.sock", db: 14) Proc.new do on resource do run InstantiateXML, opts[:cpee], true if post 'xmlsimple' on resource 'xml' do run InstantiateXML, opts[:cpee], false if post 'xml' end on resource 'url' do run InstantiateUrl, opts[:cpee], opts[:self], opts[:cblist] if post 'url' end on resource 'instance' do run HandleInstance, opts[:cpee] if post 'instance' end on resource 'callback' do on resource do run ContinueTask, opts[:cpee], opts[:cblist] if post end end end end end |