idcf-dns 0.0.7 → 0.0.8

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: 09205c0f89224e460fd1dccf2768a051bdd824fb
4
- data.tar.gz: 32ca6b5153e6a497f04b7c758359dcb03e998d53
3
+ metadata.gz: 3c46bdfd3b41dd1caca377fc533afec60ae9a0f6
4
+ data.tar.gz: 1600fc280708227e696767f06a6f9bf3e3fe37b4
5
5
  SHA512:
6
- metadata.gz: 475670a05e091e75b3345c89343a1ab7857d88df8f0e5246b7d58f71ef884abdfea2e01fb25ed27903371f7eba63dff3128d1a597b62a9bf3f8f4b664d074be9
7
- data.tar.gz: 2f5066946cf9f0551d88e4af1acf9537762e3074f8451c752536f4bd7ae04e3d9252aed396337bd2a36c5dffef1c1beb195d7e1d93f02cbfef3a23ceabb80a94
6
+ metadata.gz: e8b47c112840ff5552fad7e61b107450e0afb3ea3da6b63c99d1d8e8ae9dcc59124134c760c976c875589d467700cd2434c5b826a893eba1bd77c56fcafbc2fe
7
+ data.tar.gz: 8b92c57ed202e1d440e9308da1ba040e40064ae3b1bd7b1e89037472f14ae2f5a1ffc0fa9847a9c4746d0df0c4a988cfcbec98718e65a228aee9ff3e63d869ac
data/.gitignore CHANGED
@@ -9,3 +9,5 @@
9
9
  /tmp/
10
10
  /.env
11
11
  /.idea/
12
+ /vendor/bundle/
13
+ /.rspec_status
@@ -1,8 +1,8 @@
1
1
  AllCops:
2
2
  Exclude:
3
- - "Gemfile"
4
- - "*.gemspec"
3
+ - "vendor/**/*"
5
4
  DisplayCopNames: true
5
+ TargetRubyVersion: 2.1
6
6
 
7
7
  Documentation:
8
8
  Enabled: false
@@ -75,17 +75,19 @@ Style/SignalException:
75
75
  Style/SingleLineBlockParams:
76
76
  Enabled: false
77
77
 
78
- Style/SpaceAroundOperators:
79
- MultiSpaceAllowedForOperators:
80
- - "="
81
- - "=>"
82
- - "||="
78
+ Layout/SpaceAroundOperators:
79
+ AllowForAlignment: true
83
80
 
84
- Style/SpaceBeforeComma:
81
+ Layout/SpaceBeforeComma:
85
82
  Enabled: false
86
83
 
87
84
  Style/StringLiterals:
88
85
  EnforcedStyle: double_quotes
89
86
 
90
- Style/TrailingComma:
91
- Enabled: false
87
+ Style/TrailingCommaInLiteral:
88
+ EnforcedStyleForMultiline: comma
89
+
90
+ Metrics/BlockLength:
91
+ Exclude:
92
+ - "idcf-your.gemspec"
93
+ - "spec/**/*"
@@ -10,3 +10,5 @@ env:
10
10
  - secure: gmihQQUbvRFS817ekFXDFOvWRXRIvK66BXBIBiArroRb3C+J/xJJXR96ieJhWfEwW0P3nVFRLcDBV20lzt2+eqsmOX6O9lJXMHrJP0yi0aHVuDH5xgqSBHM3NtRDNG2MACYGC8dK2Jk/TlNi60TB4P51hUrb+mLyelYvrb1WAmtrNWchvG+YqWx5YP/3ONOS5HR8U6NR3xSHT4Rxw0Y+sBB7qba4QIwMO2wgufc0IOMddlB0KkOZru6rmI8hZR/Ko+eGqkMlV3wzD+brKumnuY/MM1l4VWbU4Ol+VMM7swXDDJyWZ5Uxo5dpkccAZNn59hKqShr6kPR9+FHSjHbWx2bb997Gy5bgsJtSQYqbqurHSAmcI8UhTC0vyyp+gyZxTN93CL0AoyWRqFB4bfQHjhrl9mdIO9R3SrMe2tuyOmqLkPL0JZbaiSszkMya+C9VzuD21UJUTLyz4ldHOcng94S3TuLvfeoK9auQwJVBclW9KjwjvovNRdYjYa5pM37kHWmhzZB6tyZvsy8GrrenxJd2gBZ/w7g2zUoKutbC4DW1TNSzSL8e5UKRxFOyZaV0xNmqZ6SQVOHrUdbX+ouMsVZOXCQseBcCMXzcyyalMJLg8DecR8H4rrmdrBD6XSYofjIn6r2efiFs8OHrDMiM16KAmbvdaspceUfZi+SsVRY=
