Permalink
Browse files

Stasis.register doesn't blow up if no Stasis instances, prerelease

  • Loading branch information...
1 parent 36d659b commit 17861b1e10e55b0489d76071e4a3872937424df8 @winton committed Jul 9, 2012
Showing with 5 additions and 3 deletions.
  1. +4 −2 lib/stasis.rb
  2. +1 −1 stasis.gemspec
View
@@ -296,8 +296,10 @@ def add_plugin(plugin)
# Add a plugin to all existing controller instances. This method should be called by
# all external plugins.
def self.register(plugin)
- @instances.each do |stasis|
- stasis.add_plugin(plugin)
+ if @instances
+ @instances.each do |stasis|
+ stasis.add_plugin(plugin)
+ end
end
end
View
@@ -6,7 +6,7 @@ $:.unshift lib unless $:.include?(lib)
Gem::Specification.new do |s|
s.name = "stasis"
- s.version = '0.1.23'
+ s.version = '0.2.0.pre'
s.platform = Gem::Platform::RUBY
s.authors = [ 'Winton Welsh' ]
s.email = [ 'mail@wintoni.us' ]

0 comments on commit 17861b1

Please sign in to comment.