tools/server/server.rb in cpee-1.3.230 vs tools/server/server.rb in cpee-1.4.0
- old
+ new
@@ -1,14 +1,15 @@
#!/usr/bin/ruby
require 'rubygems'
require 'cpee/implementation'
-Riddl::Server.new(CPEE::SERVER, :host => 'localhost', :port => 8298) do
- @riddl_opts[:instances] = ::File.dirname(__FILE__) + '/instances'
- @riddl_opts[:handlerwrappers] = ::File.dirname(__FILE__) + '/handlerwrappers'
- @riddl_opts[:notifications_init] = ::File.dirname(__FILE__) + '/resources/notifications'
- @riddl_opts[:properties_init] = ::File.dirname(__FILE__) + '/resources/properties.init'
+Riddl::Server.new(CPEE::SERVER, :host => 'localhost', :port => 8298) do |opts|
+ opts[:instances] = File.join(__dir__,'instances')
+ opts[:handlerwrappers] = File.join(__dir__,'handlerwrappers')
+ opts[:notifications_init] = File.join(__dir__,'resources','notifications')
+ opts[:properties_init] = File.join(__dir__,'resources','properties.init')
+
accessible_description true
cross_site_xhr true
- use CPEE::implementation(@riddl_opts)
+ use CPEE::implementation(opts)
end.loop!