gibbler 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.txt CHANGED
@@ -1,6 +1,10 @@
1
1
  GIBBLER, CHANGES
2
2
 
3
3
 
4
+ #### 0.7.3 (2010-01-15) #################################
5
+
6
+ * ADDED: Support for base36 representations of digests
7
+
4
8
  #### 0.7.2 (2009-12-08) #################################
5
9
 
6
10
  * FIXED: Gibbler::Complex no longer includes the '@' for instance
data/README.rdoc CHANGED
@@ -33,7 +33,11 @@ Check out the screencast[http://www.rubypulse.com/episode-0.3-gibbler.html] crea
33
33
 
34
34
  config.gibbler.short # => 4c558a56
35
35
 
36
-
36
+ config.gibbler.base36 # => 8x00l83jov4j80i9vfzpaxr9jag23wf
37
+
38
+ config.gibbler.base36.short # => 8x00l83j
39
+
40
+
37
41
  == Example 2 -- Object History
38
42
 
39
43
  Gibbler can also keep track of the history of changes to an object. By default Gibbler supports history for Hash, Array, and String objects. The <tt>gibbler_commit</tt> method creates a clone of the current object and stores in an instance variable using the current hash digest as the key.
data/gibbler.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  @spec = Gem::Specification.new do |s|
2
2
  s.name = "gibbler"
3
3
  s.rubyforge_project = "gibbler"
4
- s.version = "0.7.2"
4
+ s.version = "0.7.3"
5
5
  s.summary = "Gibbler: Git-like hashes for Ruby objects"
6
6
  s.description = s.summary
7
7
  s.author = "Delano Mandelbaum"
data/lib/gibbler.rb CHANGED
@@ -15,7 +15,7 @@ require 'digest/sha1'
15
15
  # "Hola, Tanneritos"
16
16
  #
17
17
  module Gibbler
18
- VERSION = "0.7.2"
18
+ VERSION = "0.7.3"
19
19
 
20
20
  require 'gibbler/mixins'
21
21
 
@@ -33,6 +33,10 @@ end
33
33
  #
34
34
  class Gibbler::Digest < String
35
35
 
36
+ def base36
37
+ self.class.new self.to_i(16).to_s(36)
38
+ end
39
+
36
40
  # Returns the first 8 characters of itself (the digest).
37
41
  #
38
42
  # e.g.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gibbler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-09 00:00:00 -05:00
12
+ date: 2010-01-15 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency