Permalink
Browse files

first commit

  • Loading branch information...
MichaelVacirca committed Mar 28, 2012
0 parents commit a0f04a65ccd54e255c647ea948bb7823d75483b3
Showing with 320 additions and 0 deletions.
  1. +47 −0 Gemfile
  2. +61 −0 Gemfile.lock
  3. +12 −0 LICENSE
  4. +12 −0 README.md
  5. +144 −0 Rakefile
  6. +18 −0 config.ru
  7. +26 −0 init.rb
47 Gemfile
@@ -0,0 +1,47 @@
+# Copyright 2012 United States Government, as represented by the Secretary of Defense, Under
+# Secretary of Defense (Personnel & Readiness).
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+# in compliance with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+
+
+# Specifying versions: http://docs.rubygems.org/read/chapter/16
+
+source :rubygems
+
+gem "sinatra", ">= 1.3", :require => "sinatra/base"
+gem "json"
+
+gem "websocket-rack", :require => "rack/websocket"
+
+gem "thin"
+
+gem "rake" # for build scripts
+gem "rocco" # for documentation builds
+
+group :development do
+ gem "sinatra-reloader", :require => "sinatra/reloader"
+end
+
+group :test do
+ gem "rack-test", :require => "rack/test"
+end
+
+# Allow a prerelease version in order to resolve a websocket-rack warning about eventmachine
+# comm_inactivity_timeout. Remove once 1.0.0 is released.
+
+# 1.0.0.beta.4 won't build successfully with RubyInstaller and MinGW.
+
+gem "eventmachine", ">= 1.0.0.beta", "!= 1.0.0.beta.4"
+
+# redcarpet >= 2 no longer declares a Markdown class, which Rocco expects. Having rocco require
+# "redcarpet/compat" for redcarpet >= 2 would probably also fix this.
+
+gem "redcarpet", "< 2"
@@ -0,0 +1,61 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ addressable (2.2.7)
+ backports (2.3.0)
+ daemons (1.1.8)
+ em-websocket (0.3.6)
+ addressable (>= 2.1.1)
+ eventmachine (>= 0.12.9)
+ eventmachine (1.0.0.beta.3)
+ eventmachine (1.0.0.beta.3-x86-mingw32)
+ json (1.6.5)
+ mustache (0.99.4)
+ rack (1.4.1)
+ rack-protection (1.2.0)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rake (0.9.2.2)
+ redcarpet (1.17.2)
+ rocco (0.8.2)
+ mustache
+ redcarpet
+ sinatra (1.3.2)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
+ tilt (~> 1.3, >= 1.3.3)
+ sinatra-contrib (1.3.1)
+ backports (>= 2.0)
+ eventmachine
+ rack-protection
+ rack-test
+ sinatra (~> 1.3.0)
+ tilt (~> 1.3)
+ sinatra-reloader (1.0)
+ sinatra-contrib
+ thin (1.3.1)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ tilt (1.3.3)
+ websocket-rack (0.3.3)
+ em-websocket (~> 0.3.6)
+ rack
+ thin
+
+PLATFORMS
+ ruby
+ x86-mingw32
+
+DEPENDENCIES
+ eventmachine (>= 1.0.0.beta, != 1.0.0.beta.4)
+ json
+ rack-test
+ rake
+ redcarpet (< 2)
+ rocco
+ sinatra (>= 1.3)
+ sinatra-reloader
+ thin
+ websocket-rack
12 LICENSE
@@ -0,0 +1,12 @@
+Copyright 2012 United States Government, as represented by the Secretary of Defense, Under Secretary
+of Defense (Personnel & Readiness).
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is
+distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied. See the License for the specific language governing permissions and limitations under the
+License.
@@ -0,0 +1,12 @@
+Virtual World Framework
+=====================
+---------------------
+
+The Virtual World Framework (VWF) is a fast, light-weight, web-based architecture for creating and distributing secure, scalable, component-based, and collaborative virtual spaces. It leverages existing web-based standards, infrastructure, and emerging technologies with the intent of establishing a powerful yet simple to use platform that is built on top of the next generation of web browsers. These technologies include:
+
+* HTML 5 – a significant upgrade in expressive power for the web
+* WebGL – an integrated 3D graphics capability
+* WebSockets – providing a full TCP/IP connection between the client and server
+* JavaScript – the programming language of the web
+
+The VWF serves as a replicated computing platform for multi-user interactive 2D and 3D components with a high degree of customizability of the environment and high bandwidth communication between users. These are environments that are focused on work and working together – whether for training, collaboration and/or entertainment. It is a zero-install platform, where additional software components can be added dynamically. VWF spaces can be embedded in virtually any application including web pages and emails. Furthermore, VWF spaces can embed existing applications and browsers. The next big 3D platform is simply the current world wide web with additional capabilities, and the Virtual World Framework embraces this ever growing technology.
144 Rakefile
@@ -0,0 +1,144 @@
+# Copyright 2012 United States Government, as represented by the Secretary of Defense, Under
+# Secretary of Defense (Personnel & Readiness).
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+# in compliance with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+
+
+require "rake"
+require "rake/testtask"
+require "rake/clean"
+
+
+CLEAN.include "support/build/Pygments-1.4/**/*.pyc"
+CLOBBER.include "bin/*", "run.bat"
+
+
+# Delegate the standard tasks to any child projects.
+
+DELEGATED_TASKS = [ :build, :test, :clean, :clobber ]
+
+FileList[ "*/Rakefile", "*/*/Rakefile" ].map do |rakefile| # could use "*/**/Rakefile" to reach an arbitrary depth
+
+ rakefile[ %r{(.*)/Rakefile}, 1 ]
+
+end .each do |project|
+
+ # Create a namespace for each child project.
+
+ namespace = namespace project.gsub "/", "-" do
+
+ # Create tasks delegating to the child project's rake.
+
+ DELEGATED_TASKS.each do |name|
+ task name do |task|
+ chdir project do
+ rake name.to_s
+ end
+ end
+ end
+
+ end
+
+ # Make the parent tasks dependent on the child tasks.
+
+ DELEGATED_TASKS.each do |name|
+ task name => namespace[name]
+ end
+
+end
+
+# Invoke a child rake.
+
+def rake *args
+ ruby "-S", "rake", *args
+end
+
+
+# == build =========================================================================================
+
+task :build => [ :common, :windows ]
+
+# -- common ----------------------------------------------------------------------------------------
+
+desc "Update the gems (generating bin/*)."
+
+task :common do
+
+ sh "bundle install --binstubs"
+
+end
+
+# -- windows ---------------------------------------------------------------------------------------
+
+# Windows standalone build
+
+task :windows => :common do
+
+ if RbConfig::CONFIG["host_os"] =~ /mswin|mingw|cygwin/
+
+ DEVKIT = "support/build/ruby-devkit-tdm-32-4.5.2-20111229-1559-sfx"
+ RUBY = "support/build/ruby-1.8.7-p357-i386-mingw32"
+
+ File.open( "#{DEVKIT}/config.yml", "w" ) do |io|
+ io.puts "---"
+ io.puts "- ../../../#{RUBY}"
+ end
+
+ sh "echo '" + <<-BAT.strip.gsub( %r{^ *}, "" ) + "' | CMD.EXE"
+ @ECHO OFF
+ REM Clear the bundle exec environment
+ SET BUNDLE_BIN_PATH=
+ SET BUNDLE_GEMFILE=
+ SET GEM_HOME=
+ SET GEM_PATH=
+ SET RUBYOPT=
+ REM Install DevKit in the local ruby
+ SET DEVKIT=#{ DEVKIT.gsub( "/", "\\" ) }
+ CD %DEVKIT%
+ SET RUBY=..\\..\\..\\#{ RUBY.gsub( "/", "\\" ) }
+ SET PATH=%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem
+ SET PATH=%PATH%;%RUBY%\\bin;%RUBY%\\lib\\ruby\\gems\\1.8\\bin
+ ruby dk.rb install
+ REM Configure the local ruby
+ CD ..\\..\\..
+ SET RUBY=#{ RUBY.gsub( "/", "\\" ) }
+ SET PATH=%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem
+ SET PATH=%PATH%;%RUBY%\\bin;%RUBY%\\lib\\ruby\\gems\\1.8\\bin
+ gem install bundler --no-rdoc --no-ri
+ bundle install --system
+ BAT
+
+ File.open( "run.bat", "w" ) do |io|
+ io.puts "@ECHO OFF"
+ io.puts ""
+ io.puts "SET RUBY=#{ RUBY.gsub( "/", "\\" ) }"
+ io.puts "SET PATH=%PATH%;%RUBY%\\bin;%RUBY%\\lib\\ruby\\gems\\1.8\\bin"
+ io.puts ""
+ io.puts "ruby bin\\thin start %*"
+ end
+
+ end
+
+end
+
+
+# == test ==========================================================================================
+
+# Create the test task.
+
+Rake::TestTask.new do |task|
+
+ task.libs << "test"
+ task.test_files = FileList[ "test/*_test.rb", "test/*/*_test.rb" ]
+
+ task.verbose = true
+
+end
@@ -0,0 +1,18 @@
+# Copyright 2012 United States Government, as represented by the Secretary of Defense, Under
+# Secretary of Defense (Personnel & Readiness).
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+# in compliance with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+
+require "init"
+
+map "/" do
+ run VWF
+end
26 init.rb
@@ -0,0 +1,26 @@
+# Copyright 2012 United States Government, as represented by the Secretary of Defense, Under
+# Secretary of Defense (Personnel & Readiness).
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+# in compliance with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+
+
+require "rubygems"
+
+require "bundler"
+Bundler.require
+
+$LOAD_PATH << File.expand_path( File.join( File.dirname(__FILE__), "lib" ) )
+
+require "vwf"
+require "vwf/application"
+require "vwf/application/component"
+require "vwf/application/reflector"
+require "vwf/application/admin"

0 comments on commit a0f04a6

Please sign in to comment.