dnsimple 2.0.0.a → 2.0.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.ruby-version +1 -1
  4. data/.travis.yml +1 -2
  5. data/CHANGELOG.markdown +26 -2
  6. data/Gemfile +2 -0
  7. data/README.markdown +56 -36
  8. data/Rakefile +0 -1
  9. data/{dnsimple-ruby.gemspec → dnsimple.gemspec} +6 -4
  10. data/lib/dnsimple.rb +1 -1
  11. data/lib/dnsimple/base.rb +1 -1
  12. data/lib/dnsimple/certificate.rb +49 -35
  13. data/lib/dnsimple/client.rb +25 -72
  14. data/lib/dnsimple/contact.rb +12 -9
  15. data/lib/dnsimple/domain.rb +117 -82
  16. data/lib/dnsimple/error.rb +13 -2
  17. data/lib/dnsimple/extended_attribute.rb +3 -3
  18. data/lib/dnsimple/record.rb +9 -9
  19. data/lib/dnsimple/service.rb +3 -3
  20. data/lib/dnsimple/template.rb +8 -6
  21. data/lib/dnsimple/template_record.rb +8 -8
  22. data/lib/dnsimple/transfer_order.rb +2 -2
  23. data/lib/dnsimple/user.rb +26 -2
  24. data/lib/dnsimple/version.rb +2 -2
  25. data/spec/dnsimple/certificate_spec.rb +8 -5
  26. data/spec/dnsimple/client_spec.rb +56 -9
  27. data/spec/dnsimple/contact_spec.rb +2 -2
  28. data/spec/dnsimple/domain_spec.rb +140 -32
  29. data/spec/dnsimple/extended_attributes_spec.rb +1 -1
  30. data/spec/dnsimple/record_spec.rb +2 -2
  31. data/spec/dnsimple/template_spec.rb +1 -1
  32. data/spec/dnsimple/user_spec.rb +40 -1
  33. data/spec/files/2fa/error-badtoken.http +22 -0
  34. data/spec/files/2fa/error-required.http +23 -0
  35. data/spec/files/2fa/exchange-token.http +25 -0
  36. data/spec/files/account/user/success.http +3 -3
  37. data/spec/files/certificates/index/success.http +2 -2
  38. data/spec/files/certificates/show/notfound.http +2 -2
  39. data/spec/files/certificates/show/success.http +2 -2
  40. data/spec/files/contacts/show/notfound.http +2 -2
  41. data/spec/files/contacts/show/success.http +3 -3
  42. data/spec/files/domains/auto_renewal_disable/notfound.http +1 -1
  43. data/spec/files/domains/auto_renewal_disable/success.http +1 -1
  44. data/spec/files/domains/auto_renewal_enable/notfound.http +1 -1
  45. data/spec/files/domains/auto_renewal_enable/success.http +1 -1
  46. data/spec/files/domains/create/success.http +19 -0
  47. data/spec/files/domains/delete/success-204.http +18 -0
  48. data/spec/files/domains/delete/success.http +19 -0
  49. data/spec/files/domains/index/success.http +19 -0
  50. data/spec/files/domains/{show/notfound.http → notfound.http} +2 -2
  51. data/spec/files/domains/show/success.http +2 -2
  52. data/spec/files/extended_attributes/ca.http +2 -2
  53. data/spec/files/extended_attributes/com.http +2 -2
  54. data/spec/files/extended_attributes/success.http +2 -2
  55. data/spec/files/records/index/success.http +2 -2
  56. data/spec/files/records/show/notfound.http +2 -2
  57. data/spec/files/records/show/success.http +2 -2
  58. data/spec/files/templates/show/notfound.http +2 -2
  59. data/spec/files/templates/show/success.http +2 -2
  60. data/spec/spec_helper.rb +9 -9
  61. metadata +45 -33
  62. data/lib/dnsimple-ruby.rb +0 -1
  63. data/spec/ci/.dnsimple.test +0 -3
@@ -5,9 +5,9 @@ Content-Type: application/json; charset=utf-8
5
5
  Transfer-Encoding: chunked
6
6
  Connection: close
7
7
  Status: 404 Not Found
8
- X-DNSimple-API-Version: 1.0.0
8
+ X-Dnsimple-API-Version: 1.0.0
9
9
  Access-Control-Allow-Origin: *
10
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-Dnsimple-Token,X-Dnsimple-Domain-Token,X-CSRF-Token,x-requested-with
11
11
  Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
12
  X-UA-Compatible: IE=Edge,chrome=1
13
13
  Cache-Control: no-cache
@@ -5,9 +5,9 @@ Content-Type: application/json; charset=utf-8
5
5
  Transfer-Encoding: chunked
6
6
  Connection: close
7
7
  Status: 200 OK
