Skip to content

Commit

Permalink
basic structure changes for getting onto merb 0.9.1
Browse files Browse the repository at this point in the history
git-svn-id: https://pmpknpi.googlecode.com/svn/trunk@48 8b0ec7b7-bd45-0410-8a4e-3563a9e70f90
  • Loading branch information
brockwhitten committed Mar 20, 2008
1 parent 4121e6e commit 26f71d4
Show file tree
Hide file tree
Showing 24 changed files with 52 additions and 225 deletions.
5 changes: 3 additions & 2 deletions .gitignore
@@ -1,4 +1,5 @@
.DS_Store
*.log
config.database.yml
log/*.pid
.DS_Store
config/database.yml
db/*.sqlite3
1 change: 0 additions & 1 deletion app/mailers/views/layout/application.html.erb

This file was deleted.

1 change: 0 additions & 1 deletion app/mailers/views/layout/application.text.erb

This file was deleted.

2 changes: 1 addition & 1 deletion app/models/article.rb
Expand Up @@ -12,7 +12,7 @@ class Article < ActiveRecord::Base
before_save :draft_check

# PLUGINS
merb_can_filter :body, :excerpt
#merb_can_filter :body, :excerpt

# ACCESSORS
attr_accessor :draft
Expand Down
2 changes: 1 addition & 1 deletion app/models/comment.rb
Expand Up @@ -11,7 +11,7 @@ class Comment < ActiveRecord::Base
:with => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix,
:if => :website_submitted?

merb_can_filter :body
#merb_can_filter :body

def filter
"Textile"
Expand Down
1 change: 0 additions & 1 deletion app/parts/views/layout/application.html.erb

This file was deleted.

11 changes: 0 additions & 11 deletions config/boot.rb

This file was deleted.

File renamed without changes.
7 changes: 6 additions & 1 deletion config/environments/development.rb
@@ -1 +1,6 @@
puts "Loaded DEVELOPMENT Environment..."
Merb.logger.info("Loaded DEVELOPMENT Environment...")
Merb::Config.use { |c|
c[:exception_details] = true
c[:reload_classes] = true
c[:reload_time] = 0.5
}
6 changes: 5 additions & 1 deletion config/environments/production.rb
@@ -1 +1,5 @@
puts "Loaded PRODUCTION Environment..."
Merb.logger.info("Loaded PRODUCTION Environment...")
Merb::Config.use { |c|
c[:exception_details] = false
c[:reload_classes] = false
}
7 changes: 6 additions & 1 deletion config/environments/test.rb
@@ -1 +1,6 @@
puts "Loaded TEST Environment..."
Merb.logger.info("Loaded TEST Environment...")
Merb::Config.use { |c|
c[:exception_details] = true
c[:reload_classes] = true
c[:reload_time] = 0.5
}
28 changes: 25 additions & 3 deletions config/dependencies.rb → config/init.rb
Expand Up @@ -5,6 +5,17 @@
# Make the app's "lib" directory a place where ruby files get "require"d from
$LOAD_PATH.unshift(Merb.root / "lib")


Merb::Config.use do |c|

### Sets up a custom session id key, if you want to piggyback sessions of other applications
### with the cookie session store. If not specified, defaults to '_session_id'.
# c[:session_id_key] = '_session_id'

c[:session_secret_key] = '669bed3f14d49f3bfa52530312c225f3753455e1'
c[:session_store] = 'cookie'
end

### ORM
use_orm :activerecord

Expand All @@ -13,7 +24,7 @@

### Requrements
require 'authenticated_system'
require 'active_record_extension'
#require 'active_record_extension'
require 'date_and_time_helpers'
require 'global_mixin'

Expand All @@ -24,10 +35,21 @@
"coderay",
"merb_helpers"

### Add your other dependencies here

# These are some examples of how you might specify dependencies.
#
# dependencies "RedCloth", "merb_helpers"
# OR
# dependency "RedCloth", "> 3.0"
# OR
# dependencies "RedCloth" => "> 3.0", "ruby-aes-cext" => "= 1.0"

Merb::BootLoader.after_app_loads do
### Add dependencies here that must load after the application loads:

# dependency "magic_admin" # this gem uses the app's model classes
end

# YAML FILES
SETTINGS = YAML.load_file("#{Merb.root}/config/settings.yml")[Merb.environment].symbolize_keys
# MIME TYPES
Merb.add_mime_type(:rss, :to_xml, %w[application/rss+xml])
82 changes: 0 additions & 82 deletions config/merb.yml

This file was deleted.

20 changes: 0 additions & 20 deletions config/merb_init.rb

This file was deleted.

1 change: 1 addition & 0 deletions config/rack.rb
@@ -0,0 +1 @@
run Merb::Rack::Application.new
Empty file removed config/upload.conf
Empty file.
1 change: 0 additions & 1 deletion db/.gitignore
@@ -1 +0,0 @@
*.sqlite3
4 changes: 2 additions & 2 deletions lib/active_record_extension.rb
@@ -1,5 +1,5 @@
module Sintaxi
module FilteredLight
module MerbFilter

def self.included(base)
base.extend ActMethods
Expand Down Expand Up @@ -42,4 +42,4 @@ def sanitize_code(text)
end
end

ActiveRecord::Base.send :include, Sintaxi::FilteredLight
ActiveRecord::Base.send :include, Sintaxi::MerbFilter
1 change: 0 additions & 1 deletion log/merb_test.log

This file was deleted.

6 changes: 2 additions & 4 deletions public/merb.fcgi
@@ -1,6 +1,4 @@
#!/usr/bin/env ruby

ARGV=["-F"]
require 'merb/server'

Merb::Server.run
argv = ARGV + %w[-a fcgi]
Merb.start(argv)
32 changes: 0 additions & 32 deletions script/destroy

This file was deleted.

32 changes: 0 additions & 32 deletions script/generate

This file was deleted.

13 changes: 0 additions & 13 deletions script/stop_merb

This file was deleted.

14 changes: 0 additions & 14 deletions test/test_helper.rb

This file was deleted.

0 comments on commit 26f71d4

Please sign in to comment.