Giter Club home page Giter Club logo

dnsimple-ruby's People

Contributors

3flex avatar aeden avatar ags4no avatar alkema avatar benjaminkeeping avatar dependabot-preview[bot] avatar dependabot[bot] avatar depfu[bot] avatar dje avatar duduribeiro avatar dwradcliffe avatar dxtimer avatar ecomba avatar ggalmazor avatar gogainda avatar iseem avatar jacegu avatar jackbot avatar jcaudle avatar jerrycattell avatar jodosha avatar johnbintz avatar kntsoriano avatar martinisoft avatar olemchls avatar pat avatar roidrage avatar san983 avatar sbastn avatar weppos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dnsimple-ruby's Issues

background workers randomly raising exceptions

We have a sidekiq worker that is getting randomly DNSimple::AuthenticationFailed. We are setting credentials for DNSimple::Client before each request, so we don't know why this is happening. Any thoughts?

dnsimple extended-attributes:list failing

In both ruby 1.8.7 and 1.9.2 I get the following:

dnsimple extended-attributes:list drnicwilliams.com
/Users/drnic/.rvm/gems/ruby-1.9.2-p180/gems/httparty-0.7.4/lib/httparty/response.rb:76:in `method_missing': undefined method `map' for # (NoMethodError)
    from /Users/drnic/.rvm/gems/ruby-1.9.2-p180/gems/dnsimple-ruby-0.9.7/lib/dnsimple/extended_attribute.rb:65:in `find'
    from /Users/drnic/.rvm/gems/ruby-1.9.2-p180/gems/dnsimple-ruby-0.9.7/lib/dnsimple/commands/list_extended_attributes.rb:6:in `execute'
    from /Users/drnic/.rvm/gems/ruby-1.9.2-p180/gems/dnsimple-ruby-0.9.7/lib/dnsimple/cli.rb:15:in `execute'
    from /Users/drnic/.rvm/gems/ruby-1.9.2-p180/gems/dnsimple-ruby-0.9.7/bin/dnsimple.rb:143:in `'
    from /Users/drnic/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
    from /Users/drnic/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
    from /Users/drnic/.rvm/gems/ruby-1.9.2-p180/gems/dnsimple-ruby-0.9.7/bin/dnsimple:4:in `'
    from /Users/drnic/.rvm/gems/ruby-1.9.2-p180/bin/dnsimple:19:in `load'
    from /Users/drnic/.rvm/gems/ruby-1.9.2-p180/bin/dnsimple:19:in `'

Cannot run specs

The spec/README says I only need to create a ~/.dnsimple.localhost file but I'm guessing I'm supposed to also have some server-side code available/running so I can run the specs?

# spec/README
Before running the DNSimple Ruby Client specifications, you must create a file in your home directory called .dnsimple.localhost and include the following:

username: YOUR_USERNAME
password: YOUR_PASSWORD

I'm not sure what the best solution is, but one example is that the engineyard gem includes a fake serverside rack client for its tests (https://github.com/engineyard/engineyard/tree/master/spec).

When I write CLI wrappers, I reuse that stub serverside API for my integration tests.

If you had one, I'd use it too for my ey-dnsimple CLI.

I think you're talking about API design at NordicRuby - it'd be awesome to hear your thoughts on making fake/test APIs available for integration testing of 3rd party clients.

Version 0.50.0 of rubocop alerts for offenses

.rubocop_dnsimple.yml: Style/PredicateName has the wrong namespace - should be Naming
Inspecting 98 files
.W..........................C....................W.W.....W........................................

Offenses:

Rakefile:27:19: W: Avoid rescuing without specifying an error class.
    rm_r "yardoc" rescue nil
                  ^^^^^^
lib/dnsimple/client.rb:64:25: C: Use each_key instead of keys.each.
      Dnsimple::Default.keys.each do |key|
                        ^^^^^^^^^
lib/dnsimple/struct/extended_attribute.rb:34:7: W: Method Dnsimple::Struct::ExtendedAttribute#options= is defined at both lib/dnsimple/struct/extended_attribute.rb:27 and lib/dnsimple/struct/extended_attribute.rb:34.
      def options=(opts)
      ^^^
lib/dnsimple/struct/service.rb:55:7: W: Method Dnsimple::Struct::Service#settings= is defined at both lib/dnsimple/struct/service.rb:48 and lib/dnsimple/struct/service.rb:55.
      def settings=(settings)
      ^^^
lib/dnsimple/struct/whoami.rb:16:7: W: Method Dnsimple::Struct::Whoami#account= is defined at both lib/dnsimple/struct/whoami.rb:6 and lib/dnsimple/struct/whoami.rb:16.
      def account=(account)
      ^^^
lib/dnsimple/struct/whoami.rb:24:7: W: Method Dnsimple::Struct::Whoami#user= is defined at both lib/dnsimple/struct/whoami.rb:9 and lib/dnsimple/struct/whoami.rb:24.
      def user=(user)
      ^^^

Rdoc link in the readme is not up to date.

Hi,

First off, just wanted to say thanks for this helpful gem. It has made my life easier, and has made it simpler for us to manage our DNSimple account from our ruby app. Thank you for what you've done here. :-)

Second, just wanted to let you know that the Rdoc link at the bottom of the readme is not up to date. The link contained in it is: http://rdoc.info/projects/aetrion/dnsimple-ruby. I believe the most up to date readme can be found at: http://rubydoc.info/gems/dnsimple-ruby/1.2.6/.

I hope this helps.

--Aaron

Consolidate method naming

We have several methods that have obsolete names without the appropriate fixes. Will list them here so we start to rename them:

  • client.tlds.extended_attributes should be client.tlds.tld_extended_attributes
  • client.zones.records should be client.zones.zone_records

Raising RequestError causes exception

Getting the following in my code:

/app/vendor/bundle/ruby/2.0.0/gems/httparty-0.12.0/lib/httparty/response.rb:62:in `[]'
/app/vendor/bundle/ruby/2.0.0/gems/httparty-0.12.0/lib/httparty/response.rb:62:in `method_missing'
/app/vendor/bundle/ruby/2.0.0/gems/dnsimple-ruby-1.4.1/lib/dnsimple/error.rb:14:in `initialize'
/app/vendor/bundle/ruby/2.0.0/gems/dnsimple-ruby-1.4.1/lib/dnsimple/record.rb:70:in `new'
/app/vendor/bundle/ruby/2.0.0/gems/dnsimple-ruby-1.4.1/lib/dnsimple/record.rb:70:in `create'
/app/lib/dnsimple.rb:36:in `create_record'

This error means the RequestError doesn't get raised. Instead this weird access error gets created, so I never get to see what error the API returns. Any ideas?

Remove Domain token authentication

We don't support it in API v2 at the moment. We should remove that code to avoid confusion.

It's possible that, once reintroduced, it will be based on the OAuth scope. Therefore, it makes sense to simple remove it for now.

Add support for sorting and filtering

We need to add official support for sorting and filtering parameters.

In the go client the feature is explicit but this is mostly a consequence of how Go work.

In the Ruby client we are passing an hash of options to each method. We can reuse it (we can also consider to validate it in the future by using keyword arguments and explicitly allowing only certain values, such as :headers which is the only one I believe we should officially support today).

We need to make sure that if a sorting or filtering option is passed, it is properly appended to the querystring. We need a test for each method to validate this assertion, and properly document it.

Proposal

The sorting option can be the sort key with a string value. For filtering, because filters can be composed, we probably want to accept a hash. For example:

client.domains.domains("1010", sort: "name:ASC", filter: { name: "blabla", something: "else" })

NoMethodError: undefined method `VERSION' for DNSimple:Module

