Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:resolve/refinerycms
Browse files Browse the repository at this point in the history
  • Loading branch information
djones committed Jan 26, 2010
2 parents b45632f + bd09185 commit 1a19da4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Expand Up @@ -19,7 +19,7 @@ extra_rake_tasks = []
# When running Refinery from a gem we lose the rake tasks, so add them back in:
extra_rake_tasks << Dir[File.join(REFINERY_ROOT, %w(vendor plugins * ** tasks ** *.rake))].sort unless REFINERY_ROOT == RAILS_ROOT
# We also need to load in the rake tasks from gem plugins whether Refinery is a gem or not:
extra_rake_tasks << $refinery_gem_plugin_lib_paths.collect {|path| Dir[File.join(%W(#{path} tasks ** *.rake))].sort}
extra_rake_tasks << $refinery_gem_plugin_lib_paths.collect {|path| Dir[File.join(%W(#{path} tasks ** *.rake))].sort} if defined?($refinery_gem_plugin_lib_paths) && !$refinery_gem_plugin_lib_paths.nil?
extra_rake_tasks.flatten.compact.uniq.each {|rake| load rake }

desc 'Removes trailing whitespace'
Expand All @@ -36,7 +36,7 @@ begin
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.authors = ["Resolve Digital", "David Jones", "Philip Arndt"]
s.extra_rdoc_files = %w(README CONTRIBUTORS LICENSE VERSION)
s.extra_rdoc_files = %w(README.rdoc CONTRIBUTORS LICENSE VERSION)
s.rdoc_options << "--inline-source"
s.has_rdoc = true
end
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.9.5.29
0.9.5.30
12 changes: 6 additions & 6 deletions bin/refinery
Expand Up @@ -16,9 +16,9 @@ unless (app_path = ARGV.shift).nil? or app_path.length == 0
unless File.exists? RAILS_ROOT and !ARGV.include?("--force")
# make the application path directory
FileUtils::makedirs RAILS_ROOT

# copy in all of the relevant directories and root files.
to_copy = %w(app config db lib public script CONTRIBUTORS LICENSE Rakefile README).map do |dir|
to_copy = %w(app config db lib public script CONTRIBUTORS LICENSE Rakefile README.rdoc).map do |dir|
File.join REFINERY_ROOT, dir
end
FileUtils::cp_r to_copy, RAILS_ROOT, :verbose => false
Expand All @@ -43,18 +43,18 @@ unless (app_path = ARGV.shift).nil? or app_path.length == 0
File.open(File.join(RAILS_ROOT, %W(config #{config}.yml)), "w").puts(lines.join("\n"))
end
end

# update the environment file with a new secret key.
require 'digest/sha1'
new_digest = ""
3.times { new_digest << Digest::SHA1.hexdigest("--refinery--#{Time.now.to_s}--#{rand(10000000)}--") }

# read in the file and split up the lines
lines = File.open(File.join(RAILS_ROOT, %w(config environment.rb)), "r").read.split("\n")
lines.each do |line|
match = line.scan(/(:secret)([^']*)([\'])([^\']*)/).flatten.last
line.gsub!(match, new_digest) unless match.nil?
end
end
# write the new content into the file.
File.open(File.join(RAILS_ROOT, %w(config environment.rb)), "w").puts(lines.join("\n"))

Expand All @@ -63,7 +63,7 @@ unless (app_path = ARGV.shift).nil? or app_path.length == 0

# update core script files with symlinks.
system "refinery-update-core #{RAILS_ROOT} --from-refinery-installer"

puts "=== ACTION REQUIRED ==="
puts "\nNow run these commands:"
puts "\ncd #{RAILS_ROOT}"
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
@@ -1,6 +1,7 @@
ActionController::Routing::Routes.draw do |map|

# NB: Engine routes are loaded FIRST from Rails v2.3 onward.
# 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"
Expand Down

0 comments on commit 1a19da4

Please sign in to comment.