parasquid/namecheap — pull request #9 by phillipp (2014-03-13 23:04:32+00:00)
Title: Gem compatibility with Rails

I fixed the issues of #8 with Rails but it got out of hand and i started some refactorings...

Most of the config stuff was just overkill and I like it a lot better when a library is small and compact and not filled with clutter.

The most important and only external visible change to the config is that the `reset` method and the defaults are gone. Instead, the library raises an error and says what is missing:

**EXAMPLE:**

```
Failures:

1) Namecheap::Ssl should not raise an error
Failure/Error: Namecheap.ssl.get_list
Namecheap::Config::RequiredOptionMissing:
Configuration parameter missing: username, please add it to the Namecheap.configure block
# ./lib/namecheap/api.rb:49:in `block in init_args'
# ./lib/namecheap/api.rb:47:in `each'
# ./lib/namecheap/api.rb:47:in `init_args'
# ./lib/namecheap/api.rb:29:in `request'
# ./lib/namecheap/api.rb:12:in `get'
# ./lib/namecheap/ssl.rb:34:in `get_list'
# ./spec/namecheap/ssl_spec.rb:14:in `block (2 levels) in '
```

I hope you like that, but I'm more than happy to discuss the changes.
I also updated the specs and they are all running.