storable 0.5.5 → 0.5.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/CHANGES.txt CHANGED
@@ -1,6 +1,10 @@
1
1
  STORABLE, CHANGES
2
2
 
3
3
 
4
+ #### 0.5.6 (2009-07-19) #############################
5
+
6
+ * ADDED: has_field?
7
+
4
8
  #### 0.5.5 (2009-07-17) #############################
5
9
 
6
10
  * FIXED: require 'time' for Time.parse.
data/README.rdoc CHANGED
@@ -43,6 +43,11 @@ or via download:
43
43
  * Ruby 1.8, Ruby 1.9, or JRuby 1.2
44
44
 
45
45
 
46
+ == Thanks
47
+
48
+ * Pierre Riteau (priteau[http://github.com/priteau]) for bug fixes.
49
+
50
+
46
51
  == Credits
47
52
 
48
53
  * Delano Mandelbaum (delano@solutious.com)
data/lib/storable.rb CHANGED
@@ -23,7 +23,7 @@ require 'time'
23
23
  class Storable
24
24
  require 'storable/orderedhash' if USE_ORDERED_HASH
25
25
  unless defined?(SUPPORTED_FORMATS) # We can assume all are defined
26
- VERSION = "0.5.5"
26
+ VERSION = "0.5.6"
27
27
  NICE_TIME_FORMAT = "%Y-%m-%d@%H:%M:%S".freeze
28
28
  SUPPORTED_FORMATS = [:tsv, :csv, :yaml, :json, :s, :string].freeze
29
29
  end
@@ -73,6 +73,13 @@ class Storable
73
73
  end
74
74
  end
75
75
 
76
+ def self.has_field?(n)
77
+ field_names.member? n.to_sym
78
+ end
79
+ def has_field?(n)
80
+ self.class.field_names.member? n.to_sym
81
+ end
82
+
76
83
  # Returns an array of field names defined by self.field
77
84
  def self.field_names
78
85
  class_variable_get(:@@field_names)
data/storable.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  @spec = Gem::Specification.new do |s|
2
2
  s.name = "storable"
3
3
  s.rubyforge_project = "storable"
4
- s.version = "0.5.5"
4
+ s.version = "0.5.6"
5
5
  s.summary = "Storable: Marshal Ruby classes into and out of multiple formats (yaml, json, csv, tsv)"
6
6
  s.description = s.summary
7
7
  s.author = "Delano Mandelbaum"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: storable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
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-07-17 00:00:00 -04:00
12
+ date: 2009-07-19 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15