benhoskings-hammock 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -2
- data/hammock.gemspec +2 -2
- data/lib/hammock.rb +1 -1
- data/lib/hammock/restful_support.rb +2 -2
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
== 0.2.9 2009-03-13
|
2
|
+
Updated partial_exists? to default format to the current request format instead of html, and accept format instead of extension as a parameter.
|
3
|
+
|
4
|
+
|
1
5
|
== 0.2.8 2009-03-10
|
2
6
|
Renamed @current_account to current_user.
|
3
7
|
Removed AC::Base#nestable_by declaration in favour of the new approach involving AC::Base#route_by and #nest_within, along with the corresponding reader.
|
@@ -6,12 +10,10 @@ Revert "Removed unneeded param to specify the finder method in retrieve_record."
|
|
6
10
|
|
7
11
|
|
8
12
|
== 0.2.7 2009-03-05
|
9
|
-
|
10
13
|
hamlink_to with implied verbs no longer raises in route_for.
|
11
14
|
|
12
15
|
|
13
16
|
== 0.2.6 2009-03-05
|
14
|
-
|
15
17
|
Access current_nested_records in nested_route_for through the method instead of directly.
|
16
18
|
Replaced #assign_nestable_resources with #assign_nesting_entities, to separately kick and assign an ivar for each of the current rou
|
17
19
|
Added nesting_scope_list to encapsulate what @hammock_nesting_scopes was set to before.
|
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.9"
|
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-03-
|
9
|
+
s.date = %q{2009-03-13}
|
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"]
|
data/lib/hammock.rb
CHANGED
@@ -8,7 +8,7 @@ Dir.glob("#{File.dirname __FILE__}/hammock/**/*.rb").each {|dep|
|
|
8
8
|
} if defined?(RAILS_ROOT) # Loading Hammock components under 'rake package' fails.
|
9
9
|
|
10
10
|
module Hammock
|
11
|
-
VERSION = '0.2.
|
11
|
+
VERSION = '0.2.9'
|
12
12
|
|
13
13
|
def self.included base # :nodoc:
|
14
14
|
Hammock.constants.map {|constant_name|
|
@@ -150,13 +150,13 @@ module Hammock
|
|
150
150
|
end
|
151
151
|
end
|
152
152
|
|
153
|
-
def partial_exists? name,
|
153
|
+
def partial_exists? name, format = nil
|
154
154
|
partial_name, ctrler_name = name.split('/', 2).reverse
|
155
155
|
!Dir.glob(File.join(
|
156
156
|
RAILS_ROOT,
|
157
157
|
'app/views',
|
158
158
|
ctrler_name || '',
|
159
|
-
"_#{partial_name}
|
159
|
+
"_#{partial_name}.#{format || request.format.to_sym.to_s}.*"
|
160
160
|
)).empty?
|
161
161
|
end
|
162
162
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benhoskings-hammock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
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-03-
|
12
|
+
date: 2009-03-13 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|