idcf-dns 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +12 -10
- data/.travis.yml +2 -0
- data/Gemfile +5 -1
- data/README.md +4 -0
- data/Rakefile +3 -8
- data/idcf-dns.gemspec +17 -14
- data/lib/idcf/dns/client.rb +7 -6
- data/lib/idcf/dns/client_extensions.rb +0 -1
- data/lib/idcf/dns/client_extensions/record.rb +5 -5
- data/lib/idcf/dns/client_extensions/zone.rb +40 -0
- data/lib/idcf/dns/request.rb +3 -2
- data/lib/idcf/dns/response.rb +1 -1
- data/lib/idcf/dns/validators/base.rb +1 -1
- data/lib/idcf/dns/validators/record.rb +4 -1
- data/lib/idcf/dns/validators/template.rb +1 -1
- data/lib/idcf/dns/validators/zone.rb +2 -1
- data/lib/idcf/dns/version.rb +1 -1
- metadata +34 -51
- data/lib/idcf/dns/client_extensions/template.rb +0 -59
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3c46bdfd3b41dd1caca377fc533afec60ae9a0f6
|
|
4
|
+
data.tar.gz: 1600fc280708227e696767f06a6f9bf3e3fe37b4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8b47c112840ff5552fad7e61b107450e0afb3ea3da6b63c99d1d8e8ae9dcc59124134c760c976c875589d467700cd2434c5b826a893eba1bd77c56fcafbc2fe
|
|
7
|
+
data.tar.gz: 8b92c57ed202e1d440e9308da1ba040e40064ae3b1bd7b1e89037472f14ae2f5a1ffc0fa9847a9c4746d0df0c4a988cfcbec98718e65a228aee9ff3e63d869ac
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
AllCops:
|
|
2
2
|
Exclude:
|
|
3
|
-
- "
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
- "="
|
|
81
|
-
- "=>"
|
|
82
|
-
- "||="
|
|
78
|
+
Layout/SpaceAroundOperators:
|
|
79
|
+
AllowForAlignment: true
|
|
83
80
|
|
|
84
|
-
|
|
81
|
+
Layout/SpaceBeforeComma:
|
|
85
82
|
Enabled: false
|
|
86
83
|
|
|
87
84
|
Style/StringLiterals:
|
|
88
85
|
EnforcedStyle: double_quotes
|
|
89
86
|
|
|
90
|
-
Style/
|
|
91
|
-
|
|
87
|
+
Style/TrailingCommaInLiteral:
|
|
88
|
+
EnforcedStyleForMultiline: comma
|
|
89
|
+
|
|
90
|
+
Metrics/BlockLength:
|
|
91
|
+
Exclude:
|
|
92
|
+
- "idcf-your.gemspec"
|
|
93
|
+
- "spec/**/*"
|
data/.travis.yml
CHANGED
|
@@ -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
data/README.md
CHANGED
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
|
-
|
|
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
|
data/idcf-dns.gemspec
CHANGED
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
lib = File.expand_path("../lib", __FILE__)
|
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
-
require
|
|
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 = ["
|
|
10
|
-
spec.email = ["nownabe@gmail.com"]
|
|
10
|
+
spec.authors = ["IDC Frontier Inc."]
|
|
11
11
|
|
|
12
|
-
spec.summary =
|
|
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
|
|
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 "
|
|
24
|
-
spec.add_development_dependency "
|
|
25
|
-
spec.add_development_dependency "
|
|
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.
|
|
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
|
data/lib/idcf/dns/client.rb
CHANGED
|
@@ -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(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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,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(
|
|
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
|
data/lib/idcf/dns/request.rb
CHANGED
|
@@ -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
|
data/lib/idcf/dns/response.rb
CHANGED
|
@@ -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
|
|
@@ -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
|
data/lib/idcf/dns/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- IDC Frontier Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-02-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
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:
|
|
28
|
+
name: bundler
|
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
|
44
30
|
requirements:
|
|
45
|
-
- - "
|
|
31
|
+
- - "~>"
|
|
46
32
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
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: '
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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.
|
|
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
|