11
11
  - secure: N3W1pF66bVNCOG5tLk0xPOGP48mODYcNHEiQ/n4yhlHi2Ckoj/R7DT4koqSI12o5ajm2lBdAcw0A0SRsPIORi7j4QIGvXhY3mY3HmP1kK4oUr/X5C+RRNSQ//+x6U+Xs4dNDpR/fIv1+jIOXFYXVejY8Mu8+OrXmJBdbsGr+xWN2qI9vi0vztLB0bqrQG58moAj3W7yEC0UTwsS683nvOnXWSQQN86MS/1aTTAScFbMwQDZRdzuu+Zh0ZfzM4BzsDCRYrc2cv5Foj8a6VxeB57TQwQ8mkSmsupr4AyTS5H2TqqaBxPuS9KloOIx3jLVr52Iq8mCHjcFCM4xCXiRIIFeuMPe83V5yTFq73pY5HpJsLCaXOguuVD6vov2iyBe3Ih06BSVytVpyRZJNflfBoqU8Z/iK5Rvsj4w+mxBI4jd0mLmDVm91K2MImOGf5Ghe7Y2eokAuJ3LXHFIFQbjI6AC5RYIlb8iYWtPPA0yuVWc+Z4jxcHwt1mDq2rlFz+/sQlgYvQkeL4UVQ9iRKRe0RQXrwFZi+Qb1rPJiu0lld9cNBy1Z52HfYO5WFYVvOZzQbzw51HhXqUzIttYlEOkY9ZCuZp+3eFSVBdej8/upbU/NaQ5jM4baXz6KgitXN3OqDQHPD7brinMbKxSwnc9kanj9ietMyowsCJVzrrsI62E=
12
12
  - secure: nXMDbYg/8Fd2EEGqPitCrK544eZJ+u9liPPjkiHYyLB+zhD9bslV9XzrDpWi7sjiwtZcgF/E7jTC3nmInn85idt7exS81mBPCO3hMmZk8sBp/zefmVIIti/9PKfjfYihxdWQVJXiLPVyYEmuWvZv11wCyWG5/vyuP3LSQHdmnaiU82xPTVJBLMJobusoyae8voMIVjepNH4BHmZ2fC4SdZ/ajbFcxwy+o0GLRJDaypJTn7UejX0wAGykqDtRY4LVTpPfaSiMEjegL6HIOc6cTuuQ0/AhK9Aw1fuNecrom+LTZtNGUUmNUzDr1F2C71txQ3vc1OaifB0E0PBNiwG6nhh2QKPJhG7KlqUN5mspyfZDp93N+VvnqPIbxvpVIIDcQR6e6Mug1Wm0fvtcB6weNAbp3sNqMH8NUXSGZdZHrWsQPKSEUp7iKiTqSY5kLbLpxqI6dNfcDoJ7J36ExmIPkj7rlgfCllFBGFOEeR33ydTjUDDWWoDmB8NBV0Pf8RiTq9AcBE3r7nHcSDFYEzX0MOCLikqujLOd5uuQp4Us8HQOyMtIrQEMqlHpAfNu0Uu2Sdd04zo5ndgDx2eTEwZYRCqzDllBvNWzk/Wgbd1qW9xh67vKsD9Ixo/t8kS8ge15naaO392i+UrRTcXwQwOiLHaUDXY4R9DD2NKkZtIysS8=