This was working about 3 months ago.
Then went to run a command and it was not longer working

DNSimple::Client.username = ENV['DNS_USER']
DNSimple::Client.api_token = ENV['DNS_API_TOKEN']
domain = DNSimple::Domain.find(@domain)

That is when I get

NoMethodError: undefined method `VERSION' for DNSimple:Module

Using
dnsimple-ruby (1.5.2)
rails (3.2.14)
ruby 2

Happen on local machine and heroku console.

Thanks!

Test environment issue

I'm trying to run specs and most of them fail, since the program is issuing requests to https://dnsimple.com/users instead of https://test.dnsimple.com/ as expected in yml config files under vcr_cassettees directory. I followed all the steps in the test README. Is there some additional preparation needed to make it run?. If so, It would be great to document it in test README.

undefined method `name' for "example.com":String (NoMethodError)

the DNS Imple gem is crashing when i try to add a record:

~$ dnsimple record:create example.com redacted CNAME redacted.example.com
/Users/ben/Developer/.rvm/gems/ruby-1.9.2-p180/gems/dnsimple-ruby-1.2.1/lib/dnsimple/record.rb:77:in `create': undefined method `name' for "example.com":String (NoMethodError)
    from /Users/ben/Developer/.rvm/gems/ruby-1.9.2-p180/gems/dnsimple-ruby-1.2.1/lib/dnsimple/commands/create_record.rb:12:in `execute'
    from /Users/ben/Developer/.rvm/gems/ruby-1.9.2-p180/gems/dnsimple-ruby-1.2.1/lib/dnsimple/cli.rb:15:in `execute'
    from /Users/ben/Developer/.rvm/gems/ruby-1.9.2-p180/gems/dnsimple-ruby-1.2.1/bin/dnsimple.rb:147:in `<top (required)>'
    from /Users/ben/Developer/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/ben/Developer/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/ben/Developer/.rvm/gems/ruby-1.9.2-p180/gems/dnsimple-ruby-1.2.1/bin/dnsimple:4:in `<top (required)>'
    from /Users/ben/Developer/.rvm/gems/ruby-1.9.2-p180/bin/dnsimple:19:in `load'
    from /Users/ben/Developer/.rvm/gems/ruby-1.9.2-p180/bin/dnsimple:19:in `<main>'

