Skip to content

Commit

Permalink
Updating
Browse files Browse the repository at this point in the history
  • Loading branch information
jcnetdev committed Jul 5, 2008
1 parent f132320 commit 9dbbc4c
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 101 deletions.
12 changes: 6 additions & 6 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@
development:
adapter: mysql
encoding: utf8
database: blank_development
host: localhost
database: base_development
username: root
password:
host: localhost

# 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: blank_test
host: localhost
database: base_test
username: root
password:
host: localhost

production:
adapter: mysql
encoding: utf8
database: blank_production
host: localhost
database: base_production
username: root
password:
host: localhost
50 changes: 29 additions & 21 deletions config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@
# Make Active Record use UTC-base instead of local time
# config.active_record.default_timezone = :utc

# standard gems
config.gem "haml", :version => ">= 2.0.0"

# ssl_requirement
# ------
# Allow controller actions to force SSL on specific parts of the site
# ------
config.gem 'jcnetdev-ssl_requirement', :version => '>= 1.0',
:lib => 'ssl_requirement',
:source => 'http://gems.github.com'

# exception_notification
# ------
# Allows unhandled exceptions to be emailed on production
# ------
config.gem 'jcnetdev-exception_notification', :version => '>= 1.1',
:lib => 'exception_notification',
:source => 'http://gems.github.com'


# Rails Plugins (via gems)

# active_record_without_table
Expand Down Expand Up @@ -90,7 +110,7 @@
config.gem 'jcnetdev-auto_migrations', :version => '>= 1.1',
:lib => 'auto_migrations',
:source => 'http://gems.github.com'

# better_partials
# ------
# Makes calling partials in views look better and more fun
Expand All @@ -99,21 +119,14 @@
:lib => 'better_partials',
:source => 'http://gems.github.com'

# exception_notification
# ------
# Allows unhandled exceptions to be emailed on production
# ------
config.gem 'jcnetdev-exception_notification', :version => '>= 1.0',
:lib => 'exception_notification',
:source => 'http://gems.github.com'

# form_fu
# ------
# Allows easier rails form creation and processing
# ------
config.gem 'neorails-form_fu', :version => '>= 1.0',
:lib => 'form_fu',
:source => 'http://gems.github.com'
# config.gem 'neorails-form_fu', :version => '>= 1.0',
# :lib => 'form_fu',
# :source => 'http://gems.github.com'

# paperclip
# ------
Expand All @@ -130,6 +143,8 @@
config.gem 'jcnetdev-seed-fu', :version => '>= 1.0',
:lib => 'seed-fu',
:source => 'http://gems.github.com'


# subdomain-fu
# ------
# Allows easier subdomain selection
Expand Down Expand Up @@ -158,9 +173,9 @@
# ------
# Adds view helpers for titles, stylesheets, javascripts, and common tags
# ------
config.gem 'neorails-view_fu', :version => '>= 1.0',
:lib => 'view_fu',
:source => 'http://gems.github.com'
# config.gem 'neorails-view_fu', :version => '>= 1.0',
# :lib => 'view_fu',
# :source => 'http://gems.github.com'

# OPTIONAL PLUGINS

Expand All @@ -180,13 +195,6 @@
# :lib => 'acts_as_readable',
# :source => 'http://gems.github.com'

# ssl_requirement
# ------
# Allow controller actions to force SSL on specific parts of the site
# ------
# config.gem 'jcnetdev-ssl_requirement', :version => '>= 1.0',
# :lib => 'ssl_requirement',
# :source => 'http://gems.github.com'

# sms-fu
# ------
Expand Down
Empty file added db/fixtures/SEED_FILES_GO_HERE
Empty file.
15 changes: 0 additions & 15 deletions db/migrate/001_create_mail_outgoing.rb

This file was deleted.

12 changes: 0 additions & 12 deletions db/migrate/002_create_mail_incoming.rb

This file was deleted.

22 changes: 0 additions & 22 deletions db/migrate/003_create_users.rb

This file was deleted.

15 changes: 0 additions & 15 deletions db/migrate/004_create_widgets.rb

This file was deleted.

