Skip to content

Commit 99d0089

Browse files
author
stevenheidel
committed
Initial commit
0 parents  commit 99d0089

File tree

591 files changed

+22773
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

591 files changed

+22773
-0
lines changed

Diff for: .gitignore

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
public/system/*
2+
public/themes/*
3+
*.log
4+
tmp/**/*
5+
.DS_Store
6+
doc/api
7+
doc/app
8+
doc/*
9+
config/database.yml
10+
config/amazon_s3.yml
11+
config/rackspace_cloudfiles.yml
12+
nbproject
13+
index/**/*
14+
db/*.sqlite3
15+
*.tmproj
16+
*.autobackupbyrefinery.*
17+
/refinerycms-*.gem
18+
public/javascripts/cache
19+
public/stylesheets/cache
20+
.yardoc/
21+
vendor/cache
22+
.bundle
23+
*.rbc
24+
*.swp
25+
*.swo
26+
*~
27+
capybara-*html
28+
.idea

Diff for: Gemfile

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
source :rubygems
2+
3+
# Specify the database driver as appropriate for your application (only one is necessary).
4+
# Defaults to sqlite3. Don't remove any of these below in the core or gems won't install.
5+
gem 'sqlite3-ruby', :require => 'sqlite3' #db_adapter=sqlite3
6+
# gem 'mysql', :require => 'mysql' #db_adapter=mysql
7+
# gem 'pg' #db_adapter=postgresql
8+
9+
# Specify your favourite web server (only one) - not required.
10+
# gem 'unicorn', :group => :development
11+
# gem 'mongrel', :group => :development
12+
13+
# Deploy with Capistrano
14+
# gem 'capistrano'
15+
16+
# If you are using Amazon S3 you probably want this gem:
17+
# gem 'aws-s3'
18+
19+
#===REFINERY REQUIRED GEMS===
20+
gem 'acts_as_indexed', '= 0.6.2', :require => 'acts_as_indexed', :git => 'git://github.com/parndt/acts_as_indexed.git', :branch => 'master'
21+
gem 'authlogic', '= 2.1.5', :require => 'authlogic'
22+
gem 'friendly_id', '= 3.0.6', :require => 'friendly_id'
23+
gem 'rails', '= 2.3.8'
24+
gem 'rmagick', '~> 2.12.2'
25+
gem 'truncate_html', '= 0.3.2', :require => 'truncate_html'
26+
gem 'will_paginate', '= 2.3.14', :require => 'will_paginate'
27+
28+
group :test do
29+
gem 'json_pure', :require => 'json/pure', :git => 'git://github.com/parndt/json.git', :branch => 'master'
30+
gem 'rspec'
31+
gem 'rspec-rails'
32+
gem 'factory_girl'
33+
gem 'test-unit', '= 1.2.3'
34+
gem 'cucumber-rails'
35+
gem 'capybara'
36+
gem 'factory_girl'
37+
gem 'database_cleaner'
38+
gem 'launchy'
39+
end
40+
#===REFINERY END OF REQUIRED GEMS===
41+
42+
#===REQUIRED FOR REFINERY GEM INSTALL===
43+
# Leave the gem below disabled (commented out) if you're not using the gem install method.
44+
gem 'refinerycms', '= 0.9.7.5'
45+
#===END OF REFINERY GEM INSTALL REQUIREMENTS===
46+
47+
# Bundle gems for certain environments:
48+
49+
# Specify your application's gem requirements here. See the examples below:
50+
# gem "refinerycms-news", "~> 0.9.7.3", :require => "news"
51+
# gem "refinerycms-portfolio", "~> 0.9.6", :require => "portfolio"

Diff for: Rakefile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Add your own tasks in files placed in lib/tasks ending in .rake,
2+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3+
4+
begin
5+
# Load up the environment instead of just the boot file because we want all of the tasks available.
6+
require File.join(File.dirname(__FILE__), 'config', 'application')
7+
rescue Exception
8+
# Load up the boot file instead because there's something wrong with the environment (like it's not set up yet).
9+
require File.join(File.dirname(__FILE__), 'config', 'boot')
10+
end
11+
12+
# Require the standard stuff
13+
require 'rake'
14+
require 'rake/testtask'
15+
require 'rake/rdoctask'
16+
require 'tasks/rails'
17+
18+
require 'refinery/tasks/refinery'

Diff for: app/controllers/admin/base_controller.rb

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Filters added to this controller apply to all controllers in the refinery backend.
2+
# Likewise, all the methods added will be available for all controllers in the refinery backend.
3+
4+
# You can extend refinery backend with your own functions here and they will likely not get overriden in an update.
5+
6+
class Admin::BaseController < Refinery::AdminBaseController
7+
8+
end

Diff for: app/controllers/application.rb

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This file is here to support web servers who load Rails in the old fashion e.g. some builds of Phusion Passenger.
2+
# This will simply load the application controller using the new style if this file is ever loaded.
3+
require_dependency 'application_controller'

Diff for: app/controllers/application_controller.rb

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Filters added to this controller apply to all controllers in the application.
2+
# Likewise, all the methods added will be available for all controllers.
3+
4+
# You can extend refinery with your own functions here and they will likely not get overriden in an update.
5+
6+
class ApplicationController < Refinery::ApplicationController
7+
end

Diff for: app/helpers/application_helper.rb

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Methods added to this helper will be available to all templates in the application.
2+
3+
# You can extend refinery with your own functions here and they will likely not get overriden in an update.
4+
module ApplicationHelper
5+
include Refinery::ApplicationHelper # leave this line in to include all of Refinery's core helper methods.
6+
7+
end

Diff for: config.ru

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ENV["RAILS_ENV"] ||= "production"
2+
require File.expand_path("../config/application", __FILE__)
3+
4+
use Rails::Rack::LogTailer
5+
use Rails::Rack::Static
6+
7+
run ActionController::Dispatcher.new

Diff for: config/acts_as_indexed_config.rb

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# The acts_as_indexed instructions tell us to put this in environment/initializers/
2+
# but that doesn't work so we're putting it here and requiring it using refinery.
3+
ActsAsIndexed.configure do |config|
4+
config.index_file = Rails.root.join('tmp', 'index')
5+
config.index_file_depth = 3
6+
config.min_word_size = 3
7+
end

Diff for: config/application.rb

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Boot Rails
2+
require File.join(File.dirname(__FILE__), 'boot')
3+
4+
# Here we load in Refinery to do the rest of the heavy lifting.
5+
# Refinery is setup in config/preinitializer.rb
6+
require Refinery.root.join("lib", "refinery_initializer").cleanpath.to_s
7+
8+
# Boot with Refinery. Most configuration is handled by Refinery.
9+
# Anything you specify here that Refinery specified internally will override Refinery.
10+
Refinery::Initializer.run do |config|
11+
# Settings in config/environments/* take precedence over those specified here.
12+
# Application configuration should go into files in config/initializers
13+
# -- all .rb files in that directory are automatically loaded.
14+
# See Rails::Configuration for more options.
15+
16+
config.action_controller.session = {
17+
:key => '_refinery_session',
18+
:secret => 'eec8fffc3637c05895f8e6a355179eaad0003ac5617e5368955baf7989e1faca4d8ab37140d690c20b05d5815609b7c680c644277b6a892be316a85c6596d75c'
19+
}
20+
21+
end
22+
23+
# You can set things in the following file and we'll try hard not to destroy them in updates, promise.
24+
# Note: These are settings that aren't dependent on environment type. For those, use the files in config/environments/
25+
require Rails.root.join('config', 'settings.rb').to_s
26+
27+
# Bundler has shown a weakness using Rails < 3 so we are going to
28+
# require these dependencies here until we can find another solution or until we move to
29+
# Rails 3.0 which should fix the issue (or until Bundler fixes the issue).
30+
require_dependency 'will_paginate'

Diff for: config/boot.rb

+124
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Don't change this file!
2+
# Configure your app in config/environment.rb and config/environments/*.rb
3+
4+
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
5+
6+
module Rails
7+
class << self
8+
def boot!
9+
unless booted?
10+
preinitialize
11+
pick_boot.run
12+
end
13+
end
14+
15+
def booted?
16+
defined? Rails::Initializer
17+
end
18+
19+
def pick_boot
20+
(vendor_rails? ? VendorBoot : GemBoot).new
21+
end
22+
23+
def vendor_rails?
24+
File.exist?("#{RAILS_ROOT}/vendor/rails")
25+
end
26+
27+
def preinitialize
28+
load(preinitializer_path) if File.exist?(preinitializer_path)
29+
end
30+
31+
def preinitializer_path
32+
"#{RAILS_ROOT}/config/preinitializer.rb"
33+
end
34+
end
35+
36+
class Boot
37+
def run
38+
load_initializer
39+
Rails::Initializer.run(:set_load_path)
40+
end
41+
end
42+
43+
class VendorBoot < Boot
44+
def load_initializer
45+
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
46+
Rails::Initializer.run(:install_gem_spec_stubs)
47+
Rails::GemDependency.add_frozen_gem_path
48+
end
49+
end
50+
51+
class GemBoot < Boot
52+
def load_initializer
53+
self.class.load_rubygems
54+
load_rails_gem
55+
require 'initializer'
56+
end
57+
58+
def load_rails_gem
59+
if version = self.class.gem_version
60+
gem 'rails', version
61+
else
62+
gem 'rails'
63+
end
64+
rescue Gem::LoadError => load_error
65+
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
66+
exit 1
67+
end
68+
69+
class << self
70+
def rubygems_version
71+
Gem::RubyGemsVersion rescue nil
72+
end
73+
74+
def gem_version
75+
if defined? RAILS_GEM_VERSION
76+
RAILS_GEM_VERSION
77+
elsif ENV.include?('RAILS_GEM_VERSION')
78+
ENV['RAILS_GEM_VERSION']
79+
else
80+
parse_gem_version(read_environment_rb)
81+
end
82+
end
83+
84+
def load_rubygems
85+
require 'rubygems'
86+
min_version = '1.3.1'
87+
unless rubygems_version >= min_version
88+
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
89+
exit 1
90+
end
91+
92+
rescue LoadError
93+
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
94+
exit 1
95+
end
96+
97+
def parse_gem_version(text)
98+
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
99+
end
100+
101+
private
102+
def read_environment_rb
103+
File.read("#{RAILS_ROOT}/config/environment.rb")
104+
end
105+
end
106+
end
107+
end
108+
109+
class Rails::Boot
110+
def run
111+
load_initializer
112+
113+
Rails::Initializer.class_eval do
114+
def load_gems
115+
@bundler_loaded ||= Bundler.require :default, Rails.env
116+
end
117+
end
118+
119+
Rails::Initializer.run(:set_load_path)
120+
end
121+
end
122+
123+
# All that for this:
124+
Rails.boot!

Diff for: config/cucumber.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<%
2+
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3+
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4+
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip"
5+
%>
6+
default: <%= std_opts %> features
7+
wip: --tags @wip:3 --wip features
8+
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip

Diff for: config/database.yml.mysql

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
login: &login
2+
adapter: mysql
3+
host: localhost
4+
username: root
5+
password: root
6+
7+
development: &development
8+
database: your_local_database
9+
<<: *login
10+
11+
test: &test
12+
database: your_test_database
13+
<<: *login
14+
15+
cucumber: &cucumber
16+
database: your_cucumber_database
17+
<<: *test
18+
19+
production: &production
20+
adapter: mysql
21+
host: localhost
22+
database: your_production_database
23+
username: your_production_database_login
24+
password: your_production_database_password

Diff for: config/database.yml.postgresql

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# PostgreSQL. Versions 7.4 and 8.x are supported.
2+
#
3+
# Install the ruby-postgres driver:
4+
# gem install ruby-postgres
5+
# On Mac OS X:
6+
# gem install ruby-postgres -- --include=/usr/local/pgsql
7+
# On Windows:
8+
# gem install ruby-postgres
9+
# Choose the win32 build.
10+
# Install PostgreSQL and put its /bin directory on your path.
11+
login: &login
12+
adapter: postgresql
13+
encoding: unicode
14+
username: postgres
15+
password: postgres
16+
pool: 5
17+
18+
development: &development
19+
database: your_local_database
20+
<<: *login
21+
22+
# Connect on a TCP socket. Omitted by default since the client uses a
23+
# domain socket that doesn't need configuration. Windows does not have
24+
# domain sockets, so uncomment these lines.
25+
#host: localhost
26+
#port: 5432
27+
28+
# Schema search path. The server defaults to $user,public
29+
#schema_search_path: myapp,sharedapp,public
30+
31+
# Minimum log levels, in increasing order:
32+
# debug5, debug4, debug3, debug2, debug1,
33+
# log, notice, warning, error, fatal, and panic
34+
# The server defaults to notice.
35+
#min_messages: warning
36+
37+
# Warning: The database defined as "test" will be erased and
38+
# re-generated from your development database when you run "rake".
39+
# Do not set this db to the same as development or production.
40+
test: &test
41+
database: your_test_database
42+
<<: *login
43+
44+
# Warning: The database defined as "cucumber" will be erased and
45+
# re-generated from your development database when you run "rake".
46+
# Do not set this db to the same as development or production.
47+
cucumber: &cucumber
48+
database: your_cucumber_database
49+
<<: *login
50+
51+
production: &production
52+
adapter: postgresql
53+
encoding: unicode
54+
pool: 5
55+
database: your_production_database
56+
username: your_production_database_login
57+
password: your_production_database_password

0 commit comments

Comments
 (0)