Here's the gem list:

~$ gem install dnsimple-ruby
Fetching: multi_json-1.0.4.gem (100%)
Fetching: multi_xml-0.4.1.gem (100%)
Fetching: httparty-0.8.1.gem (100%)
When you HTTParty, you must party hard!
Fetching: dnsimple-ruby-1.2.1.gem (100%)
Successfully installed multi_json-1.0.4
Successfully installed multi_xml-0.4.1
Successfully installed httparty-0.8.1
Successfully installed dnsimple-ruby-1.2.1

Happens on 1.8.7 too.

gem is not working anymore

Hi,

I cannot add any domain to Dnsimple.

dnsimple create foo.bar
Credentials loaded from ~/.dnsimple
An error occurred: Error creating domain:

Credentials are 100% correct. Anything changed recently ?

Missing Vanity Name Server struct

The Vanity Name Server related registrar endpoint delegateToVanity returns a complex response which is a list of hashes. However the client has no struct for that data and we simply return a list of Hashes.

Aren't we missing a struct that represents a Vanity Name Server?

Can we get this warning free?

Just running some of my simpler reporting scripts I'm getting a lot of warnings:

/Users/ryan/Work/p4/zss/usr/root/dns/tmp/isolate/ruby-2.0.0/gems/dnsimple-ruby-1.7.1/lib/dnsimple/client.rb:37: warning: instance variable @http_proxy not initialized
9 domains
Domains...
/Users/ryan/Work/p4/zss/usr/root/dns/tmp/isolate/ruby-2.0.0/gems/dnsimple-ruby-1.7.1/lib/dnsimple/client.rb:37: warning: instance variable @http_proxy not initialized
  rubyhitsquad.com
  sadi.st
  darmstadtium.com
  zenspider.com
  thagomizer.com
  nuclearwedding.org
  flerovium.com
  hahnium.com
  iwritecode.com
