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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42638c92a4155646824236ba7c5d871d0136cc3a
4
- data.tar.gz: 9eebdc4564923bb72dcb799dd03742b624755114
3
+ metadata.gz: 64281e9ce10e2195c78a11431293d6a8c85a4c7b
4
+ data.tar.gz: 270e24c58a03faebd723068cad3a77909f3ae9bb
5
5
  SHA512:
6
- metadata.gz: b9531a98f22ece8e9be835d779e59a71a461a3f4c13844b5a15096b25b2c8d8a178833cfc3e0b6f91e5ca95cf28cf9ef3ca52b9060636ed2c4168a88360c1a3a
7
- data.tar.gz: e56b752ffa7824a98ba16b475d8293226475d5851e234c7c5ef3e82a902abccf26816f3d382c147b30fa031f1840e96e10667913718514fc23e2fa4e8682cb30
6
+ metadata.gz: ec10b4c5f6e07f87152a8a7d0ebe5620aa975451845b759e62fa77c86e5714481ae3c69c8636811389e0d5f531d6d2fb3cfba9d1a376ec08a29af860ecbf1599
7
+ data.tar.gz: 9faabff968a756c203547081c83d66c006b19751905a242e4a0cc588371338b6618ec18ae38a0793c0332024dd784f49cfe0b6073260c1ed73ee8439836a026e
@@ -1 +1 @@
1
- ruby-2.0
1
+ ruby-2.1
@@ -5,4 +5,8 @@ rvm:
5
5
  - 1.9.3
6
6
  - 2.0.0
7
7
  - 2.1.0
8
- env: DNSIMPLE_TEST_CONFIG=spec/ci/.dnsimple.test
8
+ env: DNSIMPLE_TEST_CONFIG=spec/ci/.dnsimple.test COVERALL=1
9
+
10
+ matrix:
11
+ allow_failures:
12
+ - rvm: 1.8.7
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ #### Release 1.7.1
4
+
5
+ - FIXED: Updated Certificate to match the serialized attributes (GH-53)
6
+
3
7
  #### Release 1.7.0
4
8
 
5
9
  - NEW: Add support for Domain-based authentication (GH-40, GH-46). Thanks @dwradcliffe and @samsonasu.
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ gem 'coveralls', :require => false
@@ -1,11 +1,12 @@
1
- # DNSimple Ruby Client [![Build Status](https://secure.travis-ci.org/aetrion/dnsimple-ruby.png)](http://travis-ci.org/aetrion/dnsimple-ruby)
1
+ # DNSimple Ruby Client
2
2
 
3
- A Ruby command line utility and wrapper for the [DNSimple API](http://developer.dnsimple.com/).
3
+ A Ruby client for the [DNSimple API](http://developer.dnsimple.com/).
4
4
 
5
- [DNSimple](https://dnsimple.com/) provides DNS hosting
6
- and domain registration that is simple and friendly.
7
- We provide a full API and an easy-to-use web interface so you can get
8
- your domain registered and set up with a minimal amount of effort.
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
@@ -2,7 +2,6 @@ require 'bundler/gem_tasks'
2
2
 
3
3
  # Run test by default.
4
4
  task :default => :spec
5
- task :test => :spec
6
5
 
7
6
 
8
7
  require 'rspec/core/rake_task'
@@ -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 ruby wrapper for the DNSimple API'
12
- s.description = 'A ruby wrapper for the DNSimple API that also includes a command-line client.'
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.md CHANGELOG.md LICENSE )
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"
@@ -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
- attr_accessor :domain
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 Certificate Signing Request
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, if it has been issued by the Certificate Authority
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, if DNSimple generated the Certificate Signing Request
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
- # When the certificate was purchased
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
- # When the certificate was last updated
46
+ # The Date the certificate was last updated
33
47
  attr_accessor :updated_at
34
48
 
35
- # An array of all emails that can be used to approve the certificate
36
- attr_accessor :available_approver_emails
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 date the Certificate order was placed
42
- attr_accessor :order_date
52
+ # The Date the Certificate will expire
53
+ attr_accessor :expires_on
43
54
 
44
- # The date the Certificate will expire
45
- attr_accessor :expiration_date
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
@@ -1,3 +1,3 @@
1
1
  module DNSimple
2
- VERSION = '1.7.0'
2
+ VERSION = '1.7.1'
3
3
  end
@@ -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.domain).to eq(domain)
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.available_approver_emails).to be_nil
36
- expect(result.certificate_status).to be_nil
39
+ expect(result.domain).to eq(domain)
37
40
  end
38
41
  end
39
42
  end
@@ -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 do |req|
46
- req.headers['Accept'] == 'application/json' &&
47
- req.headers[DNSimple::CLient::HEADER_OTP_TOKEN] == otp_token
48
- end
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
@@ -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
 
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.0
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-09-29 00:00:00.000000000 Z
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 ruby wrapper for the DNSimple API that also includes a command-line
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.md
135
- - CHANGELOG.md
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.md
138
+ - ".gitignore"
139
+ - ".rspec"
140
+ - ".ruby-gemset"
141
+ - ".ruby-version"
142
+ - ".travis.yml"
143
+ - CHANGELOG.markdown
144
144
  - Gemfile
145
145
  - LICENSE
146
- - README.md
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.2.2
281
+ rubygems_version: 2.4.4
282
282
  signing_key:
283
283
  specification_version: 4
284
- summary: A ruby wrapper for the DNSimple API
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