13
+ after_success:
14
+ - bundle exec codeclimate-test-reporter
data/Gemfile CHANGED
@@ -1,4 +1,8 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
+
3
+ if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.2.2")
4
+ gem "activesupport", ">= 4.2", "< 5.0.0"
5
+ end
2
6
 
3
7
  # Specify your gem's dependencies in idcf-dns.gemspec
4
8
  gemspec
data/README.md CHANGED
@@ -22,6 +22,10 @@ Or install it yourself as:
22
22
 
23
23
  $ gem install idcf-dns
24
24
 
25
+ ## Dependencies
26
+
27
+ * Ruby 2.1.10 or higher
28
+
25
29
  ## Usage
26
30
  ### Basic usage
27
31
  #### Client
data/Rakefile CHANGED
@@ -1,13 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
4
  require "rspec/core/rake_task"
3
- require "rubocop/rake_task"
4
5
 
5
6
  RSpec::Core::RakeTask.new(:spec)
6
- task default: [:rubocop, :spec]
7
7
 
8
- desc "Run RuboCop on the lib directory"
9
- RuboCop::RakeTask.new(:rubocop) do |task|
10
- task.patterns = ["lib/**/*.rb", "spec/**/*.rb"]
11
- task.formatters = ["files"]
12
- task.fail_on_error = true
13
- end
8
+ task default: :spec
@@ -1,31 +1,34 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
2
+
3
+ lib = File.expand_path("../lib", __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'idcf/dns/version'
5
+ require "idcf/dns/version"
5
6
 
6
7
  Gem::Specification.new do |spec|
7
8
  spec.name = "idcf-dns"
8
9
  spec.version = Idcf::Dns::VERSION
9
- spec.authors = ["nownabe"]
10
- spec.email = ["nownabe@gmail.com"]
10
+ spec.authors = ["IDC Frontier Inc."]
11
11
 
12
- spec.summary = %q{A Ruby client for IDCF Cloud DNS Service.}
12
+ spec.summary = "A Ruby client for IDCF Cloud DNS Service."
13
13
  spec.homepage = "https://github.com/idcf/idcf-dns-ruby"
14
14
 
15
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
15
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
16
+ f.match(%r{^(test|spec|features)/})
17
+ end
16
18
  spec.bindir = "exe"
17
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
20
  spec.require_paths = ["lib"]
19
21
 
20
- spec.add_development_dependency "bundler"
21
- spec.add_development_dependency "codeclimate-test-reporter"
22
22
  spec.add_development_dependency "dotenv"
23
- spec.add_development_dependency "rake"
24
- spec.add_development_dependency "rspec"
25
- spec.add_development_dependency "rubocop"
23
+ spec.add_development_dependency "bundler", "~> 1.14"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "rspec", "~> 3.0"
26
26
  spec.add_development_dependency "simplecov"
27
+ spec.add_development_dependency "awesome_print"
28
+
29
+ spec.add_runtime_dependency "activesupport"
30
+ spec.add_runtime_dependency "faraday"
31
+ spec.add_runtime_dependency "faraday_middleware"
27
32
 
28
- spec.add_dependency "activesupport", "~> 4.2.3"
29
- spec.add_dependency "faraday", "~> 0.9.1"
30
- spec.add_dependency "faraday_middleware", "~> 0.10.0"
33
+ spec.required_ruby_version = ">= 2.1.10"
31
34
  end
@@ -14,12 +14,13 @@ module Idcf
14
14
  #
15
15
  # @param [String] api_key API key for IDCF Cloud
16
16
  # @param [String] secret_key Secret key for IDCF Cloud
17
- def initialize(api_key:,
18
- secret_key:,
19
- host: "dns.idcfcloud.com",
20
- endpoint: "/api/v1",
21
- verify_ssl: true
22
- )
17
+ def initialize(
18
+ api_key:,
19
+ secret_key:,
20
+ host: "dns.idcfcloud.com",
21
+ endpoint: "/api/v1",
22
+ verify_ssl: true
23
+ )
23
24
 
24
25
  @api_key = api_key
25
26
  @secret_key = secret_key
@@ -7,5 +7,4 @@ module Idcf
7
7
  end
8
8
 
9
9
  require "idcf/dns/client_extensions/record"
10
- require "idcf/dns/client_extensions/template"
11
10
  require "idcf/dns/client_extensions/zone"
@@ -7,11 +7,11 @@ module Idcf
7
7
  #
8
8
  # @param zone_uuid [String] UUID of zone
9
9
  # @param attributes [Hash] request attributes
10
- # @option attributes [String] :name name of record
11
- # @option attributes [String] :type type of record
10
+ # @option attributes [String] :name name of record (required)
11
+ # @option attributes [String] :type type of record (required)
12
12
  # (A, AAAA, CNAME, MX, TXT or SRV)
13
- # @option attributes [String] :content content of record
14
- # @option attributes [Integer] :ttl TTL
13
+ # @option attributes [String] :content content of record (required)
14
+ # @option attributes [Integer] :ttl TTL (required)
15
15
  # @option attributes [Integer] :priority priority of record
16
16
  # @param headers [Hash] HTTP request headers
17
17
  # @return [Response] HTTP response object
@@ -189,7 +189,7 @@ module Idcf
189
189
  # @param headers [Hash] HTTP request headers
190
190
  # @return [Resources::Record] a record object
191
191
  def record(zone_uuid, uuid, headers = {})
192
- Resources::Record.new(self, get_record(uuid, zone_uuid, headers).body)
192
+ Resources::Record.new(self, get_record(zone_uuid, uuid, headers).body)
193
193
  end
194
194
 
195
195
  # Get an array of existing record objects.
@@ -258,6 +258,46 @@ module Idcf
258
258
  put!("zones/#{uuid}", attributes, headers)
259
259
  end
260
260
 
261
+ # Get a verify token.
262
+ #
263
+ # @param uuid [String] UUID of target zone
264
+ # @param headers [Hash] HTTP request headers
265
+ # @return [Response] HTTP response object
266
+ # @example
267
+ # response =
268
+ # client.get_token(
269
+ # "384178f5-58a5-4f3c-9607-5e189ab2990d"
270
+ # )
271
+ #
272
+ # response.body #=>
273
+ # {"TXT"=>["idcf-dns-token=0123456789abcdef0123456789abcdef"],
274
+ # "NS"=>[
275
+ # "0123456789abcdef0123456789abcdef.dns-verify.idc.jp",
276
+ # "ns01.idcfcloud.com",
277
+ # "ns02.idcfcloud.com",
278
+ # "ns03.idcfcloud.com"
279
+ # ]}
280
+ def get_token(uuid, headers = {})
281
+ get!("zones/#{uuid}/token", {}, headers)
282
+ end
283
+
284
+ # Verify a zone.
285
+ #
286
+ # @param uuid [String] UUID of target zone
287
+ # @param headers [Hash] HTTP request headers
288
+ # @return [Response] HTTP response object
289
+ # @example
290
+ # response =
291
+ # client.verify_zone(
292
+ # "384178f5-58a5-4f3c-9607-5e189ab2990d"
293
+ # )
294
+ #
295
+ # response.body #=>
296
+ # {}
297
+ def verify_zone(uuid, headers = {})
298
+ post!("zones/#{uuid}/verify", {}, headers)
299
+ end
300
+
261
301
  # Get a zone object.
262
302
  #
263
303
  # @param uuid [String] UUID of target zone
@@ -48,7 +48,8 @@ module Idcf
48
48
  {
49
49
  "X-IDCF-Signature" => signature,
50
50
  "X-IDCF-APIKEY" => api_key,
51
- "X-IDCF-Expires" => expires
51
+ "X-IDCF-Expires" => expires,
52
+ "User-Agent" => "IDCF DNS API Client v#{VERSION}",
52
53
  }
53
54
  end
54
55
 
@@ -89,7 +90,7 @@ module Idcf
89
90
  path,
90
91
  api_key,
91
92
  expires,
92
- ""
93
+ "",
93
94
  ].join("\n")
