Skip to content

Commit

Permalink
add support for amazon 3s and remove rackspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Thu committed Apr 8, 2010
2 parents 70a24f2 + fed69e3 commit 3e199b0
Show file tree
Hide file tree
Showing 332 changed files with 11,196 additions and 3,183 deletions.
2 changes: 0 additions & 2 deletions .gems
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
refinerycms-news --version "~> 0.9.7"
factory_girl --source http://gemcutter.org
thoughtbot-shoulda --source http://gems.github.com
calendar_date_select
formtastic
will_paginate
cloudfiles
validation_reflection
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ doc/api
doc/app
doc/*
config/database.yml
config/amazon_s3.yml
public/images/system/*
nbproject
index/**/*
Expand All @@ -23,3 +22,5 @@ refinerycms.gemspec
.bundle
vendor/cache
*.lock
callsite_hash.*
**/*/slim_scrooge/ext/Makefile
2 changes: 0 additions & 2 deletions .yardopts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ vendor/plugins/images/**/*.rb
vendor/plugins/authentication/**/*.rb
vendor/plugins/dashboard/**/*.rb
vendor/plugins/inquiries/**/*.rb
vendor/plugins/news/**/*.rb
vendor/plugins/pages/**/*.rb
vendor/plugins/refinery/**/*.rb
vendor/plugins/refinery_dialogs/**/*.rb
Expand All @@ -24,7 +23,6 @@ vendor/plugins/images/images.md
vendor/plugins/authentication/authentication.md
vendor/plugins/dashboard/dashboard.md
vendor/plugins/inquiries/inquiries.md
vendor/plugins/news/news.md
vendor/plugins/resources/resources.md
vendor/plugins/refinery_settings/settings.md
license.md
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.6.20
0.9.6.26
56 changes: 0 additions & 56 deletions app/models/image.rb

This file was deleted.

54 changes: 0 additions & 54 deletions app/models/resource.rb

This file was deleted.