8
- X-DNSimple-API-Version: 1.0.0
8
+ X-Dnsimple-API-Version: 1.0.0
9
9
  Access-Control-Allow-Origin: *
10
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-Dnsimple-Token,X-Dnsimple-Domain-Token,X-CSRF-Token,x-requested-with
11
11
  Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
12
  X-UA-Compatible: IE=Edge,chrome=1
13
13
  ETag: "67a9bfb8046724e79c7244d3c2458e65"
@@ -5,9 +5,9 @@ Content-Type: application/json; charset=utf-8
5
5
  Transfer-Encoding: chunked
6
6
  Connection: close
7
7
  Status: 404 Not Found
8
- X-DNSimple-API-Version: 1.0.0
8
+ X-Dnsimple-API-Version: 1.0.0
9
9
  Access-Control-Allow-Origin: *
10
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-Dnsimple-Token,X-Dnsimple-Domain-Token,X-CSRF-Token,x-requested-with
11
11
  Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
12
  X-UA-Compatible: IE=Edge,chrome=1
13
13
  Cache-Control: no-cache
@@ -5,9 +5,9 @@ Content-Type: application/json; charset=utf-8
5
5
  Transfer-Encoding: chunked
6
6
  Connection: close
7
7
  Status: 200 OK
8
- X-DNSimple-API-Version: 1.0.0
8
+ X-Dnsimple-API-Version: 1.0.0
9
9
  Access-Control-Allow-Origin: *
10
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-Dnsimple-Token,X-Dnsimple-Domain-Token,X-CSRF-Token,x-requested-with
11
11
  Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
12
  X-UA-Compatible: IE=Edge,chrome=1
13
13
  ETag: "10b0cf9b0739e857322f4a7fce8f66a8"
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,10 @@
1
1
  require 'rspec'
2
2
 
3
+ if ENV['COVERALL']
4
+ require 'coveralls'
5
+ Coveralls.wear!
6
+ end
7
+
3
8
  $:.unshift(File.dirname(__FILE__) + '/lib')
4
9
  require 'dnsimple'
5
10
 
@@ -7,15 +12,10 @@ unless defined?(SPEC_ROOT)
7
12
  SPEC_ROOT = File.expand_path("../", __FILE__)
8
13
  end
9
14
 
10
- if ENV['DNSIMPLE_TEST_CONFIG']
11
- DNSimple::Client.load_credentials(ENV['DNSIMPLE_TEST_CONFIG'])
12
- CONFIG = { 'username' => DNSimple::Client.username, 'password' => DNSimple::Client.password, 'base_uri' => DNSimple::Client.base_uri, 'host' => URI.parse(DNSimple::Client.base_uri).host }
13
- else
14
- CONFIG = { 'username' => 'username', 'password' => 'password', 'base_uri' => 'https://api.sandbox.dnsimple.com/', 'host' => 'api.sandbox.dnsimple.com' }
15
- DNSimple::Client.base_uri = CONFIG['base_uri']
16
- DNSimple::Client.username = CONFIG['username']
17
- DNSimple::Client.password = CONFIG['password']
18
- end
15
+ CONFIG = { 'username' => 'username', 'password' => 'password', 'base_uri' => 'https://api.sandbox.dnsimple.com/', 'host' => 'api.sandbox.dnsimple.com' }
16
+ Dnsimple::Client.base_uri = CONFIG['base_uri']
17
+ Dnsimple::Client.username = CONFIG['username']
18
+ Dnsimple::Client.password = CONFIG['password']
19
19
 
20
20
 
21
21
  RSpec.configure do |c|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnsimple
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.a
4
+ version: 2.0.0.alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Eden
@@ -9,93 +9,94 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-05 00:00:00.000000000 Z
12
+ date: 2014-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '0.12'
20
+ version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '0.12'
27
+ version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: mocha
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rspec
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: yard
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: webmock
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - '>='
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
- description: A ruby wrapper for the DNSimple API.
98
+ description: A Ruby client for the DNSimple API that also includes a command-line
99
+ client.
99
100
  email:
100
101
  - anthony.eden@dnsimple.com
101
102
  - simone.carletti@dnsimple.com
@@ -106,18 +107,17 @@ extra_rdoc_files:
106
107
  - CHANGELOG.markdown
107
108
  - LICENSE
108
109
  files:
109
- - .gitignore
110
- - .rspec
111
- - .ruby-gemset
112
- - .ruby-version
113
- - .travis.yml
110
+ - ".gitignore"
111
+ - ".rspec"
112
+ - ".ruby-gemset"
113
+ - ".ruby-version"
114
+ - ".travis.yml"
114
115
  - CHANGELOG.markdown
115
116
  - Gemfile
116
117
  - LICENSE