94
95
  end
95
96
  end
@@ -37,7 +37,7 @@ module Idcf
37
37
  0
38
38
  end
39
39
  end
40
- alias_method :size, :count
40
+ alias size count
41
41
 
42
42
  # Returns error message.
43
43
  # When request succeed, this returns nil.
@@ -8,7 +8,7 @@ module Idcf
8
8
  class_attribute :valid_attributes
9
9
 
10
10
  class << self
11
- # Validate requeste attributes.
11
+ # Validate request attributes.
12
12
  # If there are invalid attributes, error occurs.
13
13
  #
14
14
  # @param attributes [Hash] request attributes
@@ -10,9 +10,12 @@ module Idcf
10
10
  type: { type: RECORD_TYPES, create: :required, update: :optional },
11
11
  content: { type: [String, Hash], create: :required, update: :optional },
12
12
  ttl: { type: Integer, create: :required, update: :optional },
13
+ weight: { type: Integer, create: :optional, update: :optional },
14
+ description: { type: String, create: :optional, update: :optional },
13
15
  priority: { type: [Integer, NilClass], create: :optional },
14
16
  created_at: { type: String },
15
- updated_at: { type: String }
17
+ updated_at: { type: String },
18
+ healthcheck: { type: Hash, create: :optional, update: :optional },
16
19
  }
