This patch updates environment so portal will run on both F11 and F12
as well as adding sample config files to support mysql and sqlite. If
a developer/admin wants to use either, they can just rename them to
database.yml.  Perhaps we can do the same thing with postgres and have no
versioned .yml file, always leave it to person installing to choose their
db of choice, but if we do that, it will be in a subsequent patch.
---
 src/config/database.mysql  |   48 ++++++++++++++++++++++++++++++++++++++++++++
 src/config/database.sqlite |   25 ++++++++++++++++++++++
 src/config/environment.rb  |    2 +-
 3 files changed, 74 insertions(+), 1 deletions(-)
 create mode 100644 src/config/database.mysql
 create mode 100644 src/config/database.sqlite

diff --git a/src/config/database.mysql b/src/config/database.mysql
new file mode 100644
index 0000000..3e39c57
--- /dev/null
+++ b/src/config/database.mysql
@@ -0,0 +1,48 @@
+# MySQL.  Versions 4.1 and 5.0 are recommended.
+#
+# Install the MySQL driver:
+#   gem install mysql
+# On Mac OS X:
+#   sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
+# On Mac OS X Leopard:
+#   sudo env ARCHFLAGS="-arch i386" gem install mysql -- 
--with-mysql-config=/usr/local/mysql/bin/mysql_config
+#       This sets the ARCHFLAGS environment variable to your native 
architecture
+# On Windows:
+#   gem install mysql
+#       Choose the win32 build.
+#       Install MySQL and put its /bin directory on your path.
+#
+# And be sure to use new-style password hashing:
+#   http://dev.mysql.com/doc/refman/5.0/en/old-client.html
+development:
+  adapter: mysql
+  encoding: utf8
+  database: dc_development
+  pool: 5
+  username: dc
+  password: delta
+  host: localhost
+#  socket: /var/lib/mysql/mysql.sock
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+  adapter: mysql
+  encoding: utf8
+  database: dc_test
+  pool: 5
+  username: dc
+  password: delta
+  host: localhost
+#  socket: /var/lib/mysql/mysql.sock
+
+production:
+  adapter: mysql
+  encoding: utf8
+  database: dc_production
+  pool: 5
+  username: dc
+  password: delta
+  host: localhost
+#  socket: /var/lib/mysql/mysql.sock
diff --git a/src/config/database.sqlite b/src/config/database.sqlite
new file mode 100644
index 0000000..4fd78e6
--- /dev/null
+++ b/src/config/database.sqlite
@@ -0,0 +1,25 @@
+# SQLite version 3.x
+#   gem install sqlite3-ruby (not necessary on OS X Leopard)
+development:
+  adapter: sqlite3
+  database: db/development.sqlite3
+  pool: 5
+  timeout: 5000
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test: &TEST
+  adapter: sqlite3
+  database: db/test.sqlite3
+  pool: 5
+  timeout: 5000
+
+production:
+  adapter: sqlite3
+  database: db/production.sqlite3
+  pool: 5
+  timeout: 5000
+
+cucumber:
+  <<: *TEST
\ No newline at end of file
diff --git a/src/config/environment.rb b/src/config/environment.rb
index 4396acc..d3d2e2f 100644
--- a/src/config/environment.rb
+++ b/src/config/environment.rb
@@ -20,7 +20,7 @@
 # Be sure to restart your web server when you modify this file.
 
 # Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '>= 2.3.2' unless defined? RAILS_GEM_VERSION
 
 # Bootstrap the Rails environment, frameworks, and default configuration
 require File.join(File.dirname(__FILE__), 'boot')
-- 
1.6.6

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to