Browse Source

Some bug correction for Datamapper

gpst
parent
commit
b70a4d6cd1
  1. 1
      .gitignore
  2. 17
      README.markdown
  3. 14
      global_config.rb
  4. 1
      rubyzome/scripts/db/db_migrate

1
.gitignore

@ -1,2 +1,3 @@
*.swp
datas.db
.DS_Store

17
README.markdown

@ -8,13 +8,16 @@ Ruby Restful Mobile oriented framework.
## Install
1. git clone git@github.com:yogsototh/rubyzome.git rubyzome
2. cd rubyzome
3. mkdir db
4. gem install dm-core dm-sqlite-adapter erubis json nokogiri rack rack-rewrite unicorn
5. unicorn
6. ???
7. profit
1. open a terminal and write
> git clone git@github.com:yogsototh/rubyzome.git rubyzome
> cd rubyzome
> mkdir db
> gem install dm-core dm-sqlite-adapter dm-migrations erubis json nokogiri rack rack-rewrite unicorn
> unicorn
2. ???
3. profit
## Docs

14
global_config.rb

@ -7,12 +7,12 @@ $directory_of_website='/website'
# db configuration
$db_type='sqlite3'
$db_user=''
$db_password=''
$db_admin_user=''
$db_admin_password=''
$db_host='localhost'
$db_database='db/main.db'
$db_user=nil
$db_password=nil
$db_admin_user=nil
$db_admin_password=nil
$db_host=nil
$db_database="#{Dir.pwd}/datas.db"
constructed_db_url="#{$db_type}://"
constructed_db_url<<="#{$db_user}:" if not $db_user.nil?
@ -20,3 +20,5 @@ constructed_db_url<<="#{$db_password}" if not $db_password.nil?
constructed_db_url<<="@#{$db_host}/" if not $db_host.nil?
constructed_db_url<<="@#{$db_database}" if not $db_database.nil?
$db_url=ENV['DATABASE_URL'] || constructed_db_url
puts $db_url

1
rubyzome/scripts/db/db_migrate

@ -1,5 +1,6 @@
#!/usr/bin/env ruby
require 'rubygems'
require 'global_config'
require 'dm-core'
require 'dm-migrations'

Loading…
Cancel
Save