117
118
  - README.markdown
118
119
  - Rakefile
119
- - dnsimple-ruby.gemspec
120
- - lib/dnsimple-ruby.rb
120
+ - dnsimple.gemspec
121
121
  - lib/dnsimple.rb
122
122
  - lib/dnsimple/base.rb
123
123
  - lib/dnsimple/certificate.rb
@@ -133,7 +133,6 @@ files:
133
133
  - lib/dnsimple/transfer_order.rb
134
134
  - lib/dnsimple/user.rb
135
135
  - lib/dnsimple/version.rb
136
- - spec/ci/.dnsimple.test
137
136
  - spec/dnsimple/certificate_spec.rb
138
137
  - spec/dnsimple/client_spec.rb
139
138
  - spec/dnsimple/contact_spec.rb
@@ -142,6 +141,9 @@ files:
142
141
  - spec/dnsimple/record_spec.rb
143
142
  - spec/dnsimple/template_spec.rb
144
143
  - spec/dnsimple/user_spec.rb
144
+ - spec/files/2fa/error-badtoken.http
145
+ - spec/files/2fa/error-required.http
146
+ - spec/files/2fa/exchange-token.http
145
147
  - spec/files/account/user/success.http
146
148
  - spec/files/certificates/index/success.http
147
149
  - spec/files/certificates/show/notfound.http
@@ -152,7 +154,11 @@ files:
152
154
  - spec/files/domains/auto_renewal_disable/success.http
153
155
  - spec/files/domains/auto_renewal_enable/notfound.http
154
156
  - spec/files/domains/auto_renewal_enable/success.http
155
- - spec/files/domains/show/notfound.http
157
+ - spec/files/domains/create/success.http
158
+ - spec/files/domains/delete/success-204.http
159
+ - spec/files/domains/delete/success.http
160
+ - spec/files/domains/index/success.http
161
+ - spec/files/domains/notfound.http
156
162
  - spec/files/domains/show/success.http
157
163
  - spec/files/extended_attributes/ca.http
158
164
  - spec/files/extended_attributes/com.http
@@ -174,22 +180,21 @@ require_paths:
174
180
  - lib
175
181
  required_ruby_version: !ruby/object:Gem::Requirement
176
182
  requirements:
177
- - - '>='
183
+ - - ">="
178
184
  - !ruby/object:Gem::Version
179
- version: '0'
185
+ version: 1.9.3
180
186
  required_rubygems_version: !ruby/object:Gem::Requirement
181
187
  requirements:
182
- - - '>'
188
+ - - ">"
183
189
  - !ruby/object:Gem::Version
184
190
  version: 1.3.1
185
191
  requirements: []
186
192
  rubyforge_project:
187
- rubygems_version: 2.2.2
193
+ rubygems_version: 2.4.4
188
194
  signing_key:
189
195
  specification_version: 4
190
- summary: A ruby wrapper for the DNSimple API
196
+ summary: A Ruby client for the DNSimple API
191
197
  test_files:
192
- - spec/ci/.dnsimple.test
193
198
  - spec/dnsimple/certificate_spec.rb
194
199
  - spec/dnsimple/client_spec.rb
195
200
  - spec/dnsimple/contact_spec.rb
@@ -198,6 +203,9 @@ test_files:
198
203
  - spec/dnsimple/record_spec.rb
199
204
  - spec/dnsimple/template_spec.rb
200
205
  - spec/dnsimple/user_spec.rb
206
+ - spec/files/2fa/error-badtoken.http
207
+ - spec/files/2fa/error-required.http
208
+ - spec/files/2fa/exchange-token.http
201
209
  - spec/files/account/user/success.http
202
210
  - spec/files/certificates/index/success.http
203
211
  - spec/files/certificates/show/notfound.http
@@ -208,7 +216,11 @@ test_files:
208
216
  - spec/files/domains/auto_renewal_disable/success.http
209
217
  - spec/files/domains/auto_renewal_enable/notfound.http
210
218
  - spec/files/domains/auto_renewal_enable/success.http
211
- - spec/files/domains/show/notfound.http
219
+ - spec/files/domains/create/success.http
220
+ - spec/files/domains/delete/success-204.http
221
+ - spec/files/domains/delete/success.http
222
+ - spec/files/domains/index/success.http
223
+ - spec/files/domains/notfound.http
212
224
  - spec/files/domains/show/success.http
213
225
  - spec/files/extended_attributes/ca.http
214
226
  - spec/files/extended_attributes/com.http
data/lib/dnsimple-ruby.rb DELETED
@@ -1 +0,0 @@
1
- require 'dnsimple'
@@ -1,3 +0,0 @@
1
- username: username
2
- password: password
3
- base_uri: https://api.ci.dnsimple.com