17
20
  end
18
21
  end
@@ -10,7 +10,7 @@ module Idcf
10
10
  default_ttl: { type: Integer, create: :required, update: :optional },
11
11
  created_at: { type: String },
12
12
  updated_at: { type: String },
13
- records: { type: Array, reader: false }
13
+ records: { type: Array, reader: false },
14
14
  }
15
15
  end
16
16
  end
@@ -9,10 +9,11 @@ module Idcf
9
9
  email: { type: String, create: :required, update: :optional },
10
10
  description: { type: String, create: :optional, update: :optional },
11
11
  default_ttl: { type: Integer, create: :required, update: :optional },
12
+ authenticated: { type: String },
12
13
  template_uuid: { type: String, create: :optional },
13
14
  created_at: { type: String },
14
15
  updated_at: { type: String },
15
- records: { type: Array, reader: false }
16
+ records: { type: Array, reader: false },
16
17
  }
17
18
  end
18
19
  end
@@ -1,5 +1,5 @@
1
1
  module Idcf
2
2
  module Dns
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,31 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idcf-dns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
- - nownabe
7
+ - IDC Frontier Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-10 00:00:00.000000000 Z
11
+ date: 2018-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: codeclimate-test-reporter
14
+ name: dotenv
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - ">="
@@ -39,49 +25,49 @@ dependencies:
39
25
  - !ruby/object:Gem::Version
40
26
  version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
- name: dotenv
28
+ name: bundler
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
- - - ">="
31
+ - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: '0'
33
+ version: '1.14'
48
34
  type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - ">="
38
+ - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: '0'
40
+ version: '1.14'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rake
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - ">="
45
+ - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '0'
47
+ version: '10.0'
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - ">="
52
+ - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: '0'
54
+ version: '10.0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rspec
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - ">="
59
+ - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: '0'
61
+ version: '3.0'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - ">="
66
+ - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: '0'
68
+ version: '3.0'
83
69
  - !ruby/object:Gem::Dependency
84
- name: rubocop
70
+ name: simplecov
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
73
  - - ">="
@@ -95,7 +81,7 @@ dependencies:
95
81
  - !ruby/object:Gem::Version
96
82
  version: '0'
97
83
  - !ruby/object:Gem::Dependency
98
- name: simplecov
84
+ name: awesome_print
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
87
  - - ">="
@@ -112,47 +98,46 @@ dependencies:
112
98
  name: activesupport
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - "~>"
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
- version: 4.2.3
103
+ version: '0'
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - "~>"
108
+ - - ">="
123
109
  - !ruby/object:Gem::Version
124
- version: 4.2.3
110
+ version: '0'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: faraday
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
- - - "~>"
115
+ - - ">="
130
116
  - !ruby/object:Gem::Version
