Permalink
Browse files

Initial skeleton.

  • Loading branch information...
cyx committed Oct 13, 2010
0 parents commit cb2e1f0a995e17c7b3946665482b460d01720fc5
Showing with 72 additions and 0 deletions.
  1. +7 −0 .rvmrc
  2. +19 −0 LICENSE
  3. 0 README.markdown
  4. +2 −0 lib/shield.rb
  5. +26 −0 shield.gemspec.erb
  6. +18 −0 test/helper.rb
  7. 0 test/shield_test.rb
7 .rvmrc
@@ -0,0 +1,7 @@
+
+if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
+ && -s "${rvm_path:-$HOME/.rvm}/environments/ruby-1.9.2-p0@shield" ]] ; then
+ \. "${rvm_path:-$HOME/.rvm}/environments/ruby-1.9.2-p0@shield"
+else
+ rvm --create "ruby-1.9.2-p0@shield"
+fi
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2009 Michel Martens, Damian Janowski and Cyril David
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
No changes.
@@ -0,0 +1,2 @@
+module Shield
+end
@@ -0,0 +1,26 @@
+<%- require "./lib/shield" -%>
+Gem::Specification.new do |s|
+ s.name = "shield"
+ s.version = "<%= shield::VERSION %>"
+ s.summary = %{Ohm specific authentication solution.}
+ s.description = %Q{
+ Gets you 80-90% of the way regarding your authentication
+ requirements. Provides convenience helper functions which you can
+ use with your favorite web framework of choice.
+ }
+ s.authors = ["Michel Martens", "Damian Janowski", "Cyril David"]
+ s.email = ["michel@soveran.com", "djanowski@dimaion.com",
+ "cyx@pipetodevnull.com"]
+ s.homepage = "http://github.com/cyx/shield"
+ s.files = <%= Dir[
+ "lib/**/*.rb",
+ "README*",
+ "LICENSE",
+ "Rakefile",
+ "test/**/*.rb"
+ ].inspect %>
+
+ s.rubyforge_project = "shield"
+ s.add_development_dependency "cutest", "~> 1.0"
+ s.add_development_dependency "sinatra", "~> 1.0"
+end
@@ -0,0 +1,18 @@
+require File.expand_path("../lib/shield", File.dirname(__FILE__))
+
+require "cutest"
+require "sinatra/base"
+require "rack/test"
+
+class Cutest::Scope
+ include Rack::Test::Methods
+
+ def assert_redirected_to(path)
+ assert 302 == last_response.status
+ assert path == last_response.headers["Location"]
+ end
+
+ def session
+ last_request.env["rack.session"]
+ end
+end
No changes.

0 comments on commit cb2e1f0

Please sign in to comment.