refinerycms 0.9.5.30 → 0.9.5.31
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +15 -5
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/bin/refinery +9 -9
- data/bin/refinery-update-core +8 -5
- data/config/environment.rb +1 -1
- data/config/routes.rb +1 -0
- data/contributors.md +18 -0
- data/db/migrate/20100127004649_add_reset_code_to_users.rb +9 -0
- data/db/schema.rb +2 -1
- data/db/seeds.rb +11 -1
- data/{LICENSE → license.md} +3 -3
- data/public/javascripts/admin.js +5 -0
- data/public/javascripts/refinery/boot_wym.js +1 -1
- data/public/stylesheets/refinery/refinery.css +7 -0
- data/readme.md +161 -0
- data/themes/demolicious.zip +0 -0
- data/themes/hemingway.zip +0 -0
- data/vendor/plugins/authentication/app/controllers/admin/users_controller.rb +0 -27
- data/vendor/plugins/authentication/app/controllers/sessions_controller.rb +3 -0
- data/vendor/plugins/authentication/app/controllers/users_controller.rb +36 -21
- data/vendor/plugins/authentication/app/models/user.rb +40 -41
- data/vendor/plugins/authentication/app/models/user_mailer.rb +5 -12
- data/vendor/plugins/authentication/app/views/sessions/new.html.erb +3 -0
- data/vendor/plugins/authentication/app/views/user_mailer/reset_notification.html.erb +6 -0
- data/vendor/plugins/authentication/app/views/users/forgot.html.erb +13 -0
- data/vendor/plugins/authentication/app/views/users/reset.html.erb +18 -0
- data/vendor/plugins/authentication/authentication.md +7 -0
- data/vendor/plugins/authentication/config/routes.rb +6 -1
- data/vendor/plugins/dashboard/dashboard.md +22 -0
- data/vendor/plugins/images/images.md +46 -0
- data/vendor/plugins/inquiries/app/controllers/inquiries_controller.rb +0 -8
- data/vendor/plugins/inquiries/app/views/admin/inquiries/show.html.erb +3 -3
- data/vendor/plugins/inquiries/inquiries.md +31 -0
- data/vendor/plugins/news/app/controllers/news_items_controller.rb +9 -19
- data/vendor/plugins/news/app/views/news_items/index.html.erb +1 -1
- data/vendor/plugins/news/app/views/news_items/show.html.erb +13 -18
- data/vendor/plugins/news/news.md +20 -0
- data/vendor/plugins/pages/app/controllers/pages_controller.rb +2 -12
- data/vendor/plugins/pages/app/models/page.rb +5 -5
- data/vendor/plugins/pages/app/presenters/page_presenter.rb +3 -0
- data/vendor/plugins/pages/pages.md +141 -0
- data/vendor/plugins/pages/rails/init.rb +1 -1
- data/vendor/plugins/refinery/app/views/admin/_head.html.erb +1 -0
- data/vendor/plugins/refinery/app/views/layouts/application.html.erb +2 -15
- data/vendor/plugins/refinery/app/views/shared/_head.html.erb +13 -0
- data/vendor/plugins/refinery/app/views/shared/_header.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/_menu.html.erb +4 -15
- data/vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb +20 -25
- data/vendor/plugins/refinery/app/views/shared/_submenu.html.erb +5 -4
- data/vendor/plugins/refinery/crud.md +197 -0
- data/vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb +6 -1
- data/vendor/plugins/refinery/lib/refinery/application_controller.rb +18 -5
- data/vendor/plugins/refinery/lib/refinery/application_helper.rb +31 -28
- data/vendor/plugins/refinery/lib/refinery/base_presenter.rb +27 -0
- data/vendor/plugins/refinery/lib/refinery/initializer.rb +7 -3
- data/vendor/plugins/refinery/lib/tasks/doc.rake +4 -4
- data/vendor/plugins/refinery/plugins.md +194 -0
- data/vendor/plugins/refinery/rails/init.rb +5 -0
- data/vendor/plugins/refinery_settings/settings.md +5 -0
- data/vendor/plugins/resources/resources.md +9 -0
- data/vendor/plugins/themes/app/controllers/themes_controller.rb +12 -15
- data/vendor/plugins/themes/app/models/theme.rb +8 -14
- data/vendor/plugins/themes/config/routes.rb +3 -3
- data/vendor/plugins/themes/themes.md +133 -0
- metadata +29 -38
- data/CONTRIBUTORS +0 -11
- data/README.rdoc +0 -78
- data/themes/demolicious/LICENSE +0 -21
- data/themes/demolicious/README +0 -1
- data/themes/demolicious/images/footer_background.png +0 -0
- data/themes/demolicious/images/header_background.png +0 -0
- data/themes/demolicious/preview.png +0 -0
- data/themes/demolicious/stylesheets/application.css +0 -94
- data/themes/demolicious/stylesheets/formatting.css +0 -36
- data/themes/demolicious/stylesheets/home.css +0 -11
- data/themes/demolicious/stylesheets/ie6.css +0 -0
- data/themes/demolicious/stylesheets/ie7.css +0 -0
- data/themes/demolicious/views/layouts/application.html.erb +0 -33
- data/themes/demolicious/views/pages/home.html.erb +0 -1
- data/themes/demolicious/views/pages/show.html.erb +0 -1
- data/themes/hemingway/LICENSE +0 -7
- data/themes/hemingway/README +0 -3
- data/themes/hemingway/images/archives.gif +0 -0
- data/themes/hemingway/images/footer_black.gif +0 -0
- data/themes/hemingway/images/kyle-header.jpg +0 -0
- data/themes/hemingway/images/readon_black.gif +0 -0
- data/themes/hemingway/images/search.gif +0 -0
- data/themes/hemingway/images/spinner.gif +0 -0
- data/themes/hemingway/images/trackback_pingback.gif +0 -0
- data/themes/hemingway/preview.png +0 -0
- data/themes/hemingway/stylesheets/application.css +0 -713
- data/themes/hemingway/views/layouts/application.html.erb +0 -64
- data/themes/hemingway/views/shared/content_page.html.erb +0 -0
- data/vendor/plugins/authentication/app/models/user_observer.rb +0 -11
- data/vendor/plugins/authentication/app/views/user_mailer/activation.html.erb +0 -3
- data/vendor/plugins/authentication/app/views/user_mailer/signup_notification.html.erb +0 -8
- data/vendor/plugins/themes/themes.rdoc +0 -131
data/.yardopts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
--title "Refinery CMS"
|
2
|
-
lib/**/*.rb
|
2
|
+
lib/**/*.rb
|
3
3
|
app/**/*.rb
|
4
4
|
db/seeds.rb
|
5
5
|
config/preinitializer.rb
|
@@ -15,7 +15,17 @@ vendor/plugins/refinery_settings/**/*.rb
|
|
15
15
|
vendor/plugins/resources/**/*.rb
|
16
16
|
vendor/plugins/themes/**/*.rb
|
17
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
vendor/plugins/
|
18
|
+
readme.md
|
19
|
+
vendor/plugins/themes/themes.md
|
20
|
+
vendor/plugins/refinery/plugins.md
|
21
|
+
vendor/plugins/refinery/crud.md
|
22
|
+
vendor/plugins/pages/pages.md
|
23
|
+
vendor/plugins/images/images.md
|
24
|
+
vendor/plugins/authentication/authentication.md
|
25
|
+
vendor/plugins/dashboard/dashboard.md
|
26
|
+
vendor/plugins/inquiries/inquiries.md
|
27
|
+
vendor/plugins/news/news.md
|
28
|
+
vendor/plugins/resources/resources.md
|
29
|
+
vendor/plugins/resources/settings.md
|
30
|
+
license.md
|
31
|
+
contributors.md
|
data/Rakefile
CHANGED
@@ -36,7 +36,7 @@ begin
|
|
36
36
|
s.email = %q{info@refinerycms.com}
|
37
37
|
s.homepage = %q{http://refinerycms.com}
|
38
38
|
s.authors = ["Resolve Digital", "David Jones", "Philip Arndt"]
|
39
|
-
s.extra_rdoc_files = %w(
|
39
|
+
s.extra_rdoc_files = %w(readme.md contributors.md license.md VERSION)
|
40
40
|
s.rdoc_options << "--inline-source"
|
41
41
|
s.has_rdoc = true
|
42
42
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.5.
|
1
|
+
0.9.5.31
|
data/bin/refinery
CHANGED
@@ -18,29 +18,29 @@ unless (app_path = ARGV.shift).nil? or app_path.length == 0
|
|
18
18
|
FileUtils::makedirs RAILS_ROOT
|
19
19
|
|
20
20
|
# copy in all of the relevant directories and root files.
|
21
|
-
to_copy = %w(app config db lib public script
|
21
|
+
to_copy = %w(app config db lib public script themes contributors.md license.md Rakefile readme.md VERSION).map do |dir|
|
22
22
|
File.join REFINERY_ROOT, dir
|
23
23
|
end
|
24
24
|
FileUtils::cp_r to_copy, RAILS_ROOT, :verbose => false
|
25
25
|
# ensure lib/refinery_initializer.rb doesn't make it in.
|
26
|
-
FileUtils::rm File.join(RAILS_ROOT
|
26
|
+
FileUtils::rm File.join(%W(#{RAILS_ROOT} lib refinery_initializer.rb)) if File.exists?(File.join(%W(#{RAILS_ROOT} lib refinery_initializer.rb)))
|
27
27
|
|
28
28
|
# add in the config files
|
29
|
-
for config in
|
30
|
-
FileUtils::move File.join(
|
29
|
+
for config in %w(database amazon_s3 rackspace_cloudfiles)
|
30
|
+
FileUtils::move File.join(%W(#{RAILS_ROOT} config #{config}.yml.example)), File.join(%W(#{RAILS_ROOT} config #{config}.yml))
|
31
31
|
|
32
32
|
# figure out the app name from the install path and swap out your_local_xxx with this name.
|
33
33
|
unless RAILS_ROOT == "/" or RUBY_PLATFORM =~ /mswin/
|
34
34
|
app_name = RAILS_ROOT.split(File::SEPARATOR).last
|
35
35
|
# read in the file and split up the lines
|
36
|
-
lines = File.open(File.join(
|
36
|
+
lines = File.open(File.join(%W(#{RAILS_ROOT} config #{config}.yml)), "r").read.split("\n")
|
37
37
|
lines.each do |line|
|
38
38
|
line.gsub!("your_local_#{config}", "#{app_name}_development")
|
39
39
|
line.gsub!("your_test_#{config}", "#{app_name}_test")
|
40
40
|
line.gsub!("your_production_#{config}", "#{app_name}_production")
|
41
41
|
end
|
42
42
|
# write the new content into the file.
|
43
|
-
File.open(File.join(
|
43
|
+
File.open(File.join(%W(#{RAILS_ROOT} config #{config}.yml)), "w").puts(lines.join("\n"))
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
@@ -50,13 +50,13 @@ unless (app_path = ARGV.shift).nil? or app_path.length == 0
|
|
50
50
|
3.times { new_digest << Digest::SHA1.hexdigest("--refinery--#{Time.now.to_s}--#{rand(10000000)}--") }
|
51
51
|
|
52
52
|
# read in the file and split up the lines
|
53
|
-
lines = File.open(File.join(RAILS_ROOT
|
53
|
+
lines = File.open(File.join(%W(#{RAILS_ROOT} config environment.rb)), "r").read.split("\n")
|
54
54
|
lines.each do |line|
|
55
55
|
match = line.scan(/(:secret)([^']*)([\'])([^\']*)/).flatten.last
|
56
56
|
line.gsub!(match, new_digest) unless match.nil?
|
57
57
|
end
|
58
58
|
# write the new content into the file.
|
59
|
-
File.open(File.join(RAILS_ROOT
|
59
|
+
File.open(File.join(%W(#{RAILS_ROOT} config environment.rb)), "w").puts(lines.join("\n"))
|
60
60
|
|
61
61
|
puts "\n---------"
|
62
62
|
puts "Refinery successfully installed in '#{RAILS_ROOT}'!\n\n"
|
@@ -67,8 +67,8 @@ unless (app_path = ARGV.shift).nil? or app_path.length == 0
|
|
67
67
|
puts "=== ACTION REQUIRED ==="
|
68
68
|
puts "\nNow run these commands:"
|
69
69
|
puts "\ncd #{RAILS_ROOT}"
|
70
|
-
puts "rake gems:install"
|
71
70
|
puts "rake db:setup"
|
71
|
+
puts "rake gems:install"
|
72
72
|
puts "\nruby script/server"
|
73
73
|
puts "\nThis will install all the required gems, set up your database, and launches the built-in webserver."
|
74
74
|
puts "You can now see your site running in your browser at http://localhost:3000"
|
data/bin/refinery-update-core
CHANGED
@@ -15,13 +15,16 @@ unless RAILS_ROOT.nil? or RAILS_ROOT.length == 0
|
|
15
15
|
end
|
16
16
|
|
17
17
|
# copy in any new migrations.
|
18
|
-
FileUtils::cp Dir[File.join(REFINERY_ROOT
|
18
|
+
FileUtils::cp Dir[File.join(%W(#{REFINERY_ROOT} db migrate *.rb))], File.join(%W(#{RAILS_ROOT} db migrate))
|
19
19
|
|
20
20
|
# replace rakefile.
|
21
|
-
FileUtils::cp File.join(REFINERY_ROOT
|
21
|
+
FileUtils::cp File.join(%W(#{REFINERY_ROOT} Rakefile)), File.join(%W(#{RAILS_ROOT} Rakefile))
|
22
|
+
|
23
|
+
# replace the preinitializer.
|
24
|
+
FileUtils::cp File.join(%W(#{REFINERY_ROOT} config preinitializer.rb)), File.join(%W(#{RAILS_ROOT} config preinitializer.rb))
|
22
25
|
|
23
26
|
# read in the config files
|
24
|
-
app_config = File.open(File.join(RAILS_ROOT
|
27
|
+
app_config = File.open(File.join(%W(#{RAILS_ROOT} config environment.rb)), "r").read
|
25
28
|
environment_updated = false
|
26
29
|
|
27
30
|
# backup app's environment.rb
|
@@ -29,10 +32,10 @@ unless RAILS_ROOT.nil? or RAILS_ROOT.length == 0
|
|
29
32
|
unless (app_refinery_gems_section = app_config.scan(matcher).join("")).length == 0
|
30
33
|
# read in the config file in the gem
|
31
34
|
refinery_config = File.open(File.join(REFINERY_ROOT, %w(config environment.rb)), "r").read
|
32
|
-
FileUtils.cp File.join(RAILS_ROOT
|
35
|
+
FileUtils.cp File.join(%W(#{RAILS_ROOT} config environment.rb)), File.join(%W(#{RAILS_ROOT} config environment.autobackupbyrefinery.rb))
|
33
36
|
|
34
37
|
# write the new content into the file.
|
35
|
-
File.open(File.join(RAILS_ROOT
|
38
|
+
File.open(File.join(%W(#{RAILS_ROOT} config environment.rb)), "w").puts(app_config.gsub!(
|
36
39
|
app_refinery_gems_section,
|
37
40
|
refinery_config.scan(matcher).join("")
|
38
41
|
))
|
data/config/environment.rb
CHANGED
@@ -69,7 +69,7 @@ eval("#{(defined? Refinery::Initializer) ? Refinery : Rails}::Initializer").run
|
|
69
69
|
config.gem "will_paginate", :version => ">= 2.3.11", :lib => "will_paginate", :source => "http://gemcutter.org"
|
70
70
|
config.gem "rails", :version => ">= 2.3.5", :lib => "rails"
|
71
71
|
config.gem "aasm", :version => ">= 2.1.3", :lib => "aasm", :source => "http://gemcutter.org"
|
72
|
-
config.gem "slim_scrooge", :version => ">= 1.0.3", :lib => "slim_scrooge", :source => "http://gemcutter.org"
|
72
|
+
config.gem "slim_scrooge", :version => ">= 1.0.3", :lib => "slim_scrooge", :source => "http://gemcutter.org" unless RUBY_PLATFORM =~ /mswin|mingw/ # kill gem when windows is running.
|
73
73
|
config.gem "hpricot", :version => ">= 0.8.1", :lib => "hpricot", :source => "http://gemcutter.org"
|
74
74
|
#===REFINERY END OF REQUIRED GEMS===
|
75
75
|
end
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
ActionController::Routing::Routes.draw do |map|
|
2
2
|
|
3
3
|
# NB: Engine routes are loaded FIRST from Rails v2.3 onward.
|
4
|
+
# These routes are contained within vendor/plugins/engine_name/config/routes.rb
|
4
5
|
|
5
6
|
# The priority is based upon order of creation: first created -> highest priority.
|
6
7
|
map.root :controller => "pages", :action => "home"
|
data/contributors.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Contributors
|
2
|
+
|
3
|
+
## Major
|
4
|
+
|
5
|
+
* parndt - Philip Arndt, [Resolve Digital](http://www.resolvedigital.co.nz)
|
6
|
+
* djones - [David Jones](http://www.d-jones.com), [Resolve Digital](http://www.resolvedigital.co.nz)
|
7
|
+
|
8
|
+
## Minor
|
9
|
+
|
10
|
+
* ryanwood - [Ryan Wood](http://www.ryanwood.com)
|
11
|
+
* hernan - Hernan Fernandez
|
12
|
+
* btucker - [Ben Tucker](http://btucker.net)
|
13
|
+
* avit - [Andrew Vit](http://avit.ca)
|
14
|
+
* stevenheidel - [Steven Heidel](http://www.livingskywebdesign.com)
|
15
|
+
* moretea - Maarten Hoogendoorn
|
16
|
+
* csessions - [Chris Sessions](http://www.flying-saucer.net)
|
17
|
+
|
18
|
+
Want your name here? Help us out in anyway you can. And don't be so scared, we don't expect your code to be perfect the first time round.
|
data/db/schema.rb
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
#
|
10
10
|
# It's strongly recommended to check this file into your version control system.
|
11
11
|
|
12
|
-
ActiveRecord::Schema.define(:version =>
|
12
|
+
ActiveRecord::Schema.define(:version => 20100127004649) do
|
13
13
|
|
14
14
|
create_table "images", :force => true do |t|
|
15
15
|
t.integer "parent_id"
|
@@ -157,6 +157,7 @@ ActiveRecord::Schema.define(:version => 20100114092849) do
|
|
157
157
|
t.datetime "created_at"
|
158
158
|
t.datetime "updated_at"
|
159
159
|
t.boolean "superuser", :default => false
|
160
|
+
t.string "reset_code"
|
160
161
|
end
|
161
162
|
|
162
163
|
add_index "users", ["id"], :name => "index_users_on_id"
|
data/db/seeds.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[{:name => "site_name", :value => "Company Name"},
|
2
2
|
{:name => "new_page_parts", :value => false},
|
3
|
-
{:name => "activity_show_limit", :value =>
|
3
|
+
{:name => "activity_show_limit", :value => 18},
|
4
4
|
{:name => "preferred_image_view", :value => :grid},
|
5
5
|
{:name => "analytics_page_code", :value => "UA-xxxxxx-x"},
|
6
6
|
{:name => "theme", :value => "demolicious"},
|
@@ -116,3 +116,13 @@ Page.create(:title => "Down for maintenance",
|
|
116
116
|
:title => "body",
|
117
117
|
:body => "<p>Our site is currently down for maintenance. Please try back later.</p>"
|
118
118
|
})
|
119
|
+
|
120
|
+
# Install default themes.
|
121
|
+
Dir[File.join(%W(#{REFINERY_ROOT} themes *.zip))].each do |theme|
|
122
|
+
Theme.create(:uploaded_data => {
|
123
|
+
"size" => File.size(theme),
|
124
|
+
"content_type" => "application/zip",
|
125
|
+
"filename" => theme.split('/').last,
|
126
|
+
'tempfile' => File.open(theme)
|
127
|
+
}).read_theme
|
128
|
+
end
|
data/{LICENSE → license.md}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
# MIT License
|
2
2
|
|
3
|
-
Copyright (c) 2005-
|
3
|
+
Copyright (c) 2005-2010 [Resolve Digital Ltd.](http://www.resolvedigital.co.nz)
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
21
|
+
SOFTWARE.
|
@@ -43,7 +43,7 @@ var wymeditor_boot_options = jQuery.extend({
|
|
43
43
|
, classesItemHtml: "<li><a href='#' name='"+ WYMeditor.CLASS_NAME + "'>"+ WYMeditor.CLASS_TITLE+ "</a></li>"
|
44
44
|
, classesItemHtmlMultiple: "<li class='wym_tools_class_multiple_rules'><span>" + WYMeditor.CLASS_TITLE + "</span><ul>{classesItemHtml}</ul></li>"
|
45
45
|
|
46
|
-
, classesItems:
|
46
|
+
, classesItems: wymeditorClassesItems
|
47
47
|
|
48
48
|
, containersHtml: "<ul class='wym_containers wym_section'>" + WYMeditor.CONTAINERS_ITEMS + "</ul>"
|
49
49
|
|
@@ -187,6 +187,13 @@ a:hover {
|
|
187
187
|
margin-top: 12px;
|
188
188
|
}
|
189
189
|
|
190
|
+
#page_container.login div.forgot_password {
|
191
|
+
float: right;
|
192
|
+
|
193
|
+
margin-top: 11px;
|
194
|
+
margin-right: 3px;
|
195
|
+
}
|
196
|
+
|
190
197
|
#page_container.login div.remember_me label {
|
191
198
|
display: inline;
|
192
199
|
}
|
data/readme.md
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
# Refinery CMS
|
2
|
+
|
3
|
+
An open source Ruby on Rails content management system for small business.
|
4
|
+
|
5
|
+
* [Front end live demo ](http://demo.refinerycms.com)
|
6
|
+
* [Back end live demo ](http://demo.refinerycms.com/admin)
|
7
|
+
|
8
|
+
For more screenshots, example sites & high level information: [http://refinerycms.com](http://refinerycms.com)
|
9
|
+
|
10
|
+
![Refinery Dashboard](http://refinerycms.com/system/images/0000/0576/dashboard.png)
|
11
|
+
|
12
|
+
## What it's good at?
|
13
|
+
|
14
|
+
__Refinery is great for small business sites where the client needs to be able to update their website themselves__ without being bombarded with anything too complicated.
|
15
|
+
|
16
|
+
Unlike other content managers, Refinery is truly aimed at the end user making it easy for them to pick up and make changes themselves.
|
17
|
+
|
18
|
+
### For developers
|
19
|
+
|
20
|
+
Refinery makes it easy to:
|
21
|
+
|
22
|
+
* Get a small business site up and running __ridiculously quickly__
|
23
|
+
* __Theme and customise__ the look to suit the business
|
24
|
+
* __Extend with custom plugins__ to do anything Refinery doesn't do out of the box
|
25
|
+
* Tries to stick to __"the Rails way"__ as much as possible
|
26
|
+
|
27
|
+
## Requirements
|
28
|
+
|
29
|
+
Refinery runs using a number of gems which (as of Refinery version 0.9.5.29) are outlined below:
|
30
|
+
|
31
|
+
* [rake >= 0.8.3](http://gemcutter.org/gems/rake)
|
32
|
+
* [friendly_id >= 2.2.2](http://gemcutter.org/gems/friendly_id)
|
33
|
+
* [will_paginate >= 2.3.11](http://gemcutter.org/gems/will_paginate)
|
34
|
+
* [rails >= 2.3.5](http://gemcutter.org/gems/rails)
|
35
|
+
* [aasm >= 2.1.3](http://gemcutter.org/gems/aasm)
|
36
|
+
* [unicode >= 0.1](http://gemcutter.org/gems/unicode)
|
37
|
+
* [slim_scrooge >= 1.0.3](http://gemcutter.org/gems/slim_scrooge)
|
38
|
+
* [hpricot >= 0.8.1](http://gemcutter.org/gems/hpricot)
|
39
|
+
|
40
|
+
### Other dependancies
|
41
|
+
|
42
|
+
* [RMagick](http://github.com/rmagick/rmagick) - [Install docs](http://rmagick.rubyforge.org/install-faq.html) or for
|
43
|
+
Mac OS users [this install script](http://github.com/maddox/magick-installer) will be easier.
|
44
|
+
|
45
|
+
## Installing and Setting Up Refinery
|
46
|
+
|
47
|
+
### 1. Get the Refinery code
|
48
|
+
|
49
|
+
#### Install the Gem
|
50
|
+
|
51
|
+
gem install refinerycms --source http://gemcutter.org
|
52
|
+
refinery /path/to/project
|
53
|
+
|
54
|
+
#### Or, clone Refinery's Git repository
|
55
|
+
|
56
|
+
git clone git://github.com/resolve/refinerycms.git mynewsite.com
|
57
|
+
cd ./mynewsite.com
|
58
|
+
git remote rm origin
|
59
|
+
git remote add origin git@github.com:you/yournewsite.git
|
60
|
+
mv ./config/database.yml.example ./config/database.yml
|
61
|
+
|
62
|
+
### 2. Configuration
|
63
|
+
|
64
|
+
Firstly, edit ``config/database.yml`` to reflect your database server details.
|
65
|
+
|
66
|
+
Next create your database and fill it with Refinery's default data:
|
67
|
+
|
68
|
+
rake db:setup
|
69
|
+
|
70
|
+
After your database exists, you'll need to install the gems that Refinery depends on. You can do this by running:
|
71
|
+
|
72
|
+
rake gems:install
|
73
|
+
|
74
|
+
### 3. Starting up your site
|
75
|
+
|
76
|
+
ruby script/server
|
77
|
+
|
78
|
+
Now visit [http://localhost:3000](http://localhost:3000) and your site should be running.
|
79
|
+
|
80
|
+
You will be prompted to setup your first user.
|
81
|
+
|
82
|
+
## Help and Developer Documentation
|
83
|
+
|
84
|
+
* [Google Group Discussion](http://groups.google.com/group/refinery-cms)
|
85
|
+
* [Developer/API documentation](http://api.refinerycms.org)
|
86
|
+
* [Developer video - 26 mins](http://refinerycms.com/pages/for-developers)
|
87
|
+
* [IRC Channel](irc://irc.freenode.net/refinerycms)
|
88
|
+
|
89
|
+
## Setting Up on Heroku
|
90
|
+
|
91
|
+
If you're using [Heroku](http://heroku.com/) you will want to put
|
92
|
+
|
93
|
+
USE_S3_BACKEND = true
|
94
|
+
|
95
|
+
in your ``config/production.rb`` file.
|
96
|
+
|
97
|
+
## Updating to the latest Refinery
|
98
|
+
|
99
|
+
### When using the gem
|
100
|
+
|
101
|
+
Simply run the command:
|
102
|
+
|
103
|
+
refinery-update-core /path/to/project/root/
|
104
|
+
|
105
|
+
and the up-to-date core files will be copied from the latest gem into your project.
|
106
|
+
|
107
|
+
### When using Git
|
108
|
+
|
109
|
+
You can update by running these commands:
|
110
|
+
|
111
|
+
git remote add refinerycms git://github.com/resolve/refinerycms.git
|
112
|
+
git pull refinerycms master
|
113
|
+
|
114
|
+
This will pull in all of the updated files in the project and may result in some merge conflicts which you will need to resolve.
|
115
|
+
|
116
|
+
## What comes included with Refinery
|
117
|
+
|
118
|
+
### [Pages](http://github.com/resolve/refinerycms/blob/master/vendor/plugins/pages/pages.md)
|
119
|
+
|
120
|
+
* Easily edit and manage pages with a [WYSIWYG visual editor](http://www.wymeditor.org/)
|
121
|
+
* Manage you site's structure
|
122
|
+
|
123
|
+
### [Images](http://github.com/resolve/refinerycms/blob/master/vendor/plugins/images/images.md) & [Resources](http://github.com/resolve/refinerycms/blob/master/vendor/plugins/resources/resources.md)
|
124
|
+
|
125
|
+
* Easily upload and insert images
|
126
|
+
* Upload and link to resources like PDF documents
|
127
|
+
|
128
|
+
### [Inquiries](http://github.com/resolve/refinerycms/blob/master/vendor/plugins/inquiries/inquiries.md)
|
129
|
+
|
130
|
+
* Collect inquiries from a contact form
|
131
|
+
* Manage your inquiries and be notified when new ones come in
|
132
|
+
|
133
|
+
### [News](http://github.com/resolve/refinerycms/blob/master/vendor/plugins/news/news.md)
|
134
|
+
|
135
|
+
* Post news about your company and update your visitors
|
136
|
+
|
137
|
+
### [Settings](http://github.com/resolve/refinerycms/blob/master/vendor/plugins/refinery_settings/settings.md)
|
138
|
+
|
139
|
+
* Manage the behaviour of Refinery
|
140
|
+
|
141
|
+
### [Dashboard](http://github.com/resolve/refinerycms/blob/master/vendor/plugins/dashboard/dashboard.md)
|
142
|
+
|
143
|
+
* Get an overview of what has been updated recently
|
144
|
+
|
145
|
+
### ...Want more?
|
146
|
+
|
147
|
+
Extend Refinery easily by running the Refinery generator
|
148
|
+
|
149
|
+
ruby script/generate refinery
|
150
|
+
|
151
|
+
to get help on how to use that.
|
152
|
+
|
153
|
+
### What about a portfolio?
|
154
|
+
|
155
|
+
Check out the [portfolio plugin gem](http://github.com/resolve/portfolio)
|
156
|
+
|
157
|
+
## License
|
158
|
+
|
159
|
+
Refinery is released under the MIT license and is copyright (c) 2005-2009 [Resolve Digital Ltd.](http://www.resolvedigital.co.nz)
|
160
|
+
|
161
|
+
A copy of the MIT license can be found in the license.md file.
|
Binary file
|
Binary file
|
@@ -3,7 +3,6 @@ class Admin::UsersController < Admin::BaseController
|
|
3
3
|
crudify :user, :order => 'login', :title_attribute => 'login', :conditions => "state = 'active'"
|
4
4
|
|
5
5
|
# Protect these actions behind an admin login
|
6
|
-
# before_filter :admin_required, :only => [:suspend, :unsuspend, :destroy, :purge]
|
7
6
|
before_filter :find_user, :except => [:new, :create]
|
8
7
|
before_filter :load_available_plugins, :only => [:new, :create, :edit, :update]
|
9
8
|
|
@@ -55,34 +54,8 @@ class Admin::UsersController < Admin::BaseController
|
|
55
54
|
end
|
56
55
|
end
|
57
56
|
|
58
|
-
def suspend
|
59
|
-
@user.suspend!
|
60
|
-
redirect_to admin_users_path
|
61
|
-
end
|
62
|
-
|
63
|
-
def unsuspend
|
64
|
-
@user.unsuspend!
|
65
|
-
redirect_to admin_users_path
|
66
|
-
end
|
67
|
-
|
68
|
-
def destroy
|
69
|
-
@user.delete!
|
70
|
-
@user.destroy
|
71
|
-
flash[:notice] = "'#{@user.login}' was successfully deleted."
|
72
|
-
redirect_to admin_users_path
|
73
|
-
end
|
74
|
-
|
75
|
-
def purge
|
76
|
-
@user.destroy
|
77
|
-
redirect_to admin_users_path
|
78
|
-
end
|
79
|
-
|
80
57
|
protected
|
81
58
|
|
82
|
-
def find_user
|
83
|
-
@user = User.find(params[:id])
|
84
|
-
end
|
85
|
-
|
86
59
|
def can_create_public_user
|
87
60
|
User.count == 0
|
88
61
|
end
|