Skip to content

Commit

Permalink
Increased version number to 0.9.8.8 to address an issue where Refiner…
Browse files Browse the repository at this point in the history
…ySetting would try to access its table when the table didn't exist which wreaks havoc on any settings loaded during the initialisation process. Also incremented rspec version to ~> 2.3
  • Loading branch information
parndt committed Dec 15, 2010
1 parent ade7bec commit 33d6115
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ gem 'refinerycms-i18n', '~> 0.9'

group :test do
# RSpec
gem 'rspec-rails', (RSPEC_VERSION = '~> 2.2')
gem 'rspec-rails', '~> 2.3'
# Cucumber
gem 'capybara'
gem 'database_cleaner'
Expand Down
22 changes: 11 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
refinerycms (0.9.8.6)
refinerycms (0.9.8.8)
acts_as_indexed (~> 0.6.6)
authlogic (~> 2.1.6)
bundler (~> 1.0.0)
Expand Down Expand Up @@ -139,19 +139,19 @@ GEM
filters_spam (~> 0.2)
routing-filter (0.1.7)
actionpack
rspec (2.2.0)
rspec-core (~> 2.2)
rspec-expectations (~> 2.2)
rspec-mocks (~> 2.2)
rspec-core (2.2.1)
rspec-expectations (2.2.0)
rspec (2.3.0)
rspec-core (~> 2.3.0)
rspec-expectations (~> 2.3.0)
rspec-mocks (~> 2.3.0)
rspec-core (2.3.0)
rspec-expectations (2.3.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.2.0)
rspec-rails (2.2.1)
rspec-mocks (2.3.0)
rspec-rails (2.3.0)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.2.0)
rspec (~> 2.3.0)
ruby-prof (0.9.2)
rubyzip (0.9.4)
selenium-webdriver (0.1.1)
Expand Down Expand Up @@ -192,7 +192,7 @@ DEPENDENCIES
refinerycms!
refinerycms-i18n (~> 0.9)
refinerycms-inquiries (~> 0.9)
rspec-rails (~> 2.2)
rspec-rails (~> 2.3)
ruby-prof
spork
sqlite3-ruby
2 changes: 1 addition & 1 deletion refinerycms.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = %q{refinerycms}
s.version = %q{0.9.8.7}
s.version = %q{0.9.8.8}
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-12-15}
s.summary = %q{A Ruby on Rails CMS that supports Rails 3}
Expand Down
2 changes: 1 addition & 1 deletion vendor/refinerycms/refinery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Version
@major = 0
@minor = 9
@tiny = 8
@build = 7
@build = 8

class << self
attr_reader :major, :minor, :tiny, :build
Expand Down
8 changes: 5 additions & 3 deletions vendor/refinerycms/settings/app/models/refinery_setting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ def rewrite_cache
Rails.cache.delete(self.cache_key)

# generate new cache
result = self.to_cache(RefinerySetting.all)
result = (self.to_cache(self.all) if self.table_exists?)

# write cache
Rails.cache.write(self.cache_key, result)

# return cache
result
# return cache, or lack thereof.
result ||= []
end

def cache_key
Expand Down Expand Up @@ -108,6 +108,8 @@ def get(name, options = {})
alias :[] :get

def set(name, value)
return value unless self.table_exists?

scoping = (value[:scoping] if value.is_a?(Hash) and value.has_key?(:scoping))
setting = find_or_initialize_by_name_and_scoping(:name => name.to_s, :scoping => scoping)

Expand Down

0 comments on commit 33d6115

Please sign in to comment.