lawrencewoodman / mida

A Microdata parser/extractor library for Ruby
http://lawrencewoodman.github.io/mida
Other
77 stars 18 forks source link

require 'mida' fails under Ruby 2.0.0-p0 #8

Closed jronallo closed 11 years ago

jronallo commented 11 years ago

$ gem list mida

* LOCAL GEMS *

mida (0.3.3) $ ruby -v ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux] $ irb irb(main):001:0> require 'mida' NameError: uninitialized constant Mida::SchemaOrg::CreativeWork

edgurgel commented 11 years ago

The problem is on the way that require is done on lib/mida/vocabularies/schemaorg.rb

Dir.glob(File.dirname(__FILE__) + '/schemaorg/*.rb') {|file| require file}

Doing the following hack makes it work on ruby 2.0.0-p0

Dir.glob(File.dirname(__FILE__) + '/schemaorg/*.rb').reverse {|file| require file}
lawrencewoodman commented 11 years ago

Fixed with release v0.3.4