hammock 0.2.13 → 0.2.14
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/hammock.gemspec +2 -2
- data/lib/hammock/resource_retrieval.rb +7 -2
- data/lib/hammock.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/hammock.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{hammock}
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.14"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Ben Hoskings"]
|
9
|
-
s.date = %q{2009-04-
|
9
|
+
s.date = %q{2009-04-08}
|
10
10
|
s.description = %q{Hammock is a Rails plugin that eliminates redundant code in a very RESTful manner. It does this in lots in lots of different places, but in one manner: it encourages specification in place of implementation. Hammock enforces RESTful resource access by abstracting actions away from the controller in favour of a clean, model-like callback system. Hammock tackles the hard and soft sides of security at once with a scoping security system on your models. Specify who can verb what resources under what conditions once, and everything else - the actual security, link generation, index filtering - just happens. Hammock inspects your routes and resources to generate a routing tree for each resource. Parent resources in a nested route are handled transparently at every point - record retrieval, creation, and linking. It makes more sense when you see how it works though, so check out the screencast!}
|
11
11
|
s.email = ["ben@hoskings.net"]
|
12
12
|
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc", "misc/scaffold.txt"]
|
@@ -69,8 +69,13 @@ module Hammock
|
|
69
69
|
elsif :readonly == reason
|
70
70
|
escort_for_read_only
|
71
71
|
elsif :unauthed == reason
|
72
|
-
|
73
|
-
|
72
|
+
if current_user.nil? && request.get? && account_verb_scope?
|
73
|
+
# This request may be available after a login, and can be replayed
|
74
|
+
redirect_to returning_login_path
|
75
|
+
else
|
76
|
+
# TODO Write a 403 partial.
|
77
|
+
render_for_status 404
|
78
|
+
end
|
74
79
|
elsif current_user.nil? && account_verb_scope?
|
75
80
|
escort_for_login
|
76
81
|
else
|
data/lib/hammock.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Hoskings
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-08 00:00:00 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|