/Users/ryan/Work/p4/zss/usr/root/dns/tmp/isolate/ruby-2.0.0/gems/dnsimple-ruby-1.7.1/lib/dnsimple/client.rb:37: warning: instance variable @http_proxy not initialized
#<DNSimple::Domain:0x007faf049a0910 @id=795, @user_id=441, @registrant_id=105, @name="zenspider.com", @state="registered", @lockable=nil, @auto_renew=false, @whois_protected=false, @expires_on="2015-12-27", @created_at="2010-12-24T09:42:14.464Z", @updated_at="2014-12-25T21:22:31.785Z">

Error purchasing a SSL certificate

dnsimple certificate:purchase wibble.com admin 15269

An error occurred: Error purchasing certificate:

I managed to inspect the http party response and got:-

<HTTParty::Response:0x10fdeac78 parsed_response={"errors"=>{"csr"=>["can't be blank"], "name"=>[]}}, @response=#<Net::HTTPBadRequest 400 Bad Request readbody=true>, @headers={"connection"=>["close"], "transfer-encoding"=>["chunked"], "x-ua-compatible"=>["IE=Edge,chrome=1"], "server"=>["nginx/1.5.1"], "content-type"=>["application/json; charset=utf-8"], "access-control-allow-headers"=>["Authorization,Accepts,Content-Type,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with"], "date"=>["Mon, 08 Jul 2013 11:15:28 GMT"], "x-dnsimple-api-version"=>["1.0.0"], "x-runtime"=>["0.064150"], "status"=>["400 Bad Request"], "cache-control"=>["no-cache"], "x-request-id"=>["cc5ab73d4a3d8b2a39d573fd78b7981d"], "access-control-allow-origin"=>["*"], "access-control-allow-methods"=>["GET,POST,PUT,DELETE,OPTIONS"]}>

I can't see a way of including a csr with the certificate:purchase method of the cli.

http proxy ?

From the example in the README I found that i needed to set the http_proxy like this to get it working ?

DNSimple::Client.username = 'username'
DNSimple::Client.api_token = 'api-key'
DNSimple::Client.http_proxy = {} # without this i get an error

How do I create an A record?

Hi,

I'm looking for how to use this library to create a new A record under an existing domain

dnsimple record:create [--prio=priority] domain.com name type content [ttl]

i..e the equivalent of going to:
https://dnsimple.com/domains/mydomain.com/records
and clicking:
Add Record > A
e.g. https://dnsimple.com/domains/mydomain.com/records/new?record_type=A

And filling in the name & IP address.

I'm sure it's simple, but an example would bring it to life for me.

Thanks kindly,
Martin.

Changing (only) MX priority doesn't post an update

  domain "zenspider.com" do
    a "",       IP_ENVY
    # ...

    # was:
    # mx "envy.zenspider.com.",    :prio => 10
    # mx "izmunuti.segment7.net.", :prio => 20

    # changed to:
    mx "fake1.zenspider.com.",   :prio => 10
    mx "envy.zenspider.com.",    :prio => 20
    mx "izmunuti.segment7.net.", :prio => 30
    mx "fake2.zenspider.com.",   :prio => 40
    mx "fake3.zenspider.com.",   :prio => 50
    mx "fake4.zenspider.com.",   :prio => 60

    # ...
  end

I just ran my DNS declaration after making changes to my MX records. For the two that were on the "before", only the :prio changed. New MX records were made before and after (as illustrated above). For the two extant records, no changes were made when the script was run. The 3 new MX records were all created but overlapped at 10 & 20.

I had to manually update via the website (or force delete via script, I guess? untested). I would expect ANY change would be posted.

DNSimple::Exceptions should include access to HTTP resonse codes and json body

When I debug with my own tools I can see that the JSON reponse has useful info:

The JSON response creating a host entry that already exists:

{
    "domain_name": "mydomain.com",
    "name": "myhost",
    "errors": [],
    "warning": "myhost.mydomain.com โ†’ 127.0.0.1 already exists so it was ignored."
}

But when inspecting the DNSimple::RequestError exception in pry-byebug I don't get a lot:

