reg.api2 0.0.15 → 0.0.16
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/CHANGES.md +13 -1
- data/lib/reg_api2/shop.rb +2 -2
- data/lib/reg_api2/version.rb +1 -1
- data/lib/reg_api2/zone.rb +12 -0
- data/spec/lib/reg_api2/zone_spec.rb +16 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79da4832b7af3be9e6a3926e32fbaecceb7239b7
|
4
|
+
data.tar.gz: f75b33ea5a0e9e1be9efd9fd7c511b7bbd7ade1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46007e8473052069652558e4a126a44e353e1752d23dc55b629ca9700b8dae6123a85ca68abb87f85d4c2679264404bdea9213969e56e96fe7f634724dde6ef8
|
7
|
+
data.tar.gz: 22202bbb2bf1173e27d071cf643854cc5bd0a86f3c5e7478b72972ff108fad95365a21743f78d1a9c99a8413370a3d0156ca20877a9d285e389682d755e2a171
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
+
## Version 0.0.16
|
4
|
+
|
5
|
+
* `zone.add_spf` method added.
|
6
|
+
|
7
|
+
## Version 0.0.15
|
8
|
+
|
9
|
+
* `hosting.get_parallelswpb_constructor_url` method added.
|
10
|
+
|
11
|
+
## Version 0.0.14
|
12
|
+
|
13
|
+
* New API category: `shop`.
|
14
|
+
* RSpec upgraded to version 3.
|
15
|
+
|
3
16
|
## Version 0.0.12
|
4
17
|
|
5
18
|
* `service.refill` method.
|
@@ -14,4 +27,3 @@
|
|
14
27
|
|
15
28
|
* Methods of `bill` category now returns array of bills directly instead of `{ 'bills' => [ ... ] }`.
|
16
29
|
* Documentation updated.
|
17
|
-
|
data/lib/reg_api2/shop.rb
CHANGED
@@ -15,13 +15,13 @@ module RegApi2
|
|
15
15
|
# @return [String] lot identifier or nil.
|
16
16
|
define :nop
|
17
17
|
|
18
|
-
|
18
|
+
# @!method add_lot
|
19
19
|
# @param opts Opts
|
20
20
|
# adding lot/lots.
|
21
21
|
# @return [void] Nothing.
|
22
22
|
define :add_lot
|
23
23
|
|
24
|
-
|
24
|
+
# @!method update_lot
|
25
25
|
# @param opts Opts
|
26
26
|
# Update lot/lots.
|
27
27
|
# @return [void] Nothing.
|
data/lib/reg_api2/version.rb
CHANGED
data/lib/reg_api2/zone.rb
CHANGED
@@ -111,6 +111,18 @@ module RegApi2
|
|
111
111
|
# RegApi2.zone.add_srv domains: [ { dname: "test.ru" }, { dname: "test.com" } ], service: "_sip._udp", priority: 0, port: 5060, target: "sip.test.ru"
|
112
112
|
define :add_srv, required: { service: {}, priority: { re: /\A\d+\z/ }, target: {}, port: { re: /\A\d+\z/ } }, optional: { weight: { re: /\A\d+\z/ } }
|
113
113
|
|
114
|
+
# @!method add_spf(opts = {})
|
115
|
+
# @param [Hash] opts
|
116
|
+
# @option opts [String] :subdomain Subdomain name.
|
117
|
+
# @option opts [String] :text SPF record text.
|
118
|
+
# Creates a SPF (sender policy framework) resource record up to 512 octets in length.
|
119
|
+
# @return [Hash(domains)] A list of domains with results.
|
120
|
+
# @note Support of service lists: yes
|
121
|
+
# @note Accessibility: clients
|
122
|
+
# @example Create SPF record.
|
123
|
+
# RegApi2.zone.add_spf domains: [ { dname: "test.ru" }, { dname: "test.com" } ], subdomain: "@", text: 'v=spf1 include:_spf.google.com ~all'
|
124
|
+
define :add_spf, required: { subdomain: {}, text: { re: /\Av=spf1/ } }
|
125
|
+
|
114
126
|
# @!method get_resource_records(opts = {})
|
115
127
|
# Use this fuction to get zone resource records for each domains.
|
116
128
|
# @param [Hash] opts
|
@@ -10,12 +10,12 @@ describe RegApi2::Zone do
|
|
10
10
|
it "should raise when no args" do
|
11
11
|
expect { zone.nop }.to raise_error
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
it "should return domains if specified" do
|
15
15
|
ans = zone.nop(domains: [ { dname: "test.ru" }, { dname: "test.com" } ])
|
16
16
|
expect(ans.domains.map(&:servtype)).to eq([ 'domain', 'domain' ])
|
17
17
|
expect(ans.domains.map(&:result)).to eq([ 'success', 'success' ])
|
18
|
-
end
|
18
|
+
end
|
19
19
|
end
|
20
20
|
|
21
21
|
describe :add_alias do
|
@@ -137,6 +137,17 @@ describe RegApi2::Zone do
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
|
+
describe :add_spf do
|
141
|
+
it "should add SPF records" do
|
142
|
+
ans = zone.add_spf(
|
143
|
+
domains: [ { dname: "test.ru" }, { dname: "test.com" } ],
|
144
|
+
subdomain: '@',
|
145
|
+
text: "v=spf1 include:_spf.google.com ~all"
|
146
|
+
)
|
147
|
+
expect(ans.domains.map(&:result)).to eq([ 'success', 'success' ])
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
140
151
|
describe :get_resource_records do
|
141
152
|
it "should get resource records" do
|
142
153
|
ans = zone.get_resource_records(
|
@@ -208,9 +219,9 @@ describe RegApi2::Zone do
|
|
208
219
|
describe :remove_record do
|
209
220
|
it "Should delete A record with 111.111.111.111 ip from @" do
|
210
221
|
ans = zone.remove_record(
|
211
|
-
domains: [ { dname: "test.ru" }, { dname: "test.com" } ],
|
212
|
-
subdomain: '@',
|
213
|
-
content: '111.111.111.111',
|
222
|
+
domains: [ { dname: "test.ru" }, { dname: "test.com" } ],
|
223
|
+
subdomain: '@',
|
224
|
+
content: '111.111.111.111',
|
214
225
|
record_type: :A
|
215
226
|
)
|
216
227
|
expect(ans.domains.map(&:result)).to eq([ 'success', 'success' ])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reg.api2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akzhan Abdulin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yajl-ruby
|