You are viewing a plain text version of this content. The canonical link for it is here.
Posted to stonehenge-commits@incubator.apache.org by sh...@apache.org on 2008/11/26 10:52:44 UTC
svn commit: r720797 [3/9] - in
/incubator/stonehenge/contrib/stocktrader/ruby: ./ order_processor/
order_processor/keys/ order_processor/policies/ trader_client/
trader_client/app/ trader_client/app/controllers/
trader_client/app/helpers/ trader_client...
Added: incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environment.rb
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environment.rb?rev=720797&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environment.rb (added)
+++ incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environment.rb Wed Nov 26 02:52:40 2008
@@ -0,0 +1,84 @@
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+
+# Be sure to restart your server when you modify this file
+
+# Uncomment below to force Rails into production mode when
+# you don't control web/app server and can't set it the proper way
+# ENV['RAILS_ENV'] ||= 'production'
+
+# Specifies gem version of Rails to use when vendor/rails is not present
+RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
+
+# Bootstrap the Rails environment, frameworks, and default configuration
+require File.join(File.dirname(__FILE__), 'boot')
+
+Rails::Initializer.run do |config|
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+ # See Rails::Configuration for more options.
+
+ # Skip frameworks you're not going to use. To use Rails without a database
+ # you must remove the Active Record framework.
+ # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
+
+ # Specify gems that this application depends on.
+ # They can then be installed with "rake gems:install" on new installations.
+ # config.gem "bj"
+ # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
+ # config.gem "aws-s3", :lib => "aws/s3"
+
+ # Only load the plugins named here, in the order given. By default, all plugins
+ # in vendor/plugins are loaded in alphabetical order.
+ # :all can be used as a placeholder for all plugins not explicitly named
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+ # Add additional load paths for your own custom dirs
+ # config.load_paths += %W( #{RAILS_ROOT}/extras )
+
+ # Force all environments to use the same logger level
+ # (by default production uses :info, the others :debug)
+ # config.log_level = :debug
+
+ # Make Time.zone default to the specified zone, and make Active Record store time values
+ # in the database in UTC, and return them converted to the specified local zone.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Uncomment to use default local time.
+ config.time_zone = 'UTC'
+
+ # Your secret key for verifying cookie session data integrity.
+ # If you change this key, all old sessions will become invalid!
+ # Make sure the secret is at least 30 characters and all random,
+ # no regular words or you'll be exposed to dictionary attacks.
+ config.action_controller.session = {
+ :session_key => '_rubytraderclient_session',
+ :secret => 'c2577e0d374811c5c9b7f3ffbea39eabe3e8454c49e3d2e027bbb195cc2870af42d5a0d64d33254113b173032957809bfe2a3c6dd36f423eed98511c66dbfe80'
+ }
+
+ # Use the database for sessions instead of the cookie-based default,
+ # which shouldn't be used to store highly confidential information
+ # (create the session table with "rake db:sessions:create")
+ # config.action_controller.session_store = :active_record_store
+
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+
+ # Activate observers that should always be running
+ # config.active_record.observers = :cacher, :garbage_collector
+end
Added: incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environments/development.rb
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environments/development.rb?rev=720797&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environments/development.rb (added)
+++ incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environments/development.rb Wed Nov 26 02:52:40 2008
@@ -0,0 +1,33 @@
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+# Settings specified here will take precedence over those in config/environment.rb
+
+# In the development environment your application's code is reloaded on
+# every request. This slows down response time but is perfect for development
+# since you don't have to restart the webserver when you make code changes.
+config.cache_classes = false
+
+# Log error messages when you accidentally call methods on nil.
+config.whiny_nils = true
+
+# Show full error reports and disable caching
+config.action_controller.consider_all_requests_local = true
+config.action_view.debug_rjs = true
+config.action_controller.perform_caching = false
+
+# Don't care if the mailer can't send
+config.action_mailer.raise_delivery_errors = false
Added: incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environments/production.rb
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environments/production.rb?rev=720797&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environments/production.rb (added)
+++ incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environments/production.rb Wed Nov 26 02:52:40 2008
@@ -0,0 +1,38 @@
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+# Settings specified here will take precedence over those in config/environment.rb
+
+# The production environment is meant for finished, "live" apps.
+# Code is not reloaded between requests
+config.cache_classes = true
+
+# Use a different logger for distributed setups
+# config.logger = SyslogLogger.new
+
+# Full error reports are disabled and caching is turned on
+config.action_controller.consider_all_requests_local = false
+config.action_controller.perform_caching = true
+config.action_view.cache_template_loading = true
+
+# Use a different cache store in production
+# config.cache_store = :mem_cache_store
+
+# Enable serving of images, stylesheets, and javascripts from an asset server
+# config.action_controller.asset_host = "http://assets.example.com"
+
+# Disable delivery errors, bad email addresses will be ignored
+# config.action_mailer.raise_delivery_errors = false
Added: incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environments/test.rb
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environments/test.rb?rev=720797&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environments/test.rb (added)
+++ incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/environments/test.rb Wed Nov 26 02:52:40 2008
@@ -0,0 +1,38 @@
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+# Settings specified here will take precedence over those in config/environment.rb
+
+# The test environment is used exclusively to run your application's
+# test suite. You never need to work with it otherwise. Remember that
+# your test database is "scratch space" for the test suite and is wiped
+# and recreated between test runs. Don't rely on the data there!
+config.cache_classes = true
+
+# Log error messages when you accidentally call methods on nil.
+config.whiny_nils = true
+
+# Show full error reports and disable caching
+config.action_controller.consider_all_requests_local = true
+config.action_controller.perform_caching = false
+
+# Disable request forgery protection in test environment
+config.action_controller.allow_forgery_protection = false
+
+# Tell Action Mailer not to deliver emails to the real world.
+# The :test delivery method accumulates sent emails in the
+# ActionMailer::Base.deliveries array.
+config.action_mailer.delivery_method = :test
Added: incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/initializers/inflections.rb
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/initializers/inflections.rb?rev=720797&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/initializers/inflections.rb (added)
+++ incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/initializers/inflections.rb Wed Nov 26 02:52:40 2008
@@ -0,0 +1,26 @@
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# Inflector.inflections do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
Added: incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/initializers/mime_types.rb
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/initializers/mime_types.rb?rev=720797&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/initializers/mime_types.rb (added)
+++ incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/initializers/mime_types.rb Wed Nov 26 02:52:40 2008
@@ -0,0 +1,21 @@
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone
Added: incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/initializers/new_rails_defaults.rb
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/initializers/new_rails_defaults.rb?rev=720797&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/initializers/new_rails_defaults.rb (added)
+++ incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/initializers/new_rails_defaults.rb Wed Nov 26 02:52:40 2008
@@ -0,0 +1,31 @@
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+# These settings change the behavior of Rails 2 apps and will be defaults
+# for Rails 3. You can remove this initializer when Rails 3 is released.
+
+# Include Active Record class name as root for JSON serialized output.
+ActiveRecord::Base.include_root_in_json = true
+
+# Store the full class name (including module namespace) in STI type column.
+ActiveRecord::Base.store_full_sti_class = true
+
+# Use ISO 8601 format for JSON serialized times and dates.
+ActiveSupport.use_standard_json_time_format = true
+
+# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
+# if you're including raw json in an HTML page.
+ActiveSupport.escape_html_entities_in_json = false
Added: incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/routes.rb
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/routes.rb?rev=720797&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/routes.rb (added)
+++ incubator/stonehenge/contrib/stocktrader/ruby/trader_client/config/routes.rb Wed Nov 26 02:52:40 2008
@@ -0,0 +1,58 @@
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+
+ActionController::Routing::Routes.draw do |map|
+ # The priority is based upon order of creation: first created -> highest priority.
+
+ # Sample of regular route:
+ # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
+ # Keep in mind you can assign values other than :controller and :action
+
+ # Sample of named route:
+ # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
+ # This route can be invoked with purchase_url(:id => product.id)
+
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
+ # map.resources :products
+
+ # Sample resource route with options:
+ # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
+
+ # Sample resource route with sub-resources:
+ # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
+
+ # Sample resource route with more complex sub-resources
+ # map.resources :products do |products|
+ # products.resources :comments
+ # products.resources :sales, :collection => { :recent => :get }
+ # end
+
+ # Sample resource route within a namespace:
+ # map.namespace :admin do |admin|
+ # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
+ # admin.resources :products
+ # end
+
+ # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
+ # map.root :controller => "welcome"
+
+ # See how all your routes lay out with "rake routes"
+
+ # Install the default routes as the lowest priority.
+ map.connect ':controller/:action/:id'
+ map.connect ':controller/:action/:id.:format'
+end
Added: incubator/stonehenge/contrib/stocktrader/ruby/trader_client/doc/README_FOR_APP
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/ruby/trader_client/doc/README_FOR_APP?rev=720797&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/ruby/trader_client/doc/README_FOR_APP (added)
+++ incubator/stonehenge/contrib/stocktrader/ruby/trader_client/doc/README_FOR_APP Wed Nov 26 02:52:40 2008
@@ -0,0 +1,2 @@
+Use this README file to introduce your application and point to useful places in the API for learning more.
+Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.