dnsimple-ruby 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +5 -1
- data/{CHANGELOG.md → CHANGELOG.markdown} +4 -0
- data/Gemfile +2 -0
- data/{README.md → README.markdown} +7 -6
- data/Rakefile +0 -1
- data/dnsimple-ruby.gemspec +3 -3
- data/lib/dnsimple/certificate.rb +29 -18
- data/lib/dnsimple/version.rb +1 -1
- data/spec/dnsimple/certificate_spec.rb +6 -3
- data/spec/dnsimple/user_spec.rb +4 -4
- data/spec/spec_helper.rb +5 -0
- metadata +32 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64281e9ce10e2195c78a11431293d6a8c85a4c7b
|
4
|
+
data.tar.gz: 270e24c58a03faebd723068cad3a77909f3ae9bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec10b4c5f6e07f87152a8a7d0ebe5620aa975451845b759e62fa77c86e5714481ae3c69c8636811389e0d5f531d6d2fb3cfba9d1a376ec08a29af860ecbf1599
|
7
|
+
data.tar.gz: 9faabff968a756c203547081c83d66c006b19751905a242e4a0cc588371338b6618ec18ae38a0793c0332024dd784f49cfe0b6073260c1ed73ee8439836a026e
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.1
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
# DNSimple Ruby Client
|
1
|
+
# DNSimple Ruby Client
|
2
2
|
|
3
|
-
A Ruby
|
3
|
+
A Ruby client for the [DNSimple API](http://developer.dnsimple.com/).
|
4
4
|
|
5
|
-
[
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
[![Build Status](https://travis-ci.org/aetrion/dnsimple-ruby.svg?branch=master)](https://travis-ci.org/aetrion/dnsimple-ruby)
|
6
|
+
[![Coverage Status](https://img.shields.io/coveralls/aetrion/dnsimple-ruby.svg)](https://coveralls.io/r/aetrion/dnsimple-ruby?branch=master)
|
7
|
+
|
8
|
+
[DNSimple](https://dnsimple.com/) provides DNS hosting and domain registration that is simple and friendly.
|
9
|
+
We provide a full API and an easy-to-use web interface so you can get your domain registered and set up with a minimal amount of effort.
|
9
10
|
|
10
11
|
## Installation
|
11
12
|
|
data/Rakefile
CHANGED
data/dnsimple-ruby.gemspec
CHANGED
@@ -8,13 +8,13 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.authors = ['Anthony Eden']
|
9
9
|
s.email = ['anthony.eden@dnsimple.com']
|
10
10
|
s.homepage = 'http://github.com/aetrion/dnsimple-ruby'
|
11
|
-
s.summary = 'A
|
12
|
-
s.description = 'A
|
11
|
+
s.summary = 'A Ruby client for the DNSimple API'
|
12
|
+
s.description = 'A Ruby client for the DNSimple API that also includes a command-line client.'
|
13
13
|
|
14
14
|
s.require_paths = ['lib']
|
15
15
|
s.files = `git ls-files`.split("\n")
|
16
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
-
s.extra_rdoc_files = %w( README.
|
17
|
+
s.extra_rdoc_files = %w( README.markdown CHANGELOG.markdown LICENSE )
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").collect { |f| File.basename(f) }
|
19
19
|
|
20
20
|
s.add_dependency 'httparty', RUBY_VERSION < "1.9.3" ? [">= 0.10", "< 0.12"] : "~> 0.12"
|
data/lib/dnsimple/certificate.rb
CHANGED
@@ -6,43 +6,54 @@ module DNSimple
|
|
6
6
|
# before the Certificate Authority will issue a signed certificate.
|
7
7
|
class Certificate < Base
|
8
8
|
|
9
|
-
# The certificate ID in DNSimple
|
9
|
+
# The Fixnum certificate ID in DNSimple.
|
10
10
|
attr_accessor :id
|
11
11
|
|
12
|
-
|
12
|
+
# The Fixnum associated domain ID.
|
13
|
+
attr_accessor :domain_id
|
14
|
+
|
15
|
+
# The Fixnum associated contact ID.
|
16
|
+
attr_accessor :contact_id
|
13
17
|
|
14
|
-
# The subdomain on the certificate
|
18
|
+
# The String subdomain on the certificate.
|
15
19
|
attr_accessor :name
|
16
20
|
|
17
|
-
# The
|
21
|
+
# The String state.
|
22
|
+
attr_accessor :state
|
23
|
+
|
24
|
+
# The String Certificate Signing Request.
|
18
25
|
attr_accessor :csr
|
19
26
|
|
20
|
-
# The SSL certificate
|
27
|
+
# The String SSL certificate.
|
28
|
+
# It is set only if the order issued by the Certificate Authority.
|
21
29
|
attr_accessor :ssl_certificate
|
22
30
|
|
23
|
-
# The private key
|
31
|
+
# The String private key.
|
32
|
+
# It is set only if DNSimple generated the Certificate Signing Request.
|
24
33
|
attr_accessor :private_key
|
25
34
|
|
26
|
-
# The approver email address
|
35
|
+
# The String approver email address
|
36
|
+
# It is set only if the state is submitted.
|
27
37
|
attr_accessor :approver_email
|
28
38
|
|
29
|
-
#
|
39
|
+
# The Array of all emails that can be used to approve the certificate.
|
40
|
+
# It is set only if the state is configured.
|
41
|
+
attr_accessor :approver_emails
|
42
|
+
|
43
|
+
# The Date the certificate was purchased
|
30
44
|
attr_accessor :created_at
|
31
45
|
|
32
|
-
#
|
46
|
+
# The Date the certificate was last updated
|
33
47
|
attr_accessor :updated_at
|
34
48
|
|
35
|
-
#
|
36
|
-
attr_accessor :
|
37
|
-
|
38
|
-
# The Certificate status
|
39
|
-
attr_accessor :certificate_status
|
49
|
+
# The Date the certificate was configured
|
50
|
+
attr_accessor :configured_at
|
40
51
|
|
41
|
-
# The
|
42
|
-
attr_accessor :
|
52
|
+
# The Date the Certificate will expire
|
53
|
+
attr_accessor :expires_on
|
43
54
|
|
44
|
-
# The
|
45
|
-
attr_accessor :
|
55
|
+
# The associated Domain.
|
56
|
+
attr_accessor :domain
|
46
57
|
|
47
58
|
|
48
59
|
# Purchase a certificate under the given domain with the given name. The
|
data/lib/dnsimple/version.rb
CHANGED
@@ -23,17 +23,20 @@ describe DNSimple::Certificate do
|
|
23
23
|
result = described_class.find(domain, "2")
|
24
24
|
|
25
25
|
expect(result.id).to eq(4576)
|
26
|
-
expect(result.
|
26
|
+
expect(result.domain_id).to eq(79569)
|
27
|
+
expect(result.contact_id).to eq(11549)
|
27
28
|
expect(result.name).to eq("www")
|
29
|
+
expect(result.state).to eq("cancelled")
|
28
30
|
expect(result.csr).to eq("-----BEGIN NEW CERTIFICATE REQUEST-----\nRHr2akB4KMba6FMAsvlStnO/2ika16hNx+d3smPNsER+HA==\n-----END NEW CERTIFICATE REQUEST-----\n")
|
29
31
|
expect(result.ssl_certificate).to eq("-----BEGIN CERTIFICATE-----\nXwTkw5UCPpaVyUYcwHlvaprOe9ZbwIyEHm2AT1rW+70=\n-----END CERTIFICATE-----\n")
|
30
32
|
expect(result.private_key).to eq("-----BEGIN RSA PRIVATE KEY-----\nUeXbFi7o+nuPfRhpBFQEKwacKFc3Hnc1hH6UsnC0KY25cUif7yz38A==\n-----END RSA PRIVATE KEY-----\n")
|
31
33
|
expect(result.approver_email).to eq("example@example.net")
|
32
34
|
expect(result.created_at).to eq("2013-09-17T21:54:42Z")
|
33
35
|
expect(result.updated_at).to eq("2013-09-17T22:25:36Z")
|
36
|
+
expect(result.configured_at).to eq("2013-09-17T22:25:01Z")
|
37
|
+
expect(result.expires_on).to eq("2014-09-17")
|
34
38
|
|
35
|
-
expect(result.
|
36
|
-
expect(result.certificate_status).to be_nil
|
39
|
+
expect(result.domain).to eq(domain)
|
37
40
|
end
|
38
41
|
end
|
39
42
|
end
|
data/spec/dnsimple/user_spec.rb
CHANGED
@@ -42,10 +42,10 @@ describe DNSimple::User do
|
|
42
42
|
|
43
43
|
expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/user").
|
44
44
|
# workaround for https://github.com/bblimke/webmock/issues/276
|
45
|
-
with
|
46
|
-
req.headers[
|
47
|
-
req.headers[
|
48
|
-
|
45
|
+
with { |req|
|
46
|
+
# req.headers[DNSimple::Client::HEADER_OTP_TOKEN] == otp_token
|
47
|
+
req.headers["X-Dnsimple-Otp"] == otp_token
|
48
|
+
}
|
49
49
|
end
|
50
50
|
|
51
51
|
it "returns the exchange_token" do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,128 +1,128 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dnsimple-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Eden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.12'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.12'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: aruba
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: cucumber
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mocha
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: yard
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: webmock
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
description: A
|
125
|
+
description: A Ruby client for the DNSimple API that also includes a command-line
|
126
126
|
client.
|
127
127
|
email:
|
128
128
|
- anthony.eden@dnsimple.com
|
@@ -131,19 +131,19 @@ executables:
|
|
131
131
|
- dnsimple.rb
|
132
132
|
extensions: []
|
133
133
|
extra_rdoc_files:
|
134
|
-
- README.
|
135
|
-
- CHANGELOG.
|
134
|
+
- README.markdown
|
135
|
+
- CHANGELOG.markdown
|
136
136
|
- LICENSE
|
137
137
|
files:
|
138
|
-
- .gitignore
|
139
|
-
- .rspec
|
140
|
-
- .ruby-gemset
|
141
|
-
- .ruby-version
|
142
|
-
- .travis.yml
|
143
|
-
- CHANGELOG.
|
138
|
+
- ".gitignore"
|
139
|
+
- ".rspec"
|
140
|
+
- ".ruby-gemset"
|
141
|
+
- ".ruby-version"
|
142
|
+
- ".travis.yml"
|
143
|
+
- CHANGELOG.markdown
|
144
144
|
- Gemfile
|
145
145
|
- LICENSE
|
146
|
-
- README.
|
146
|
+
- README.markdown
|
147
147
|
- Rakefile
|
148
148
|
- bin/dnsimple
|
149
149
|
- bin/dnsimple.rb
|
@@ -268,20 +268,20 @@ require_paths:
|
|
268
268
|
- lib
|
269
269
|
required_ruby_version: !ruby/object:Gem::Requirement
|
270
270
|
requirements:
|
271
|
-
- -
|
271
|
+
- - ">="
|
272
272
|
- !ruby/object:Gem::Version
|
273
273
|
version: '0'
|
274
274
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
275
275
|
requirements:
|
276
|
-
- -
|
276
|
+
- - ">="
|
277
277
|
- !ruby/object:Gem::Version
|
278
278
|
version: '0'
|
279
279
|
requirements: []
|
280
280
|
rubyforge_project:
|
281
|
-
rubygems_version: 2.
|
281
|
+
rubygems_version: 2.4.4
|
282
282
|
signing_key:
|
283
283
|
specification_version: 4
|
284
|
-
summary: A
|
284
|
+
summary: A Ruby client for the DNSimple API
|
285
285
|
test_files:
|
286
286
|
- features/README.md
|
287
287
|
- features/cli/certificates/purchase_certificate.feature
|