13 changes: 9 additions & 4 deletions db/schema.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of ActiveRecord to incrementally modify your database, and
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
Expand All @@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 4) do
ActiveRecord::Schema.define(:version => 1) do

create_table "mail_incoming", :force => true do |t|
t.text "mail"
Expand All @@ -19,7 +19,7 @@
create_table "mail_outgoing", :force => true do |t|
t.string "from"
t.string "to"
t.integer "last_send_attempt", :default => 0
t.integer "last_send_attempt", :limit => 11, :default => 0
t.text "mail"
t.datetime "created_on"
end
Expand All @@ -41,11 +41,16 @@

create_table "widgets", :force => true do |t|
t.string "name"
t.integer "price", :limit => 10, :precision => 10, :scale => 0
t.integer "price", :limit => 10
t.text "description"
t.boolean "is_in_stock"
t.datetime "created_at"
t.datetime "updated_at"
end

create_table :photos, :force => true do |t|
t.string "url"
t.timestamps
end

end
7 changes: 4 additions & 3 deletions lib/tasks/auto_migrations_tasks.rake
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
namespace :db do
namespace :auto do
desc "Use schema.rb to auto-migrate"
task :migrate => :environment do
task :migrate do
AutoMigrations.run
end
end

namespace :schema do
desc "Create migration from schema.rb"
task :to_migration => :environment do
task :to_migration do
AutoMigrations.schema_to_migration
end
end
end
end

17 changes: 17 additions & 0 deletions lib/tasks/migrate.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require 'rubygems'
require 'rake'

class Rake::Task
def overwrite(&block)
@actions.clear
enhance(&block)
end
end

# Overwrite migrate task
Rake::Task["db:migrate"].overwrite do
puts "Running Auto Migration and DB Seed..."

Rake::Task["db:auto:migrate"].invoke
Rake::Task["db:seed"].invoke
end
2 changes: 1 addition & 1 deletion lib/tasks/paperclip_tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ end

namespace :paperclip do
desc "Regenerates thumbnails for a given CLASS (and optional ATTACHMENT)"
task :refresh => :environment do
task :refresh do
klass = obtain_class
names = obtain_attachments
instances = klass.find(:all)
Expand Down
4 changes: 2 additions & 2 deletions lib/tasks/seed_fu_tasks.rake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace :db do
desc "Loads seed data from db/fixtures for the current environment."
task :seed => :environment do
task :seed do
Dir[File.join(RAILS_ROOT, 'db', 'fixtures', '*.rb')].sort.each { |fixture|
puts "\n== Seeding from #{File.split(fixture).last} " + ("=" * (60 - (17 + File.split(fixture).last.length)))
load fixture
Expand All @@ -12,4 +12,4 @@ namespace :db do
puts "=" * 60 + "\n"
}
end
end
end
7 changes: 7 additions & 0 deletions log/development.log
Original file line number Diff line number Diff line change
Expand Up @@ -4369,3 +4369,10 @@ DEPRECATION WARNING: config.action_view.cache_template_extensions option has bee
** SubdomainFu: initialized properly
DEPRECATION WARNING: config.action_view.cache_template_extensions option has been deprecated and has no affect. Please remove it from your config files. See http://www.rubyonrails.org/deprecation for details. (called from send at /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/initializer.rb:455)
** SubdomainFu: initialized properly
DEPRECATION WARNING: config.action_view.cache_template_extensions option has been deprecated and has no affect. Please remove it from your config files. See http://www.rubyonrails.org/deprecation for details. (called from send at /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/initializer.rb:455)
** SubdomainFu: initialized properly
WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
DEPRECATION WARNING: config.action_view.cache_template_extensions option has been deprecated and has no affect. Please remove it from your config files. See http://www.rubyonrails.org/deprecation for details. (called from send at /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/initializer.rb:455)
** SubdomainFu: initialized properly
DEPRECATION WARNING: config.action_view.cache_template_extensions option has been deprecated and has no affect. Please remove it from your config files. See http://www.rubyonrails.org/deprecation for details. (called from send at /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/initializer.rb:455)
** SubdomainFu: initialized properly

0 comments on commit 9dbbc4c

Please sign in to comment.