onlyoffice_digitalocean_wrapper 0.4.0 → 0.4.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
  SHA256:
3
- metadata.gz: e8ffe80e6adc5bdef71b4a9f02dff5bc87aca9a6906390083a16ee9baa4a58d8
4
- data.tar.gz: 3b9e1844f675d02a7f9e684eac9971cb21cb3e77a9d69b891e42fcdd320e8efe
3
+ metadata.gz: 0756716e26a6789e98ffc4a22d58cb04587a93536680b183e600c233ae313dc8
4
+ data.tar.gz: de4e2ef86ffac922ad2c44d65e8034320db3f18137d2a64d491e7314cdcb9413
5
5
  SHA512:
6
- metadata.gz: df597884080804a5fd4e10f538c75c330caba13b30d96059315564ebdc12abf2ffb01b571caef39f3c031da649c5a3da5d2ffb5a08c4d86bdb99d3dde65f2cfa
7
- data.tar.gz: df257f67704271ee1307ebdbe54cfbf06b71aae653b4923cbcd3febfc844b8f19c6182923a6331d262e2856e0a5eca225a0df5b5512c6f1cb82ae42a99cfbec4
6
+ metadata.gz: 2d9c8941038d5e597f50fdce3d210f52d1902377b02e6c37c7b3f7fc6ac177de27d000f6da7edb28548d41029347694ada56467412746ac41a16368d1c892894
7
+ data.tar.gz: 101b02d252365ea34d1888e0452c7ce49bdf0e3f640e4566d322a52c28fe463b4af3e9b277a8266d7e111cc2c39dd7f4887c3b045b896f35c19ed1d579c2025b
@@ -40,7 +40,7 @@ module OnlyofficeDigitaloceanWrapper
40
40
  return
41
41
  end
42
42
  retry_exception do
43
- ip = droplet.networks.first.first.ip_address
43
+ ip = public_ip(droplet)
44
44
  OnlyofficeLoggerHelper.log("get_droplet_ip_by_name(#{droplet_name}): #{ip}")
45
45
  ip
46
46
  end
@@ -60,5 +60,14 @@ module OnlyofficeDigitaloceanWrapper
60
60
  end
61
61
  end
62
62
  end
63
+
64
+ # Get public ip of droplet
65
+ # @param [DropletKit] droplet to get ip
66
+ # @return [String] public ip
67
+ def public_ip(droplet)
68
+ networks = droplet.networks.to_a.first
69
+ public_network = networks.find { |net| net.type == 'public'}
70
+ public_network.ip_address
71
+ end
63
72
  end
64
73
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OnlyofficeDigitaloceanWrapper
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
5
5
  NAME = 'onlyoffice_digitalocean_wrapper'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onlyoffice_digitalocean_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ONLYOFFICE
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-03-20 00:00:00.000000000 Z
13
+ date: 2020-10-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: droplet_kit
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  requirements: []
97
- rubygems_version: 3.0.6
97
+ rubygems_version: 3.1.4
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: Wrapper gem for DigitalOcean