morph 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG +2 -0
  2. data/lib/morph.rb +2 -2
  3. data/morph.gemspec +2 -2
  4. metadata +2 -2
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.2.5. camelize names for classes in from_hash()
2
+
1
3
  v0.2.4. from_hash() creates classes in Morph namespace and handles arrays of hashes
2
4
 
3
5
  v0.2.3. added Morph.from_hash method
data/lib/morph.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'activesupport'
2
2
 
3
3
  module Morph
4
- VERSION = "0.2.4"
4
+ VERSION = "0.2.5"
5
5
 
6
6
  def self.from_hash hash, namespace=Morph
7
7
  if hash.keys.size == 1
@@ -26,7 +26,7 @@ module Morph
26
26
  private
27
27
  def self.object_from_key key, namespace
28
28
  begin
29
- name = key.to_s
29
+ name = key.to_s.camelize
30
30
  type = "#{namespace.name}::#{name}".constantize
31
31
  rescue NameError => e
32
32
  namespace.const_set name, Class.new
data/morph.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{morph}
5
- s.version = "0.2.4"
5
+ s.version = "0.2.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Rob McKinnon"]
9
- s.date = %q{2009-03-14}
9
+ s.date = %q{2009-03-16}
10
10
  s.description = %q{Morph allows you to emerge class definitions via calling assignment methods; mix with Hpricot for screen scrapping fun.}
11
11
  s.email = ["rob ~@nospam@~ rubyforge.org"]
12
12
  s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob McKinnon
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-14 00:00:00 +00:00
12
+ date: 2009-03-16 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency