Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed merge

  • Loading branch information...
commit 33a96001536ff44aff5d624dbe65917bf31f0683 2 parents bdb6049 + 76dbf67
@delano authored
Showing with 54 additions and 43 deletions.
  1. +4 −0 CHANGES.txt
  2. +1 −1  VERSION.yml
  3. +40 −41 gibbler.gemspec
  4. +9 −1 lib/gibbler.rb
View
4 CHANGES.txt
@@ -1,11 +1,15 @@
GIBBLER, CHANGES
+
#### 0.9.0 (2012-04-20) ###############################
* CHANGE: Gibbler is now a class which supplies the default standalone usage
* CHANGE: Ruby object mixins must now be explicitly loaded via "require 'gibbler/mixins'"
* CHANGE: Removed Gibbler.enable_debug/disable_debug
+#### 0.8.10 (2011-10-23) ###############################
+
+* CHANGE: Gibbler::Hash and Gibbler::Array now skip values that have no __gibbler method
#### 0.8.9 (2011-02-11) ###############################
View
2  VERSION.yml
@@ -1,4 +1,4 @@
---
:MAJOR: 0
:MINOR: 8
-:PATCH: 9
+:PATCH: 10
View
81 gibbler.gemspec
@@ -1,59 +1,58 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
+# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
- s.name = %q{gibbler}
- s.version = "0.8.9"
+ s.name = "gibbler"
+ s.version = "0.8.10"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Delano Mandelbaum"]
- s.date = %q{2011-02-11}
- s.description = %q{Gibbler: Git-like hashes for Ruby objects}
- s.email = %q{delano@solutious.com}
+ s.date = "2011-10-23"
+ s.description = "Gibbler: Git-like hashes for Ruby objects"
+ s.email = "delano@solutious.com"
s.extra_rdoc_files = [
"LICENSE.txt",
- "README.rdoc"
+ "README.rdoc"
]
s.files = [
"CHANGES.txt",
- "LICENSE.txt",
- "README.rdoc",
- "Rakefile",
- "VERSION.yml",
- "gibbler.gemspec",
- "lib/gibbler.rb",
- "lib/gibbler/aliases.rb",
- "lib/gibbler/history.rb",
- "lib/gibbler/mixins.rb",
- "try/01_mixins_try.rb",
- "try/02_compat_try.rb",
- "try/05_gibbler_digest_try.rb",
- "try/10_basic_try.rb",
- "try/11_basic_sha256_try.rb",
- "try/14_extended_try.rb",
- "try/15_file_try.rb",
- "try/16_uri_try.rb",
- "try/17_complex_object_try.rb",
- "try/18_proc_try.rb",
- "try/20_time_try.rb",
- "try/30_secret_try.rb",
- "try/50_history_try.rb",
- "try/51_hash_history_try.rb",
- "try/52_array_history_try.rb",
- "try/53_string_history_try.rb",
- "try/57_arbitrary_history_try.rb",
- "try/59_history_exceptions_try.rb",
- "try/80_performance_try.rb",
- "try/90_alias_try.rb"
+ "LICENSE.txt",
+ "README.rdoc",
+ "Rakefile",
+ "VERSION.yml",
+ "gibbler.gemspec",
+ "lib/gibbler.rb",
+ "lib/gibbler/aliases.rb",
+ "lib/gibbler/history.rb",
+ "lib/gibbler/mixins.rb",
+ "try/01_mixins_try.rb",
+ "try/02_compat_try.rb",
+ "try/05_gibbler_digest_try.rb",
+ "try/10_basic_try.rb",
+ "try/11_basic_sha256_try.rb",
+ "try/14_extended_try.rb",
+ "try/15_file_try.rb",
+ "try/16_uri_try.rb",
+ "try/17_complex_object_try.rb",
+ "try/18_proc_try.rb",
+ "try/20_time_try.rb",
+ "try/30_secret_try.rb",
+ "try/50_history_try.rb",
+ "try/51_hash_history_try.rb",
+ "try/52_array_history_try.rb",
+ "try/53_string_history_try.rb",
+ "try/57_arbitrary_history_try.rb",
+ "try/59_history_exceptions_try.rb",
+ "try/80_performance_try.rb",
+ "try/90_alias_try.rb"
]
- s.homepage = %q{http://github.com/delano/gibbler}
- s.rdoc_options = ["--charset=UTF-8"]
+ s.homepage = "http://github.com/delano/gibbler"
s.require_paths = ["lib"]
- s.rubyforge_project = %q{gibbler}
- s.rubygems_version = %q{1.5.2}
- s.summary = %q{Gibbler: Git-like hashes for Ruby objects}
+ s.rubyforge_project = "gibbler"
+ s.rubygems_version = "1.8.10"
+ s.summary = "Gibbler: Git-like hashes for Ruby objects"
if s.respond_to? :specification_version then
s.specification_version = 3
View
10 lib/gibbler.rb
@@ -432,6 +432,10 @@ def __gibbler(digest_type=nil)
d = self.keys.sort { |a,b| a.inspect <=> b.inspect }
d.collect! do |name|
value = self[name]
+ unless value.respond_to? :__gibbler
+ gibbler_debug klass, :skipping, name
+ next
+ end
'%s:%s:%s' % [value.class, name, value.__gibbler(digest_type)]
end
d = d.join(':').__gibbler(digest_type)
@@ -470,7 +474,11 @@ def self.included(obj)
def __gibbler(digest_type=nil)
klass = self.class
d, index = [], 0
- self.each do |value|
+ self.each_with_index do |value,idx|
+ unless value.respond_to? :__gibbler
+ gibbler_debug klass, :skipping, idx
+ next
+ end
d << '%s:%s:%s' % [value.class, index, value.__gibbler(digest_type)]
index += 1
end
Please sign in to comment.
Something went wrong with that request. Please try again.