Skip to content

Commit

Permalink
fix for failing spec
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorzkazulak committed Jun 29, 2010
1 parent 4e08d76 commit 415ffe0
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 9 deletions.
22 changes: 22 additions & 0 deletions Rakefile
@@ -1,6 +1,28 @@
require 'rake'
require 'spec/rake/spectask'
adapters = Dir[File.dirname(__FILE__) + '/lib/grizzly/adapter/*.rb'].map{|file| File.basename(file, '.rb') }

task :spec do
adapters.map{|adapter| "spec:#{adapter}"}.each do |spec|
Rake::Task[spec].invoke
end
end

namespace :spec do
adapters.each do |adapter|
Spec::Rake::SpecTask.new(adapter) do |spec|
spec.spec_files = FileList['spec/*_spec.rb']
end
end
end

Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end

task :default => :spec

begin
gem 'jeweler', '~> 1.4'
Expand Down
16 changes: 16 additions & 0 deletions grizzly.gemspec
Expand Up @@ -12,12 +12,28 @@ Gem::Specification.new do |s|
s.date = %q{2010-06-29}
s.description = %q{Control access like a Bear}
s.email = %q{grzegorz.kazulak@gmail.com}
s.files = [
".gitignore",
"Gemfile",
"Rakefile",
"VERSION",
"grizzly.gemspec",
"lib/grizzly.rb",
"lib/grizzly/configuration.rb",
"lib/grizzly/logger.rb",
"spec/configuration_spec.rb",
"spec/spec_helper.rb"
]
s.homepage = %q{http://github.com/grzegorzkazulak/grizzly/grizzly}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubyforge_project = %q{grizzly}
s.rubygems_version = %q{1.3.7}
s.summary = %q{ACL for Rails 3}
s.test_files = [
"spec/configuration_spec.rb",
"spec/spec_helper.rb"
]

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
Expand Down
21 changes: 12 additions & 9 deletions lib/grizzly.rb
Expand Up @@ -4,14 +4,17 @@
module Grizzly
class << self
attr_writer :configuration

def self.logger
@logger || Grizzly.configuration.logger
end

def self.configuration
@configuration ||= Configuration.new
end

end

def self.logger
@logger || Grizzly.configuration.logger
end

def self.configuration
@configuration ||= Configuration.new
end

def self.configure
yield(self.configuration)
end
end

0 comments on commit 415ffe0

Please sign in to comment.