hammock 0.3.5 → 0.3.6

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 CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.3.6 2009-06-04
2
+ Call initialize_for_load after requiring components, so Hammock::Aliases is defined.
3
+ Replaced MixInto reference with more appropriate base reference in Hammock::ActiveRecord.included.
4
+ Added exception message to model const_get error message.
5
+
6
+
1
7
  == 0.3.5 2009-06-03
2
8
  Converted README back to rdoc, for rubyforge rake tasks.
3
9
 
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.3.5"
5
+ s.version = "0.3.6"
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-06-03}
9
+ s.date = %q{2009-06-04}
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.
11
11
 
12
12
 
@@ -20,12 +20,11 @@ It makes more sense when you see how it works though. There's a screencast comin
20
20
  s.email = ["ben@hoskings.net"]
21
21
  s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc", "misc/scaffold.txt"]
22
22
  s.files = ["History.txt", "LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "hammock.gemspec", "lib/hammock.rb", "lib/hammock/ajaxinate.rb", "lib/hammock/callback.rb", "lib/hammock/callbacks.rb", "lib/hammock/canned_scopes.rb", "lib/hammock/constants.rb", "lib/hammock/controller_attributes.rb", "lib/hammock/export_scope.rb", "lib/hammock/hamlink_to.rb", "lib/hammock/javascript_buffer.rb", "lib/hammock/logging.rb", "lib/hammock/model_attributes.rb", "lib/hammock/model_logging.rb", "lib/hammock/monkey_patches/action_pack.rb", "lib/hammock/monkey_patches/active_record.rb", "lib/hammock/monkey_patches/array.rb", "lib/hammock/monkey_patches/hash.rb", "lib/hammock/monkey_patches/logger.rb", "lib/hammock/monkey_patches/module.rb", "lib/hammock/monkey_patches/numeric.rb", "lib/hammock/monkey_patches/object.rb", "lib/hammock/monkey_patches/route_set.rb", "lib/hammock/monkey_patches/string.rb", "lib/hammock/overrides.rb", "lib/hammock/resource_mapping_hooks.rb", "lib/hammock/resource_retrieval.rb", "lib/hammock/restful_actions.rb", "lib/hammock/restful_rendering.rb", "lib/hammock/restful_support.rb", "lib/hammock/route_drawing_hooks.rb", "lib/hammock/route_for.rb", "lib/hammock/route_node.rb", "lib/hammock/route_step.rb", "lib/hammock/scope.rb", "lib/hammock/suggest.rb", "lib/hammock/utils.rb", "misc/scaffold.txt", "misc/template.rb", "tasks/hammock_tasks.rake", "test/hammock_test.rb"]
23
- s.has_rdoc = true
24
23
  s.homepage = %q{http://github.com/benhoskings/hammock}
25
24
  s.rdoc_options = ["--main", "README.rdoc"]
26
25
  s.require_paths = ["lib"]
27
26
  s.rubyforge_project = %q{hammock}
28
- s.rubygems_version = %q{1.3.2}
27
+ s.rubygems_version = %q{1.3.4}
29
28
  s.summary = %q{Hammock is a Rails plugin that eliminates redundant code in a very RESTful manner}
30
29
 
31
30
  if s.respond_to? :specification_version then
@@ -7,7 +7,7 @@ module Hammock
7
7
  base.send :extend, ClassMethods # TODO maybe include in the metaclass instead of extending the class?
8
8
 
9
9
  %w[before_undestroy after_undestroy].each {|callback_name|
10
- MixInto.define_callbacks callback_name
10
+ base.define_callbacks callback_name
11
11
  # base.send :define_method, callback_name, lambda { }
12
12
  }
13
13
  base.class_eval {
@@ -19,7 +19,7 @@ module Hammock
19
19
  def mdl
20
20
  @hammock_cached_mdl ||= Object.const_get to_s.sub('Controller', '').classify
21
21
  rescue
22
- log "No such model '#{to_s.sub('Controller', '').classify}'."
22
+ log "Error loading '#{to_s.sub('Controller', '').classify}': #{$!}."
23
23
  nil
24
24
  end
25
25
  # The lowercase name of the model this controller operates on. For example, for +GelatinousBlobsController+, this will return "gelatinous_blob".
data/lib/hammock.rb CHANGED
@@ -4,11 +4,10 @@ require 'ambition'
4
4
  require 'ambition/adapters/active_record'
5
5
 
6
6
  module Hammock
7
- VERSION = '0.3.5'
7
+ VERSION = '0.3.6'
8
8
 
9
9
  def self.included base # :nodoc:
10
10
  puts "Loading Hammock from #{loaded_from_gem? ? 'gem' : 'plugin'}"
11
- initialize_for_load
12
11
  load_hammock_components base
13
12
  end
14
13
 
@@ -39,6 +38,7 @@ module Hammock
39
38
 
40
39
  def self.load_hammock_components base
41
40
  require_hammock_components
41
+ initialize_for_load
42
42
  mixin_hammock_components base
43
43
  end
44
44
 
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.3.5
4
+ version: 0.3.6
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-06-03 00:00:00 +10:00
12
+ date: 2009-06-04 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  requirements: []
147
147
 
148
148
  rubyforge_project: hammock
149
- rubygems_version: 1.3.2
149
+ rubygems_version: 1.3.4
150
150
  signing_key:
151
151
  specification_version: 3
152
152
  summary: Hammock is a Rails plugin that eliminates redundant code in a very RESTful manner