131
- version: 0.9.1
117
+ version: '0'
132
118
  type: :runtime
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
- - - "~>"
122
+ - - ">="
137
123
  - !ruby/object:Gem::Version
138
- version: 0.9.1
124
+ version: '0'
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: faraday_middleware
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
- - - "~>"
129
+ - - ">="
144
130
  - !ruby/object:Gem::Version
145
- version: 0.10.0
131
+ version: '0'
146
132
  type: :runtime
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
- - - "~>"
136
+ - - ">="
151
137
  - !ruby/object:Gem::Version
152
- version: 0.10.0
138
+ version: '0'
153
139
  description:
154
- email:
155
- - nownabe@gmail.com
140
+ email:
156
141
  executables: []
157
142
  extensions: []
158
143
  extra_rdoc_files: []
@@ -172,7 +157,6 @@ files:
172
157
  - lib/idcf/dns/client.rb
173
158
  - lib/idcf/dns/client_extensions.rb
174
159
  - lib/idcf/dns/client_extensions/record.rb
175
- - lib/idcf/dns/client_extensions/template.rb
176
160
  - lib/idcf/dns/client_extensions/zone.rb
177
161
  - lib/idcf/dns/errors.rb
178
162
  - lib/idcf/dns/request.rb
@@ -198,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
198
182
  requirements:
199
183
  - - ">="
200
184
  - !ruby/object:Gem::Version
201
- version: '0'
185
+ version: 2.1.10
202
186
  required_rubygems_version: !ruby/object:Gem::Requirement
203
187
  requirements:
204
188
  - - ">="
@@ -206,9 +190,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
190
  version: '0'
207
191
  requirements: []
208
192
  rubyforge_project:
209
- rubygems_version: 2.4.5
193
+ rubygems_version: 2.6.8
210
194
  signing_key:
211
195
  specification_version: 4
212
196
  summary: A Ruby client for IDCF Cloud DNS Service.
213
197
  test_files: []
214
- has_rdoc:
@@ -1,59 +0,0 @@
1
- module Idcf
2
- module Dns
3
- module ClientExtensions
4
- # SDK APIs for template resource
5
- module Template
6
- # Create a new template.
7
- #
8
- # @param attributes [Hash] request attributes
9
- # @option attributes [String] :name unique name of template (required)
10
- # @option attributes [String] :description description
11
- # @option attributes [Integer] :default_ttl default TTL (required)
12
- # @param headers [Hash] HTTP request headers
13
- # @return [Response] HTTP response object
14
- def create_template(attributes, headers = {})
15
- Validators::Template.validate_attributes!(attributes, :create)
16
- post!("templates", attributes, headers)
17
- end
18
-
19
- # Delete a template.
20
- #
21
- # @param uuid [String] UUID of the target template
22
- # @param headers [Hash] HTTP request headers
23
- # @return [Response] HTTP response object
24
- def delete_template(uuid, headers = {})
25
- delete!("templates/#{uuid}", {}, headers)
26
- end
27
-
28
- # Get a template.
29
- #
30
- # @param uuid [String] UUID of the target template
31
- # @param headers [Hash] HTTP request headers
32
- # @return [Response] HTTP response object
33
- def get_template(uuid, headers = {})
34
- get!("templates/#{uuid}", {}, headers)
35
- end
36
-
37
- # Get list of existing templates.
38
- #
39
- # @param headers [Hash] HTTP request headers
40
- # @return [Response] HTTP response object
41
- def list_templates(headers = {})
42
- get!("templates", {}, headers)
43
- end
44
-
45
- # Update a template.
46
- #
47
- # @param uuid [String] UUID of the target template
48
- # @param attributes [Hash] request attributes
49
- # @option attributes [String] :description
50
- # @option attributes [Integer] :default_ttl default TTL
51
- # @return [Reponse] HTTP response object
52
- def update_template(uuid, attributes, headers = {})
53
- Validators::Template.validate_attributes!(attributes, :update)
54
- put!("templates/#{uuid}", attributes, headers)
55
- end
56
- end
57
- end
58
- end
59
- end