1 # Be sure to restart your web server when you modify this file.
3 # Uncomment below to force Rails into production mode when
4 # you don't control web/app server and can't set it the proper way
5 # ENV['RAILS_ENV'] ||= 'production'
7 # Specifies gem version of Rails to use when vendor/rails is not present
8 RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
10 # Bootstrap the Rails environment, frameworks, and default configuration
11 require File.join(File.dirname(__FILE__), 'boot')
13 require "#{RAILS_ROOT}/lib/common/smartactivexml"
15 Rails::Initializer.run do |config|
16 # Settings in config/environments/* take precedence over those specified here
18 # Skip frameworks you're not going to use (only works if using vendor/rails)
19 # config.frameworks -= [ :action_web_service, :action_mailer ]
21 # Only load the plugins named here, by default all plugins in vendor/plugins are loaded
22 # config.plugins = %W( exception_notification ssl_requirement )
24 # Add additional load paths for your own custom dirs
25 # config.load_paths += %W( #{RAILS_ROOT}/extras )
27 # Force all environments to use the same logger level
28 # (by default production uses :info, the others :debug)
29 config.log_level = :debug
31 # Use SQL instead of Active Record's schema dumper when creating the test database.
32 # This is necessary if your schema can't be completely dumped by the schema dumper,
33 # like if you have constraints or database-specific column types
34 # config.active_record.schema_format = :sql
36 # Activate observers that should always be running
37 # config.active_record.observers = :cacher, :garbage_collector
39 # Make Active Record use UTC-base instead of local time
40 # config.active_record.default_timezone = :utc
42 # See Rails::Configuration for more options
45 # Include your application configuration below
47 # remove static cache files
48 FileUtils.rm_f "#{RAILS_ROOT}/public/index.html"
49 FileUtils.rm_f "#{RAILS_ROOT}/public/developer.html"
51 ActiveXML::Base.config do |conf|
52 conf.setup_transport do |map|
53 map.default_server :rest, API_HOST
54 map.connect :project, 'rest:///source/:name/_meta',
55 :all => 'rest:///source/'
56 map.connect :package, 'rest:///source/:project/:name/_meta',
57 :all => 'rest:///source/:project/'
58 map.connect :pattern, 'rest:///source/:project/_pattern/:name',
59 :all => 'rest:///source/:project/_pattern'
60 map.connect :published,'rest:///published/:project/:repository/:arch/:name?:view'
61 map.connect :seeker, 'rest:///search?match=:match',
62 :project => 'rest:///search/project/id?match=:match',
63 :package => 'rest:///search/package/id?match=:match',
64 :pattern => 'rest:///search/published/pattern/id?match=:match',
65 :binary => 'rest:///search/published/binary/id?match=:match'
67 conf.transport_for(:project).set_additional_header("X-Username", ICHAIN_USER)