hammock 0.2.18 → 0.2.19

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.2.19 2009-04-23
2
+ Always hide the spinner on response, and don't show success if only a :pending spinner was specified.
3
+ Only look for .statuses within the immediate parent, instead of the first parent matching .{record.base_model}.
4
+
5
+
1
6
  == 0.2.18 2009-04-21
2
7
  Fixed grey escape code offset in String::Colorizer.
3
8
 
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.18"
5
+ s.version = "0.2.19"
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-21}
9
+ s.date = %q{2009-04-23}
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
 
data/lib/hammock.rb CHANGED
@@ -4,7 +4,7 @@ require 'ambition'
4
4
  require 'ambition/adapters/active_record'
5
5
 
6
6
  module Hammock
7
- VERSION = '0.2.18'
7
+ VERSION = '0.2.19'
8
8
 
9
9
  def self.included base # :nodoc:
10
10
  puts "Loading Hammock from #{loaded_from_gem? ? 'gem' : 'plugin'}"
@@ -60,7 +60,7 @@ module Hammock
60
60
  var obj = null;
61
61
 
62
62
  if (#{opts[:spinner] ? 'true' : 'false'}) {
63
- obj = jQuery(this).parents('.#{record.base_model}:first').find('.statuses');
63
+ obj = jQuery(this).parent().find('.statuses');
64
64
  obj.find('.spinner').animate({opacity: 'show'}, 100);
65
65
  }
66
66
 
@@ -79,12 +79,8 @@ module Hammock
79
79
  ),
80
80
  function(response, textStatus) {
81
81
  #{response_action}
82
- if ('success' == textStatus) {
83
- if (obj) {
84
- obj.children('.spinner').hide()
85
- .siblings('.success').show().fadeOut(4000);
86
- }
87
- }
82
+ if (obj) obj.children('.spinner').hide();
83
+ #{"if ('success' == textStatus) obj.siblings('.success').show().fadeOut(4000);" if opts[:spinner] != :pending}
88
84
  eval("#{clean_snippet opts[:after]}");
89
85
  }
90
86
  );
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.18
4
+ version: 0.2.19
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-21 00:00:00 +10:00
12
+ date: 2009-04-23 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency