fog-dynect 0.0.3 → 0.5.0

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
- SHA1:
3
- metadata.gz: d58e753dc0785d8bfaf2f70810c40e181b7a43f8
4
- data.tar.gz: ce0bdaa0b52b229d6df241a0aa1a37f8c430e3b8
2
+ SHA256:
3
+ metadata.gz: '0878424c0374df937df5fac2b25b89040d3ea9da03f8243d06bb614f6d519b93'
4
+ data.tar.gz: cb6b47bf3a11497e624a7d6e115080bb3b5533d1a441ac61bf437388c6b531d7
5
5
  SHA512:
6
- metadata.gz: 96ff061abe0c12afd440036deb8aecbbaaa0a4b7635a7eb1977f69f492f76b8f9cc36a84c0cb6bf1721c977492bbbdd8bfd0e29c66975570acfbc75d1ce12207
7
- data.tar.gz: 8a9dbb5ac1e27e78be4df16a4a15ffd5895501b76a074592f418b5863369d37eb02803cfbf95dcf8463dae0c86f561099330237ce23c4b8154edeba4a10c50e8
6
+ metadata.gz: b76b699dcad587ff7d902a5431d1cc258445f82aa2c6dd2177f7ef6b8ea70640ea55e5bef09ad9fc077938276c31b11bb4afd114815d59b855e8ee130256b80e
7
+ data.tar.gz: 36b9ee90c40b7948d7259de4ed94ad17add6c86598322cb5b6546ca1a51aedc1d18353487c828ca91ac1d0a7b1769863f528980df0040a60e301d5c9aa6e6c41
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "bundler"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "daily"
7
+ - package-ecosystem: "github-actions"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "daily"
@@ -0,0 +1,34 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ matrix:
22
+ ruby-version: ['2.5', '2.6', '2.7', '3.0', 'head']
23
+
24
+ steps:
25
+ - uses: actions/checkout@v2
26
+ - name: Set up Ruby
27
+ uses: ruby/setup-ruby@v1
28
+ with:
29
+ ruby-version: ${{ matrix.ruby-version }}
30
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
31
+ - name: Install dependencies
32
+ run: bundle install
33
+ - name: Run tests
34
+ run: bundle exec rake
@@ -0,0 +1,23 @@
1
+ name: Mark stale issues and pull requests
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "30 1 * * *"
6
+
7
+ jobs:
8
+ stale:
9
+
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/stale@v3
14
+ with:
15
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
16
+ days-before-stale: 60
17
+ days-before-close: 7
18
+ exempt-issue-labels: 'pinned,security'
19
+ exempt-pr-labels: 'pinned,security'
20
+ stale-issue-message: 'This issue has been marked inactive and will be closed if no further activity occurs.'
21
+ stale-pr-message: 'This pr has been marked inactive and will be closed if no further activity occurs.'
22
+ stale-issue-label: 'no-issue-activity'
23
+ stale-pr-label: 'no-pr-activity'
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ spec/reports
16
16
  test/tmp
17
17
  test/version_tmp
18
18
  tmp
19
+ vendor
data/CHANGELOG.md CHANGED
@@ -1,3 +1,40 @@
1
+ v0.5.0 2021-04-28
2
+ =================
3
+
4
+ replace deprecated Fog::DNS:Dynect usage with Fog::Dynect::DNS
5
+ add github actions and config
6
+ drop travis usage
7
+
8
+ v0.4.0
9
+
10
+ allow specifying api version
11
+ bump API version used to 3.7.13
12
+ fix travis tests
13
+
14
+ v0.3.0
15
+
16
+ - Change API endpoint to 'api.dynect.net' as Dyn will decommision
17
+ 'api-v4.dynect.net'
18
+
19
+ v0.2.0
20
+
21
+ populate 'ttl' property of 'record' model
22
+
23
+ v0.1.0
24
+
25
+ update to dyn api version 3.7.0
26
+ fix comments for ALIAS records
27
+ fix ruby 1.8 Gemfile rake version
28
+
29
+ v0.0.3
30
+
31
+ fix DNS record updates for fog-core 1.25.0 and later
32
+
33
+ v0.0.2
34
+
35
+ extract bin from fog
36
+ use autoload to reduce code loaded
37
+
1
38
  v0.0.1
2
39
 
3
40
  Initial extraction from fog v1.18.0-2712-g388983f.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Fog::Dynect
2
2
 
3
- [![Build Status](https://travis-ci.org/fog/fog-dynect.svg?branch=master)](https://travis-ci.org/fog/fog-dynect)
3
+ [![Build Status](https://github.com/fog/fog-dynect/actions/workflows/ruby.yml/badge.svg)](https://github.com/fog/fog-dynect/actions/workflows/ruby.yml)
4
4
 
5
5
  ## Installation
6
6
 
data/Rakefile CHANGED
@@ -3,6 +3,7 @@ require 'bundler/gem_tasks'
3
3
  task :default => :test
4
4
 
5
5
  mock = ENV['FOG_MOCK'] || 'true'
6
+ desc 'Run tests.'
6
7
  task :test do
7
8
  sh("export FOG_MOCK=#{mock} && bundle exec shindont")
8
9
  end
@@ -3,7 +3,7 @@ class Dynect < Fog::Bin
3
3
  def class_for(key)
4
4
  case key
5
5
  when :dns
6
- Fog::DNS::Dynect
6
+ Fog::Dynect::DNS
7
7
  else
8
8
  raise ArgumentError, "Unrecognized service: #{key}"
9
9
  end
data/lib/fog/dynect.rb CHANGED
@@ -5,15 +5,13 @@ require 'fog/json'
5
5
  require 'fog/xml'
6
6
 
7
7
  module Fog
8
- module DNS
9
- autoload :Dynect, File.expand_path('../dynect/dns', __FILE__)
10
- end
11
-
12
8
  module Dynect
13
9
  extend Fog::Provider
14
10
 
15
11
  autoload :VERSION, File.expand_path('../dynect/version', __FILE__)
16
12
 
13
+ autoload :DNS, File.expand_path('../dynect/dns', __FILE__)
14
+
17
15
  service(:dns, 'DNS')
18
16
 
19
17
  class Mock
@@ -1,8 +1,8 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect < Fog::Service
2
+ module Dynect
3
+ class DNS < Fog::Service
4
4
  requires :dynect_customer, :dynect_username, :dynect_password
5
- recognizes :timeout, :persistent, :job_poll_timeout
5
+ recognizes :timeout, :persistent, :job_poll_timeout, :version
6
6
  recognizes :provider # remove post deprecation
7
7
 
8
8
  model_path 'fog/dynect/models/dns'
@@ -63,12 +63,12 @@ module Fog
63
63
  @dynect_password = options[:dynect_password]
64
64
 
65
65
  @connection_options = options[:connection_options] || {}
66
- @host = 'api-v4.dynect.net'
66
+ @host = 'api.dynect.net'
67
67
  @port = options[:port] || 443
68
68
  @path = options[:path] || '/REST'
69
69
  @persistent = options[:persistent] || false
70
70
  @scheme = options[:scheme] || 'https'
71
- @version = options[:version] || '3.5.2'
71
+ @version = options[:version] || '3.7.13'
72
72
  @job_poll_timeout = options[:job_poll_timeout] || 10
73
73
  @connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}", @persistent, @connection_options)
74
74
  end
@@ -152,4 +152,17 @@ module Fog
152
152
  end
153
153
  end
154
154
  end
155
+
156
+ # @deprecated
157
+ module DNS
158
+ # @deprecated
159
+ class Dynect < Fog::Dynect::DNS
160
+ # @deprecated
161
+ # @overrides Fog::Service.new (from the fog-core gem)
162
+ def self.new(*)
163
+ Fog::Logger.deprecation 'Fog::DNS::Dynect is deprecated, please use Fog::Dynect::DNS.'
164
+ super
165
+ end
166
+ end
167
+ end
155
168
  end
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect
2
+ module Dynect
3
+ class DNS
4
4
  class Record < Fog::Model
5
5
  extend Fog::Deprecation
6
6
 
@@ -1,12 +1,12 @@
1
1
  require 'fog/dynect/models/dns/record'
2
2
 
3
3
  module Fog
4
- module DNS
5
- class Dynect
4
+ module Dynect
5
+ class DNS
6
6
  class Records < Fog::Collection
7
7
  attribute :zone
8
8
 
9
- model Fog::DNS::Dynect::Record
9
+ model Fog::Dynect::DNS::Record
10
10
 
11
11
  def all(options = {})
12
12
  requires :zone
@@ -18,7 +18,8 @@ module Fog
18
18
  :identity => record['record_id'],
19
19
  :fqdn => record['fqdn'],
20
20
  :type => record['record_type'],
21
- :rdata => record['rdata']
21
+ :rdata => record['rdata'],
22
+ :ttl => record['ttl']
22
23
  }
23
24
  end
24
25
  end
@@ -1,8 +1,8 @@
1
1
  require 'fog/dynect/models/dns/records'
2
2
 
3
3
  module Fog
4
- module DNS
5
- class Dynect
4
+ module Dynect
5
+ class DNS
6
6
  class Zone < Fog::Model
7
7
  identity :domain
8
8
 
@@ -35,7 +35,7 @@ module Fog
35
35
  end
36
36
 
37
37
  def records
38
- @records ||= Fog::DNS::Dynect::Records.new(:zone => self, :service => service)
38
+ @records ||= Fog::Dynect::DNS::Records.new(:zone => self, :service => service)
39
39
  end
40
40
 
41
41
  def nameservers
@@ -1,10 +1,10 @@
1
1
  require 'fog/dynect/models/dns/zone'
2
2
 
3
3
  module Fog
4
- module DNS
5
- class Dynect
4
+ module Dynect
5
+ class DNS
6
6
  class Zones < Fog::Collection
7
- model Fog::DNS::Dynect::Zone
7
+ model Fog::Dynect::DNS::Zone
8
8
 
9
9
  def all
10
10
  data = service.get_zone.body['data'].map do |zone|
@@ -1,11 +1,11 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect
2
+ module Dynect
3
+ class DNS
4
4
  class Real
5
5
  # Delete a record
6
6
  #
7
7
  # ==== Parameters
8
- # * type<~String> - type of record in ['AAAA', 'ANY', 'A', 'CNAME', 'DHCID', 'DNAME', 'DNSKEY', 'DS', 'KEY', 'LOC', 'MX', 'NSA', 'NS', 'PTR', 'PX', 'RP', 'SOA', 'SPF', 'SRV', 'SSHFP', 'TXT']
8
+ # * type<~String> - type of record in ['AAAA', 'ALIAS', 'ANY', 'A', 'CNAME', 'DHCID', 'DNAME', 'DNSKEY', 'DS', 'KEY', 'LOC', 'MX', 'NSA', 'NS', 'PTR', 'PX', 'RP', 'SOA', 'SPF', 'SRV', 'SSHFP', 'TXT']
9
9
  # * zone<~String> - zone of record
10
10
  # * fqdn<~String> - fqdn of record
11
11
  # * record_id<~String> - id of record
@@ -22,9 +22,9 @@ module Fog
22
22
 
23
23
  class Mock
24
24
  def delete_record(type, zone, fqdn, record_id)
25
- raise Fog::DNS::Dynect::NotFound unless zone = self.data[:zones][zone]
25
+ raise Fog::Dynect::DNS::NotFound unless zone = self.data[:zones][zone]
26
26
 
27
- raise Fog::DNS::Dynect::NotFound unless zone[:records][type].find { |record| record[:fqdn] == fqdn && record[:record_id] == record_id.to_i }
27
+ raise Fog::Dynect::DNS::NotFound unless zone[:records][type].find { |record| record[:fqdn] == fqdn && record[:record_id] == record_id.to_i }
28
28
 
29
29
  zone[:records_to_delete] << {
30
30
  :type => type,
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect
2
+ module Dynect
3
+ class DNS
4
4
  class Real
5
5
  # Delete a zone
6
6
  #
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect
2
+ module Dynect
3
+ class DNS
4
4
  class Real
5
5
  # Get one or more node lists
6
6
  #
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect
2
+ module Dynect
3
+ class DNS
4
4
  class Real
5
5
  # Get one or more node lists
6
6
  #
@@ -1,11 +1,11 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect
2
+ module Dynect
3
+ class DNS
4
4
  class Real
5
5
  # List records of a given type
6
6
  #
7
7
  # ==== Parameters
8
- # * type<~String> - type of record in ['AAAA', 'ANY', 'A', 'CNAME', 'DHCID', 'DNAME', 'DNSKEY', 'DS', 'KEY', 'LOC', 'MX', 'NSA', 'NS', 'PTR', 'PX', 'RP', 'SOA', 'SPF', 'SRV', 'SSHFP', 'TXT']
8
+ # * type<~String> - type of record in ['AAAA', 'ALIAS', 'ANY', 'A', 'CNAME', 'DHCID', 'DNAME', 'DNSKEY', 'DS', 'KEY', 'LOC', 'MX', 'NSA', 'NS', 'PTR', 'PX', 'RP', 'SOA', 'SPF', 'SRV', 'SSHFP', 'TXT']
9
9
  # * zone<~String> - name of zone to lookup
10
10
  # * fqdn<~String> - name of fqdn to lookup
11
11
  # * options<~Hash>:
@@ -24,10 +24,10 @@ module Fog
24
24
  class Mock
25
25
  def get_record(type, zone, fqdn, options = {})
26
26
  raise ArgumentError unless [
27
- 'AAAA', 'ANY', 'A', 'CNAME',
28
- 'DHCID', 'DNAME', 'DNSKEY',
29
- 'DS', 'KEY', 'LOC', 'MX',
30
- 'NSA', 'NS', 'PTR', 'PX',
27
+ 'AAAA', 'ALIAS' ,'ANY', 'A',
28
+ 'CNAME', 'DHCID', 'DNAME',
29
+ 'DNSKEY', 'DS', 'KEY', 'LOC',
30
+ 'MX', 'NSA', 'NS', 'PTR', 'PX',
31
31
  'RP', 'SOA', 'SPF', 'SRV',
32
32
  'SSHFP', 'TXT'
33
33
  ].include? type
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect
2
+ module Dynect
3
+ class DNS
4
4
  class Real
5
5
  # Get one or more zones
6
6
  #
@@ -1,11 +1,11 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect
2
+ module Dynect
3
+ class DNS
4
4
  class Real
5
5
  # Create a record
6
6
  #
7
7
  # ==== Parameters
8
- # * type<~String> - type of record in ['AAAA', 'ANY', 'A', 'CNAME', 'DHCID', 'DNAME', 'DNSKEY', 'DS', 'KEY', 'LOC', 'MX', 'NSA', 'NS', 'PTR', 'PX', 'RP', 'SOA', 'SPF', 'SRV', 'SSHFP', 'TXT']
8
+ # * type<~String> - type of record in ['AAAA', 'ALIAS', 'ANY', 'A', 'CNAME', 'DHCID', 'DNAME', 'DNSKEY', 'DS', 'KEY', 'LOC', 'MX', 'NSA', 'NS', 'PTR', 'PX', 'RP', 'SOA', 'SPF', 'SRV', 'SSHFP', 'TXT']
9
9
  # * zone<~String> - zone of record
10
10
  # * rdata<~Hash> - rdata for record
11
11
  # * options<~Hash>: (options vary by type, listing below includes common parameters)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect
2
+ module Dynect
3
+ class DNS
4
4
  class Real
5
5
  def post_session
6
6
  request(
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect
2
+ module Dynect
3
+ class DNS
4
4
  class Real
5
5
  # Create a zone
6
6
  #
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect
2
+ module Dynect
3
+ class DNS
4
4
  class Real
5
5
  # Update or replace a record
6
6
  #
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module DNS
3
- class Dynect
2
+ module Dynect
3
+ class DNS
4
4
  class Real
5
5
  # Update a zone
6
6
  #
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Dynect
3
- VERSION = '0.0.3'
3
+ VERSION = '0.5.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-dynect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wesley Beary
8
8
  - The fog team
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-17 00:00:00.000000000 Z
12
+ date: 2021-04-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -104,8 +104,10 @@ executables: []
104
104
  extensions: []
105
105
  extra_rdoc_files: []
106
106
  files:
107
+ - ".github/dependabot.yml"
108
+ - ".github/workflows/ruby.yml"
109
+ - ".github/workflows/stale.yml"
107
110
  - ".gitignore"
108
- - ".travis.yml"
109
111
  - CHANGELOG.md
110
112
  - CONTRIBUTING.md
111
113
  - CONTRIBUTORS.md
@@ -114,7 +116,6 @@ files:
114
116
  - README.md
115
117
  - Rakefile
116
118
  - fog-dynect.gemspec
117
- - gemfiles/Gemfile-1.8.7
118
119
  - lib/fog/bin/dynect.rb
119
120
  - lib/fog/dynect.rb
120
121
  - lib/fog/dynect/dns.rb
@@ -145,7 +146,7 @@ homepage: http://github.com/fog/fog-dynect
145
146
  licenses:
146
147
  - MIT
147
148
  metadata: {}
148
- post_install_message:
149
+ post_install_message:
149
150
  rdoc_options: []
150
151
  require_paths:
151
152
  - lib
@@ -160,10 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
161
  - !ruby/object:Gem::Version
161
162
  version: '0'
162
163
  requirements: []
163
- rubyforge_project:
164
- rubygems_version: 2.5.1
165
- signing_key:
164
+ rubygems_version: 3.2.15
165
+ signing_key:
166
166
  specification_version: 4
167
167
  summary: Module for the 'fog' gem to support Dynect DNS.
168
168
  test_files: []
169
- has_rdoc:
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 2.2
5
- - 2.1
6
- - 2.0
7
- - 1.9
8
- - jruby
9
-
10
- matrix:
11
- include:
12
- - rvm: 1.8.7
13
- gemfile: gemfiles/Gemfile-1.8.7
14
- - rvm: jruby-18mode
15
- gemfile: gemfiles/Gemfile-1.8.7
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem 'mime-types', '~> 1.16'
4
- gem 'nokogiri', '~> 1.5.11'
5
-
6
- gemspec :path => "../"