[38] pry(#<DNSimple::Bind::ZoneImporter>)> ls e
Exception#methods: ==  __bb_binding  __bb_context  __bb_file  __bb_line  backtrace  backtrace_locations  cause  exception  inspect  message  respond_to?  set_backtrace  to_s
[39] pry(#<DNSimple::Bind::ZoneImporter>)> e.class
=> DNSimple::RequestError
[40] pry(#<DNSimple::Bind::ZoneImporter>)> e.message
=> "Error creating record: "

Fog uses a slurp method to pull in the response codes and sometimes the body:

https://github.com/fog/fog/blob/master/lib/fog/rackspace/errors.rb#L15

            def self.slurp(error, service=nil)
              exception = NotFound.new
              exception.instance_variable_set(:@region, service.region) if service && service.respond_to?(:region)
              exception.instance_variable_set(:@status_code, error.response.status) rescue nil
              exception.set_transaction_id(error, service)
              exception
            end

If we had access to the response code and any warnings, one could respond accordingly.

Domain API token in v2

Is this feature still available in v2? I couldn't find any information on this in the API documentation for v2 as it only had information on HTTP and oAuth2 methods.

Having a quick look at the code of the master branch I can see it is still being referenced as "domain_api_token" when creating a Dnsimple::Client object, but couldn't authenticate.

Provide test mode

@martinisoft would is working on https://github.com/dnsimple/chef-dnsimple and would like to have a test mode so he can run tests for the cookbook that actually exercise calls to the API client. I recommended that he not connect to our sandbox system as part of the test, but instead he should use the existing HTTP response stubs that we use for the client specs. I am proposing that we make it easy for clients using this ruby library to enable a test mode that stubs all of the requests using our existing stubs.

Delete multiple records

I'd like to do something like:

dnsimple record:delete domainname.com 3334417 3334418 

(presently it ignores multiple ids)

Or, even better

dnsimple record:delete domainname.com --all

Thanks,
M.

Support for vanity name servers

I added support for vanity name servers to my fork, however I'm not familiar with Rspec so I haven't written the tests. I'm not sure if I should submit a pull request without tests. Please advise.

iseem@5682736

Cannot get access token

In order to be able to get the access_token during the OAuth dance you have to call client.oauth.exchange_authorization_for_token.

However when you try to do it you get a Dnsimple::Error:

Dnsimple::Error - A password, domain API token or access token is required for all API requests

This happens because you don't have initialized the client with an access_token. However this exactly what you are trying to get.

Send Content-Type header

All non-GET requests must send the header:

Content-Type: application/json

In the future the API will reject requests that don't send a proper Content-Type header.

Domain#to_s and Record.all

I think these two should play together a bit better. The idea:

Domain.all.each do |domain|
  p Record.all(domain) # should to_s implicitly, and to_s should respond with name, not an inspect.
end

Documentation issues relating to access_token and url

Hi and thanks for the code, but it has been a bit of a struggle to get it working. That's probably not a problem for DNSimple experts, but the documentation didn't help me. The primary issue comes in the line:

client = Dnsimple::Client.new(access_token: "a1b2c3")

The access_token is not described as the Account Access Token, not a User Access Token. The following lines assume it is the account token, and it is very clear now, but the documentation could simply clarify
the need for the Account Access Token.

In that same line, there is no specification for how to provide the URL. I found that I needed to specify the base_url parameter, such as the specified "api.sandbox.dnsimple.com". Doing that blew up, of course, until I figured out that what was needed included the protocol: "https://api.sandbox.dnsimple.com".

I looked at providing a pull, but your doc didn't suggest that so I'll just open this issue. Thanks again.

Dnsimple::RequestError: Subscription required

Hello,

I am trying to use DNSimple API v2 following the example you give in README.
I have a sandbox account. I have access token generated for the account.

When I call list_domains or all_domains or create_domain I have an error "Subscription required"

My code is:

      client = Dnsimple::Client.new(base_url: "https://api.sandbox.dnsimple.com", access_token: TOKEN)
      response = client.identity.whoami   # execute the call
      response.data                       # extract the relevant data from the response or
      client.identity.whoami.data         # execute the call and get the data in one line

      whoami = client.identity.whoami.data
      account_id = whoami.account.id

      domains = client.domains.list_domains(account_id).data

Everything works fine until I call "domains" methods.
Then I have following error:

Dnsimple::RequestError: Subscription required
	from /Users/stas/.rvm/gems/ruby-2.3.0/gems/dnsimple-4.3.0/lib/dnsimple/client.rb:165:in `execute'
	from /Users/stas/.rvm/gems/ruby-2.3.0/gems/dnsimple-4.3.0/lib/dnsimple/client.rb:101:in `get'
	from /Users/stas/.rvm/gems/ruby-2.3.0/gems/dnsimple-4.3.0/lib/dnsimple/client/domains.rb:32:in `domains'
	from /Users/stas/Downloads/dnsimpletest/lib/dnsimpletest.rb:16:in `initialize'
	from (irb):1:in `new'
	from (irb):1
	from ./bin/console:14:in `<main>'

Ruby ver. 2.3.0
Dnsimple ver. 4.3.0

OS: macos high sierra 10.13.2

What does this error means: "Subscription required"
How can I fix it?

Thank you in advance,
Stas

Handle OAuth errors properly

I've found a case that doesn't match the error message handling scenarios that we currently have. When getting the OAuth access token, if you provide an incorrect secret you will get an error. The response is a 400 JSON response, however it doesn't include a message in the returned object:

#<HTTParty::Response:0x7fadab21aab0 parsed_response={"error"=>"invalid_request", "error_description"=>"Incorrect authorization credentials"}, @response=#<Net::HTTPBadRequest 400 Bad Request readbody=true>, @headers={"server"=>["nginx"], "date"=>["Sat, 23 Apr 2016 13:59:34 GMT"], "content-type"=>["application/json; charset=utf-8"], "transfer-encoding"=>["chunked"], "connection"=>["close"], "status"=>["400 Bad Request"], "x-ratelimit-limit"=>["30"], "x-ratelimit-remaining"=>["29"], "x-ratelimit-reset"=>["1461423574"], "cache-control"=>["no-cache"], "x-request-id"=>["e4a75b48-5a97-43cf-9be7-8a4a43f68589"], "x-runtime"=>["0.065750"]}>

The response is structured this way to comply with the OAuth RFC so we should be able to handle this case in the client too.

transfer command in 1.9.3

I tried the following in 1.9.3-p125

$ dnsimple transfer mydomain.com
/Users/me/Developer/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/dnsimple-ruby-1.2.6/lib/dnsimple/transfer_order.rb:41:in `initialize': wrong number of arguments (2 for 0..1) (ArgumentError)
        from /Users/me/Developer/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/dnsimple-ruby-1.2.6/lib/dnsimple/transfer_order.rb:41:in `new'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/dnsimple-ruby-1.2.6/lib/dnsimple/transfer_order.rb:41:in `create'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/dnsimple-ruby-1.2.6/lib/dnsimple/commands/transfer_domain.rb:16:in `execute'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/dnsimple-ruby-1.2.6/lib/dnsimple/cli.rb:15:in `execute'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/dnsimple-ruby-1.2.6/bin/dnsimple.rb:147:in `<top (required)>'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p125/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p125/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/dnsimple-ruby-1.2.6/bin/dnsimple:4:in `<top (required)>'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p125/bin/dnsimple:19:in `load'
        from /Users/me/Developer/.rbenv/versions/1.9.3-p125/bin/dnsimple:19:in `<main>'

Does this command work in 1.9.3 or is registrant_id a required arg? If the latter, I could throw in a cleaner error message in transfer_domain.rb

client.identity.whoami returns a data Hash

It looks like the following call is returning a Hash

client.identity.whoami.data

This is inconsistent with the documentation, where we say

whoami = client.identity.whoami.data
account_id = whoami.account.id

(it should be whoami[:account].id).

I suggest to return a proper Whoami object as we do for example in the Go client. This is a more maintainable structure than a Ruby Hash.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.