Skip to content

Commit

Permalink
fix for README.rdoc and update version
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Jan 25, 2010
1 parent e6cf54e commit 6d9d551
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -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

0 comments on commit 6d9d551

Please sign in to comment.