13 changes: 11 additions & 2 deletions bin/refinery-update-core
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ unless rails_root.nil? or rails_root.length == 0
else
lines = File.open(File.join(%W(#{rails_root} config application.rb)), "r").read.split("\n")
end

secret_key = ""
lines.each do |line|
match = line.scan(/(:secret)([^']*)([\'])([^\']*)/).flatten.last
Expand All @@ -58,10 +59,18 @@ unless rails_root.nil? or rails_root.length == 0
FileUtils::cp File.join(%W(#{refinery_root} config environment.rb)), File.join(%W(#{rails_root} config environment.rb))
end

unless File.exist?(File.join(%W(#{rails_root} config settings.rb)))
FileUtils::cp(File.join(%W(#{refinery_root} config settings.rb)), File.join(%W(#{rails_root} config settings.rb)))
end

app_config_file = "application.rb"

app_config = File.open(File.join(%W(#{rails_root} config #{app_config_file})), "r").read

# copy new jquery javascripts.
FileUtils.cp File.join(%W(#{refinery_root} public javascripts jquery.js)), File.join(%W(#{rails_root} public javascripts jquery.js))
FileUtils.cp File.join(%W(#{refinery_root} public javascripts jquery-ui-1.8.min.js)), File.join(%W(#{rails_root} public javascripts jquery-ui-1.8.min.js))

# backup app's config file and replace it, if required.
environment_updated = false
matcher = /(#===REFINERY REQUIRED GEMS===)(.+?)(#===REFINERY END OF REQUIRED GEMS===)/m
Expand All @@ -71,9 +80,9 @@ unless rails_root.nil? or rails_root.length == 0

# copy the new config file.
FileUtils.cp File.join(%W(#{refinery_root} config #{app_config_file})), File.join(%W(#{rails_root} config #{app_config_file}))

# Write the secret key back into the file.


environment_updated = true
end
Expand Down
18 changes: 0 additions & 18 deletions config/amazon_s3.yml.example

This file was deleted.

9 changes: 4 additions & 5 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION

# Specified gem version of Refinery to use when vendor/plugins/refinery/lib/refinery.rb is not present.
REFINERY_GEM_VERSION = '0.9.6.20' unless defined? REFINERY_GEM_VERSION
REFINERY_GEM_VERSION = '0.9.6.26' unless defined? REFINERY_GEM_VERSION

# Boot Rails
require File.join(File.dirname(__FILE__), 'boot')
Expand All @@ -24,18 +24,17 @@
:secret => 'eec8fffc3637c05895f8e6a355179eaad0003ac5617e5368955baf7989e1faca4d8ab37140d690c20b05d5815609b7c680c644277b6a892be316a85c6596d75c'
}

# Specify your application's gem requirements here. See the example below:
config.gem "refinerycms-news", :lib => "news", :version => "~> 0.9.7"
# Specify your application's gem requirements here. See the examples below:
# config.gem "refinerycms-news", :lib => "news", :version => "~> 0.9.7"
# config.gem "refinerycms-portfolio", :lib => "portfolio", :version => "~> 0.9.3.8"
config.gem "factory_girl", :source => "http://gemcutter.org"
config.gem "thoughtbot-shoulda", :lib => "shoulda", :source => "http://gems.github.com"
config.gem "calendar_date_select"
config.gem 'formtastic'
config.gem 'will_paginate'
config.gem "cloudfiles"
config.gem "validation_reflection"
end

# You can set things in the following file and we'll try hard not to destroy them in updates, promise.
# Note: These are settings that aren't dependent on environment type. For those, use the files in config/environments/
require Rails.root.join('config', 'settings.rb').to_s
require Rails.root.join('config', 'settings.rb').to_s
12 changes: 7 additions & 5 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
# Uncomment the following lines if you're getting
# "A copy of XX has been removed from the module tree but is still active!"
# or you want to develop a plugin and don't want to restart every time a change is made:
#config.after_initialize do
# ::ActiveSupport::Dependencies.load_once_paths = ::ActiveSupport::Dependencies.load_once_paths.select do |path|
# (path =~ /app/).nil?
# end
#end
=begin
config.after_initialize do
::ActiveSupport::Dependencies.load_once_paths = ::ActiveSupport::Dependencies.load_once_paths.select do |path|
(path =~ /app/).nil?
end
end
=end
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
# Set to true in order to use Amazon's Simple Storage Service on your production machine
# instead of the default file system for resources and images
# Make sure to your bucket info is correct in amazon_s3.yml
Refinery.s3_backend = false
Refinery.s3_backend = true
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# These routes are contained within vendor/plugins/engine_name/config/routes.rb

# The priority is based upon order of creation: first created -> highest priority.
#map.root :controller => "pages", :action => "home"
map.root :controller => "home"

map.namespace(:member) do |member|
Expand Down
2 changes: 1 addition & 1 deletion config/settings.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Other settings go here as below.
# These settings are ones that are set for all environments and need to be set AFTER the refinery boot process.
Refinery.authentication_login_field = 'login'
Refinery.authentication_login_field = 'login'
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is auto-generated from the current state of the database. Instead of editing this file,
# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.
#
Expand Down
17 changes: 8 additions & 9 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
{:name => "image_thumbnails", :value => {
:dialog_thumb => 'c106x106',
:grid => 'c135x135',
:thumb => '50x50>',
:medium => '225x255>',
:side_body => '300x500>',
:thumb => '50x50',
:medium => '225x255',
:side_body => '300x500',
:preview => 'c96x96'
}
}].each do |setting|
RefinerySetting[setting[:name].to_sym] = setting[:value]
RefinerySetting.find_by_name(setting[:name].to_s).update_attributes({:destroyable => false})
RefinerySetting.create(:name => setting[:name].to_s, :value => setting[:value], :destroyable => false)
end

InquirySetting.create(:name => "Confirmation Body", :value => "Thank you for your inquiry %name%,\n\nThis email is a receipt to confirm we have received your inquiry and we'll be in touch shortly.\n\nThanks.", :destroyable => false)
Expand Down Expand Up @@ -50,7 +49,7 @@
:link_url => "/inquiries/new",
:menu_match => "^/inquiries.*$",
:deletable => false,
:position => 3).parts.create(
:position => 2).parts.create(
{
:title => "Body",
:body => "<p>Get in touch with us. Just use the form below and we'll get back to you as soon as we can.</p>"
Expand All @@ -64,8 +63,8 @@
:menu_match => "^/inquiries/thank_you$",
:show_in_menu => false,
:deletable => false,
:position => 0,
:parent_id => 3).parts.create(
:position => 3,
:parent_id => 4).parts.create(
{
:title => "Body",
:body => "<p>We've received your inquiry and will get back to you with a response shortly.</p><p><a href='/'>Return to the home page</a></p>"
Expand All @@ -87,7 +86,7 @@
:position => 5).parts.create(
{
:title => "Body",
:body => "<p>We respect your privacy. We do not market, rent or sell our email list to any outside parties.</p><p>We need your e-mail address so that we can ensure that the people using our forms are bona fide. It also allows us to send you e-mail newsletters and other communications, if you opt-in. Your postal address is required in order to send you information and pricing, if you request it.</p><p>Please call us at 123 456 7890 if you have any questions or concerns.</p>"
:body => "<p><strong>We respect your privacy. We do not market, rent or sell our email list to any outside parties.</p><p>We need your e-mail address so that we can ensure that the people using our forms are bona fide. It also allows us to send you e-mail newsletters and other communications, if you opt-in. Your postal address is required in order to send you information and pricing, if you request it.</p><p>Please call us at 123 456 7890 if you have any questions or concerns.</p>"
}).page.parts.create(
{
:title => "Side Body",
Expand Down
2 changes: 1 addition & 1 deletion lib/refinery/tasks/refinery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# So here, we find them (if there are any) and include them into rake.
extra_rake_tasks = []
if defined?(Refinery) && Refinery.is_a_gem
extra_rake_tasks << Dir[Refinery.root.join("vendor", "plugins", "*", "**", "tasks", "**", "*", "*.rake")].sort
extra_rake_tasks << Dir[Refinery.root.join("vendor", "plugins", "*", "**", "tasks", "**", "*", "*.rake").to_s].sort
end

# We also need to load in the rake tasks from gem plugins whether Refinery is a gem or not:
Expand Down
Binary file modified public/favicon.ico
Binary file not shown.
8 changes: 6 additions & 2 deletions public/javascripts/admin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
var wymeditorClassesItems = [
if (!wymeditorClassesItems) {
var wymeditorClassesItems = [];
}

wymeditorClassesItems = $.extend([
{name: 'text-align', rules:['left', 'center', 'right', 'justify'], join: '-'}
, {name: 'image-align', rules:['left', 'right'], join: '-'}
, {name: 'font-size', rules:['small', 'normal', 'large'], join: '-'}
];
], wymeditorClassesItems);
Loading

0 comments on commit 3e199b0

Please sign in to comment.