Permalink
Browse files

Support another edge case where the app's name may be app - this also…

… makes the whole thing more robust by only changing exactly what we need to change. Closes GH-188
  • Loading branch information...
1 parent dc311f7 commit 177a78fe1e17a84f31e180e03fd808cb9ee63aab @parndt parndt committed Sep 13, 2010
Showing with 6 additions and 4 deletions.
  1. +3 −1 bin/refinerycms
  2. +2 −2 refinerycms.gemspec
  3. +1 −1 vendor/refinerycms/refinery.rb
View
@@ -172,10 +172,12 @@ module Refinery
# Replace app constant with Refinery
# TODO: Find a way around this
camelized_app_name = @app_name.gsub(/\W/, '_').squeeze('_').gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
+ camelized_app_name << "::Application" # We only want to replace occurances like App::Application.
%w(Rakefile config.ru config/application.rb config/environment.rb
config/environments/development.rb config/environments/production.rb config/environments/test.rb
config/initializers/secret_token.rb config/initializers/session_store.rb).each do |hackable|
- find_and_replace(hackable, camelized_app_name, "Refinery")
+ find_and_replace(hackable, camelized_app_name, 'Refinery::Application')
+ find_and_replace(hackable, "module #{camelized_app_name.split('::').first}", 'module Refinery')
end
# Remove development specific stuff from the .gitinore file
View
@@ -2,9 +2,9 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms}
- s.version = %q{0.9.8.1}
+ s.version = %q{0.9.8.2}
s.description = %q{A Ruby on Rails CMS that supports Rails 3. It's easy to extend and sticks to 'the Rails way' where possible.}
- s.date = %q{2010-09-10}
+ s.date = %q{2010-09-14}
s.summary = %q{A Ruby on Rails CMS that supports Rails 3}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
@@ -27,7 +27,7 @@ class Version
@major = 0
@minor = 9
@tiny = 8
- @build = 1
+ @build = 2
class << self
attr_reader :major, :minor, :tiny, :build

0 comments on commit 177a78f

Please sign in to comment.