[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Ovirt-devel] [PATCH] rails 2.1: RPM deps, gettext gem



On Wed, 2008-09-24 at 13:48 -0400, Scott Seago wrote:
> update RPM deps to require rails 2.1.1.
> require gem-based rubygems(gettext)
> update environment.rb to reference gettext and cobbler as GEMs.
> 
> Signed-off-by: Scott Seago <sseago redhat com>
> ---
>  ovirt-server.spec.in                   |    6 ++--
>  src/config/environment.rb              |   61 ++++++++++++++++++++-----------
>  src/config/environments/development.rb |    2 +-
>  3 files changed, 43 insertions(+), 26 deletions(-)
> 
> diff --git a/ovirt-server.spec.in b/ovirt-server.spec.in
> index a65e628..114b52d 100644
> --- a/ovirt-server.spec.in
> +++ b/ovirt-server.spec.in
> @@ -14,11 +14,11 @@ Group: Applications/System
>  Requires: ruby >= 1.8.1
>  Requires: ruby(abi) = 1.8
>  Requires: rubygem(activeldap) >= 0.10.0
> -Requires: rubygem(rails) >= 2.0.1
> +Requires: rubygem(rails) >= 2.1.1
>  Requires: rubygem(mongrel) >= 1.0.1
>  Requires: rubygem(krb5-auth) >= 0.6
>  Requires: rubygem(cobbler) >= 0.0.2
> -Requires: ruby-gettext-package
> +Requires: rubygem(gettext)
>  Requires: postgresql-server
>  Requires: ruby-postgres
>  Requires: xapian-bindings-ruby
> @@ -35,7 +35,7 @@ Requires(preun): /sbin/chkconfig
>  Requires(preun): /sbin/service
>  BuildRequires: ruby >= 1.8.1
>  BuildRequires: ruby-devel
> -BuildRequires: ruby-gettext-package
> +BuildRequires: rubygem(gettext)
>  BuildRequires: rubygem(rake) >= 0.7
>  Provides: ovirt-server
>  BuildArch: noarch
> diff --git a/src/config/environment.rb b/src/config/environment.rb
> index 3ec4379..53edfad 100644
> --- a/src/config/environment.rb
> +++ b/src/config/environment.rb
> @@ -28,42 +28,64 @@ require File.join(File.dirname(__FILE__), 'boot')
>  
>  Rails::Initializer.run do |config|
>    # Settings in config/environments/* take precedence over those specified here
> -  
> -  # Skip frameworks you're not going to use (only works if using vendor/rails)
> -  # config.frameworks -= [ :action_web_service, :action_mailer ]
> +  # Application configuration should go into files in config/initializers
> +  # -- all .rb files in that directory are automatically loaded.
> +  # See Rails::Configuration for more options.
>  
> -  # Only load the plugins named here, by default all plugins in vendor/plugins are loaded
> -  # config.plugins = %W( exception_notification ssl_requirement )
> +  # 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"
> +  config.gem "cobbler"
> +  config.gem "gettext", :lib => "gettext/rails"
> +
> +  # 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 
> +  # Force all environments to use the same logger level
>    # (by default production uses :info, the others :debug)
>    # config.log_level = :debug
>  
> -  # Use the database for sessions instead of the file system
> -  # (create the session table with 'rake db:sessions:create')
> -  config.action_controller.session_store = :active_record_store
> +  # 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 => "_ovirt_session_id",
> -  :secret => "a covert ovirt phrase or some such" 
> +    :session_key => "_ovirt_session_id",
> +    :secret => "a covert ovirt phrase or some such"
>    }
> +
> +  # 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, 
> +  # 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
>  
> -  # Make Active Record use UTC-base instead of local time
> -  # config.active_record.default_timezone = :utc
> -  
> -  # See Rails::Configuration for more options
>  end
>  
> -# Add new inflection rules using the following format 
> +# Add new inflection rules using the following format
>  # (all these examples are active by default):
>  # Inflector.inflections do |inflect|
>  #   inflect.plural /^(ox)$/i, '\1en'
> @@ -76,9 +98,4 @@ end
>  # Mime::Type.register "text/richtext", :rtf
>  # Mime::Type.register "application/x-mobile", :mobile
>  
> -# Include your application configuration below
> -require 'gettext/rails'                                                                                                                                                     
> -gem 'cobbler'
> -require 'cobbler'
> -
>  MANAGED_NODE_CONFIGURATION_DIR = '/var/www/html/ovirt-cfgdb'
> diff --git a/src/config/environments/development.rb b/src/config/environments/development.rb
> index 1cd0bbd..b3acf68 100644
> --- a/src/config/environments/development.rb
> +++ b/src/config/environments/development.rb
> @@ -28,7 +28,7 @@ config.cache_classes = false
>  config.whiny_nils = true
>  
>  # Enable the breakpoint server that script/breakpointer connects to
> -config.breakpoint_server = true
> +#config.breakpoint_server = true
>  
>  # Show full error reports and disable caching
>  config.action_controller.consider_all_requests_local = true

ACK, pending removing the rails rpms from the bad_pkgs list.  I changed
it to "" locally and it worked fine.  If you want to add it to this
patch, great, or I can generate one for that change and send it out.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]