soulcutter / saxerator

A SAX-based XML parser for parsing large files into manageable chunks
MIT License
128 stars 19 forks source link

Can't specify adapter in config block #47

Closed activestylus closed 7 years ago

activestylus commented 7 years ago

Trying the following:

Saxerator.parser("<title>Hello</title>") do |config|
  config.adapter = :ox
  config.output_type = :hash
end

I get hit with:

NoMethodError: undefined method `adapter=' for #<Saxerator::Configuration:0x007f8004c236f8>
  from (irb):5:in `block in irb_binding'
  from /Users/home/.rvm/gems/ruby-2.3.1/gems/saxerator-0.9.5/lib/saxerator.rb:32:in `parser'
  from (irb):5
  from /Users/home/.rvm/gems/ruby-2.3.1/gems/railties-5.0.0/lib/rails/commands/console.rb:65:in `start'
  from /Users/home/.rvm/gems/ruby-2.3.1/gems/railties-5.0.0/lib/rails/commands/console_helper.rb:9:in `start'
  from /Users/home/.rvm/gems/ruby-2.3.1/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:78:in `console'
  from /Users/home/.rvm/gems/ruby-2.3.1/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
  from /Users/home/.rvm/gems/ruby-2.3.1/gems/railties-5.0.0/lib/rails/commands.rb:18:in `<top (required)>'
  from bin/rails:4:in `require'
  from bin/rails:4:in `<main>'

Am I missing something or is this a bug?

fanantoxa commented 7 years ago

@activestylus Sorry but master not released yes. Please take a look doc for last gem version: https://github.com/soulcutter/saxerator/tree/v0.9.5 Or try to use last master.

activestylus commented 7 years ago

Got it. Pulling the gem from master works a treat. Cheers!