Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Custom gemfile + removed jeweler + minor fixes
- Loading branch information
Showing
8 changed files
with
68 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,11 @@ | ||
## MAC OS | ||
.DS_Store | ||
|
||
## TEXTMATE | ||
*.tmproj | ||
tmtags | ||
|
||
## EMACS | ||
*~ | ||
\#* | ||
.\#* | ||
|
||
## VIM | ||
*.swp | ||
|
||
## PROJECT::GENERAL | ||
coverage | ||
rdoc | ||
pkg | ||
|
||
## PROJECT::SPECIFIC | ||
*.rdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
== Version 0.1.4 (Unreleased) | ||
== Version 0.1.4 | ||
|
||
* Added MongoDB store | ||
* Cleaner and more understandable specs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,71 @@ | ||
require 'rubygems' | ||
require 'rake' | ||
|
||
begin | ||
require 'jeweler' | ||
Jeweler::Tasks.new do |gem| | ||
gem.name = "aclatraz" | ||
gem.email = "kriss.kowalik@gmail.com" | ||
gem.homepage = "http://github.com/nu7hatch/aclatraz" | ||
gem.authors = ["Kriss 'nu7hatch' Kowalik"] | ||
gem.summary = %Q{Flexible access control mechanism!} | ||
gem.description = <<-DESCR | ||
Extremaly fast, flexible and intuitive access control mechanism, powered | ||
by fast key value stores like Redis. | ||
DESCR | ||
gem.add_dependency "dictionary", "~> 1.0" | ||
gem.add_development_dependency "rspec", "~> 2.0" | ||
gem.add_development_dependency "mocha", "~> 0.9" | ||
gem.add_development_dependency "redis", "~> 2.0" | ||
gem.add_development_dependency "riak-client", "~> 0.8" | ||
gem.add_development_dependency "cassandra", "~> 0.8" | ||
gem.add_development_dependency "mongo", "~> 1.0" | ||
end | ||
Jeweler::GemcutterTasks.new | ||
rescue LoadError | ||
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler" | ||
end | ||
|
||
# -*- ruby -*- | ||
$:.unshift(File.expand_path('../lib', __FILE__)) | ||
require 'aclatraz/version' | ||
require 'rspec/core/rake_task' | ||
require 'rake/rdoctask' | ||
|
||
RSpec::Core::RakeTask.new(:spec) do |t| | ||
t.pattern = 'spec/**/*_spec.rb' | ||
t.rspec_opts = %q[--colour --backtrace] | ||
t.rspec_opts = %q[-c -b] | ||
end | ||
|
||
RSpec::Core::RakeTask.new(:rcov) do |t| | ||
t.rcov = true | ||
t.rspec_opts = %q[--colour --backtrace] | ||
t.rcov_opts = %q[--exclude "spec" --text-report] | ||
t.rspec_opts = %q[-c -b] | ||
t.rcov_opts = %q[-T -x "spec"] | ||
end | ||
|
||
task :spec => :check_dependencies | ||
task :default => :spec | ||
|
||
require 'rake/rdoctask' | ||
Rake::RDocTask.new do |rdoc| | ||
version = File.exist?('VERSION') ? File.read('VERSION') : "" | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = "ACLatraz #{version}" | ||
rdoc.title = "ACLatraz #{Aclatraz.version}" | ||
rdoc.rdoc_files.include('README*') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end | ||
|
||
task :default => :spec | ||
|
||
desc "Build current version as a rubygem" | ||
task :build do | ||
`gem build aclatraz.gemspec` | ||
`mv aclatraz-*.gem pkg/` | ||
end | ||
|
||
desc "Relase current version to rubygems.org" | ||
task :release => :build do | ||
`git tag -am "Version bump to #{Aclatraz.version}" v#{Aclatraz.version}` | ||
`git push origin master` | ||
`git push origin master --tags` | ||
`gem push pkg/aclatraz-#{Aclatraz.version}.gem` | ||
end | ||
|
||
namespace :benchmark do | ||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib')) | ||
require 'aclatraz' | ||
require 'benchmark' | ||
require "aclatraz" | ||
|
||
benchmarks = File.expand_path("../spec/alcatraz_bm.rb", __FILE__) | ||
|
||
desc "Redis store benchmarks" | ||
task :redis do | ||
Aclatraz.init(:redis) | ||
require File.dirname(__FILE__)+"/spec/alcatraz_bm" | ||
load benchmarks | ||
end | ||
|
||
desc "Cassandra store benchmarks" | ||
task :cassandra do | ||
Aclatraz.init(:cassandra, "Super1", "Keyspace1") | ||
require File.dirname(__FILE__)+"/spec/alcatraz_bm" | ||
load benchmarks | ||
end | ||
|
||
desc "Riak store benchmarks" | ||
task :riak do | ||
Aclatraz.init(:riak, "roles") | ||
require File.dirname(__FILE__)+"/spec/alcatraz_bm" | ||
load benchmarks | ||
end | ||
|
||
desc "MongoDB store benchmarks" | ||
task :mongo do | ||
require 'mongo' | ||
Aclatraz.init(:mongo, "roles", Mongo::Connection.new.db("aclatraz_test")) | ||
require File.dirname(__FILE__)+"/spec/alcatraz_bm" | ||
load benchmarks | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,24 @@ | ||
# Generated by jeweler | ||
# DO NOT EDIT THIS FILE DIRECTLY | ||
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command | ||
# -*- encoding: utf-8 -*- | ||
# -*- ruby -*- | ||
$:.unshift(File.expand_path('../lib', __FILE__)) | ||
require 'aclatraz/version' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = %q{aclatraz} | ||
s.version = "0.1.3" | ||
s.name = 'aclatraz' | ||
s.version = Aclatraz.version | ||
s.homepage = 'http://github.com/nu7hatch/aclatraz' | ||
s.email = ['chris@nu7hat.ch'] | ||
s.authors = ['Chris Kowalik'] | ||
s.summary = %q{Flexible access control mechanism!} | ||
s.description = %q{Extremaly fast, flexible and intuitive access control mechanism, powered by fast key value stores like Redis.} | ||
s.files = `git ls-files`.split("\n") | ||
s.test_files = `git ls-files -- {spec}/*`.split("\n") | ||
s.require_paths = %w[lib] | ||
s.extra_rdoc_files = %w[LICENSE README.rdoc CHANGELOG.rdoc TODO.rdoc] | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.authors = ["Kriss 'nu7hatch' Kowalik"] | ||
s.date = %q{2010-10-16} | ||
s.description = %q{ Extremaly fast, flexible and intuitive access control mechanism, | ||
powered by fast key value stores like Redis. | ||
} | ||
s.email = %q{kriss.kowalik@gmail.com} | ||
s.extra_rdoc_files = [ | ||
"LICENSE", | ||
"README.rdoc" | ||
] | ||
s.files = [ | ||
".document", | ||
".gitignore", | ||
"CHANGELOG.rdoc", | ||
"LICENSE", | ||
"README.rdoc", | ||
"Rakefile", | ||
"TODO.rdoc", | ||
"VERSION", | ||
"aclatraz.gemspec", | ||
"examples/dinner.rb", | ||
"lib/aclatraz.rb", | ||
"lib/aclatraz/acl.rb", | ||
"lib/aclatraz/guard.rb", | ||
"lib/aclatraz/helpers.rb", | ||
"lib/aclatraz/store.rb", | ||
"lib/aclatraz/store/cassandra.rb", | ||
"lib/aclatraz/store/redis.rb", | ||
"lib/aclatraz/store/riak.rb", | ||
"lib/aclatraz/suspect.rb", | ||
"spec/aclatraz/acl_spec.rb", | ||
"spec/aclatraz/guard_spec.rb", | ||
"spec/aclatraz/helpers_spec.rb", | ||
"spec/aclatraz/stores_spec.rb", | ||
"spec/aclatraz/suspect_spec.rb", | ||
"spec/aclatraz_spec.rb", | ||
"spec/alcatraz_bm.rb", | ||
"spec/spec_helper.rb" | ||
] | ||
s.homepage = %q{http://github.com/nu7hatch/aclatraz} | ||
s.rdoc_options = ["--charset=UTF-8"] | ||
s.require_paths = ["lib"] | ||
s.rubygems_version = %q{1.3.7} | ||
s.summary = %q{Flexible access control that doesn't sucks!} | ||
s.test_files = [ | ||
"spec/alcatraz_bm.rb", | ||
"spec/spec_helper.rb", | ||
"spec/aclatraz/guard_spec.rb", | ||
"spec/aclatraz/helpers_spec.rb", | ||
"spec/aclatraz/acl_spec.rb", | ||
"spec/aclatraz/stores_spec.rb", | ||
"spec/aclatraz/suspect_spec.rb", | ||
"spec/aclatraz_spec.rb", | ||
"examples/dinner.rb" | ||
] | ||
|
||
if s.respond_to? :specification_version then | ||
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION | ||
s.specification_version = 3 | ||
|
||
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then | ||
s.add_runtime_dependency(%q<dictionary>, ["~> 1.0"]) | ||
s.add_development_dependency(%q<rspec>, ["~> 2.0"]) | ||
s.add_development_dependency(%q<mocha>, ["~> 0.9"]) | ||
s.add_development_dependency(%q<redis>, ["~> 2.0"]) | ||
s.add_development_dependency(%q<riak-client>, ["~> 0.8"]) | ||
s.add_development_dependency(%q<cassandra>, ["~> 0.8"]) | ||
else | ||
s.add_dependency(%q<dictionary>, ["~> 1.0"]) | ||
s.add_dependency(%q<rspec>, ["~> 2.0"]) | ||
s.add_dependency(%q<mocha>, ["~> 0.9"]) | ||
s.add_dependency(%q<redis>, ["~> 2.0"]) | ||
s.add_dependency(%q<riak-client>, ["~> 0.8"]) | ||
s.add_dependency(%q<cassandra>, ["~> 0.8"]) | ||
end | ||
else | ||
s.add_dependency(%q<dictionary>, ["~> 1.0"]) | ||
s.add_dependency(%q<rspec>, ["~> 2.0"]) | ||
s.add_dependency(%q<mocha>, ["~> 0.9"]) | ||
s.add_dependency(%q<redis>, ["~> 2.0"]) | ||
s.add_dependency(%q<riak-client>, ["~> 0.8"]) | ||
s.add_dependency(%q<cassandra>, ["~> 0.8"]) | ||
end | ||
s.add_runtime_dependency 'dictionary', ['~> 1.0'] | ||
s.add_development_dependency 'rspec', ["~> 2.0"] | ||
s.add_development_dependency 'mocha', [">= 0.9"] | ||
s.add_development_dependency 'redis', [">= 2.0"] | ||
s.add_development_dependency 'riak-client', [">= 0.8"] | ||
s.add_development_dependency 'cassandra', [">= 0.8"] | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ def account | |
def test | ||
guard!(:foo, :bar) | ||
rescue | ||
end | ||
end | ||
end | ||
|
||
$foo = Foo.new | ||
|