onlyoffice_digitalocean_wrapper 0.1.0 → 0.6.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: 94fccd0b0f0384b0a7ed421e65c7e90726641e61
4
- data.tar.gz: 0ee556325a69a1a183ea610675beb8b938d3df32
2
+ SHA256:
3
+ metadata.gz: 2a48169cbc53f211b24f0956d8591465c7569450a04fa7f38a4614d004f7e748
4
+ data.tar.gz: aeda8616dfbc66abe0674cd79daf564b1aa98941b1eb66cc08aa03c9af831282
5
5
  SHA512:
6
- metadata.gz: 6831cb41c10316979e73d3bf13be472927435783ca49bbbaaa89c3681ebbe528f343f3f342dbda077d217d9790658aa7e2877ca3ae60588e05470bd31c8bbdff
7
- data.tar.gz: e4193acf767e774180c9c66e35300ad50121821afe505da3fb3c25a9d8e30d3c501bbc989e8970a0f8539aaae924ffc41835895c5db4332eca9470756060d8f1
6
+ metadata.gz: 05c74d20d448499946ef83c8710aed8f7fcdf2bebd65b6f522c672f602956868920b4377056fc505ce5ac6b0a6fef364f9a0a23547cdab43713cbc24112a4902
7
+ data.tar.gz: 7da944f64237a89ecf4bc966099c8ab102e783ca5d262075159bb8e5b2fbf37c44e2379ed6307d0c3880bdbbd361eb2b40787527b66139df3b910ab099cfe8e6
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'onlyoffice_digitalocean_wrapper/digitalocean_wrapper'
2
4
  require_relative 'onlyoffice_digitalocean_wrapper/version'
@@ -1,130 +1,77 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'droplet_kit'
2
- require 'onlyoffice_logger_helper'
3
4
  require_relative 'digitalocean_wrapper/digitalocean_exceptions'
5
+ require_relative 'digitalocean_wrapper/exceptions_retryer'
6
+ require_relative 'digitalocean_wrapper/getters'
7
+ require_relative 'digitalocean_wrapper/logger_wrapper'
8
+ require_relative 'digitalocean_wrapper/power_actions'
9
+ require_relative 'digitalocean_wrapper/token_methods'
4
10
 
11
+ # Namespace for this gem
5
12
  module OnlyofficeDigitaloceanWrapper
6
13
  # Class for wrapping DigitalOcean API gem
7
14
  class DigitalOceanWrapper
15
+ include Getters
16
+ include LoggerWrapper
17
+ include ExceptionsRetryer
18
+ include PowerActions
19
+ include TokenMethods
20
+
21
+ # @return [Array<String>] list of allowed droplet sizes
22
+ DROPLET_SIZES = %w[512mb 1gb 2gb 4gb 8gb 16gb 32gb 48gb 64gb].freeze
8
23
  attr_accessor :client
9
24
 
10
25
  def initialize(access_token = nil)
11
- access_token ||= DigitalOceanWrapper.read_token
26
+ access_token ||= read_token
12
27
  @client = DropletKit::Client.new(access_token: access_token)
13
28
  raise ArgumentError, 'DigitalOceanWrapper: Your Access Token is Incorrect' unless correct_access_token?
14
29
  end
15
30
 
16
- # Check if access token is correct
17
- # @return [true, false] result of check
18
- def correct_access_token?
19
- begin
20
- @client.droplets.all.first
21
- rescue DropletKit::Error
22
- return false
23
- end
24
- true
25
- end
26
-
27
- # Check if token is correct. If not trying to read new token
28
- # If reading failed - fail
29
- def assure_correct_token
30
- return if correct_access_token?
31
- @client = DropletKit::Client.new(access_token: DigitalOceanWrapper.read_token)
32
- return if correct_access_token?
33
- raise ArgumentError, 'Access token for DigitalOcean API is incorrect'
34
- end
35
-
36
- def get_image_id_by_name(image_name)
37
- assure_correct_token
38
- all_droplets = @client.images.all
39
- image = all_droplets.find { |x| x.name == image_name }
40
- raise DigitalOceanImageNotFound, image_name if image.nil?
41
- OnlyofficeLoggerHelper.log("get_image_id_by_name(#{image_name}): #{image.id}")
42
- image.id
43
- end
44
-
45
- # Get droplet by its name
46
- # @param [String] droplet_name
47
- # @return [DropletKit::Droplet] droplet
48
- def droplet_by_name(droplet_name)
49
- assure_correct_token
50
- droplets = @client.droplets.all
51
- droplets.find { |x| x.name == droplet_name }
52
- end
53
-
54
- def get_droplet_id_by_name(droplet_name)
55
- droplet = droplet_by_name(droplet_name)
56
- if droplet.nil?
57
- OnlyofficeLoggerHelper.log("get_droplet_id_by_name(#{droplet_name}): not found any droplets")
58
- nil
59
- else
60
- OnlyofficeLoggerHelper.log("get_droplet_id_by_name(#{droplet_name}): #{droplet.id}")
61
- droplet.id
62
- end
63
- end
64
-
65
- def get_droplet_ip_by_name(droplet_name)
66
- droplet = droplet_by_name(droplet_name)
67
- if droplet.nil?
68
- OnlyofficeLoggerHelper.log("There is no created droplet with name: #{droplet_name}")
69
- return
70
- end
71
- ip = droplet.networks.first.first.ip_address
72
- OnlyofficeLoggerHelper.log("get_droplet_ip_by_name(#{droplet_name}): #{ip}")
73
- ip
74
- end
75
-
76
- def current_kernel(droplet_name)
77
- droplet = droplet_by_name(droplet_name)
78
- kernel_name = droplet.kernel.name
79
- OnlyofficeLoggerHelper.log("get_droplet_kernel_by_name(#{droplet_name}): #{kernel_name}")
80
- kernel_name
81
- end
82
-
83
- def get_droplet_status_by_name(droplet_name)
84
- droplet = droplet_by_name(droplet_name)
85
- if droplet.nil?
86
- OnlyofficeLoggerHelper.log("get_droplet_status_by_name(#{droplet_name}): not found any droplets")
87
- nil
88
- else
89
- status = droplet.status
90
- status = :locked if droplet.locked
91
- OnlyofficeLoggerHelper.log("get_droplet_status_by_name(#{droplet_name}): #{status}")
92
- status
93
- end
94
- end
95
-
96
- def wait_until_droplet_have_status(droplet_name, status = 'active')
97
- timeout = 300
31
+ # Wait until droplet has status
32
+ # @param droplet_name [String] name of droplet
33
+ # @param status [String] status to wait
34
+ # @param params [Hash] additiona params
35
+ # @return [Symbol] droplet status after wait over
36
+ def wait_until_droplet_have_status(droplet_name, status = 'active', params = {})
37
+ timeout = params.fetch(:timeout, 300)
98
38
  counter = 0
99
39
  while get_droplet_status_by_name(droplet_name) != status && counter < timeout
100
40
  counter += 10
101
41
  sleep 10
102
- OnlyofficeLoggerHelper.log("waiting for droplet (#{droplet_name}) to have "\
103
- "status: #{status} for #{counter} seconds of #{timeout}")
42
+ logger.info("waiting for droplet (#{droplet_name}) to have "\
43
+ "status: #{status} for #{counter} seconds of #{timeout}")
104
44
  end
105
- get_droplet_status_by_name(droplet_name)
106
- end
45
+ raise DropletOperationTimeout, "#{droplet_name} was not #{status} for #{timeout}s" if counter >= timeout
107
46
 
108
- def kernels_of_droplet(droplet_name)
109
- droplet_id = get_droplet_id_by_name(droplet_name)
110
- kernels = client.droplets.kernels(id: droplet_id).to_a
111
- OnlyofficeLoggerHelper.log("Got kernels_of_droplet(#{droplet_name})")
112
- kernels
47
+ get_droplet_status_by_name(droplet_name)
113
48
  end
114
49
 
50
+ # Restore droplet from image by name
51
+ # @param image_name [String] name of image
52
+ # @param droplet_name [String] name for droplet
53
+ # @param region [String] region to restore
54
+ # @param size [String] size of droplet
55
+ # @param tags [String, Array<String>] name of tags to apply
56
+ # @return [Object] object with droplet data
115
57
  def restore_image_by_name(image_name = 'nct-at-stable',
116
58
  droplet_name = image_name,
117
- region = 'nyc2',
59
+ region = 'nyc3',
118
60
  size = '2gb',
119
61
  tags: nil)
62
+ unless DROPLET_SIZES.include?(size)
63
+ raise DigitalOceanSizeNotSupported,
64
+ "There is no support of droplets with size: #{size}"
65
+ end
120
66
  image_id = get_image_id_by_name(image_name)
121
67
  droplet = DropletKit::Droplet.new(name: droplet_name,
122
68
  region: region,
123
69
  image: image_id.to_i,
124
70
  tags: Array(tags),
71
+ monitoring: true,
125
72
  size: size)
126
73
  created = @client.droplets.create(droplet)
127
- OnlyofficeLoggerHelper.log("restore_image_by_name(#{image_name}, #{droplet_name})")
74
+ logger.info("restore_image_by_name(#{image_name}, #{droplet_name})")
128
75
  if created.is_a?(String)
129
76
  raise "Problem, while creating '#{droplet_name}' from image '#{image_name}'\n" \
130
77
  "Error: #{created}"
@@ -132,39 +79,14 @@ module OnlyofficeDigitaloceanWrapper
132
79
  created
133
80
  end
134
81
 
135
- def power_off_droplet(droplet_name)
136
- droplet_id = get_droplet_id_by_name(droplet_name)
137
- client.droplet_actions.power_off(droplet_id: droplet_id)
138
- wait_until_droplet_have_status(droplet_name, 'off')
139
- end
140
-
141
- def power_on_droplet(droplet_name)
142
- droplet_id = get_droplet_id_by_name(droplet_name)
143
- client.droplet_actions.power_on(droplet_id: droplet_id)
144
- wait_until_droplet_have_status(droplet_name)
145
- end
146
-
147
- def reboot_droplet(droplet_name)
148
- droplet_id = get_droplet_id_by_name(droplet_name)
149
- client.droplet_actions.reboot(droplet_id: droplet_id)
150
- wait_until_droplet_have_status(droplet_name)
151
- end
152
-
82
+ # Destroy droplet by name
83
+ # @param droplet_name [String] name of droplet
84
+ # @return [Symbol] Droplet status after destruction
153
85
  def destroy_droplet_by_name(droplet_name = 'nct-at1')
154
86
  droplet_id = get_droplet_id_by_name(droplet_name)
155
87
  client.droplets.delete(id: droplet_id)
156
- OnlyofficeLoggerHelper.log("destroy_droplet_by_name(#{droplet_name})")
88
+ logger.info("destroy_droplet_by_name(#{droplet_name})")
157
89
  wait_until_droplet_have_status(droplet_name, nil)
158
90
  end
159
-
160
- # Read access token from file system
161
- # @return [String] token
162
- def self.read_token
163
- return ENV['DO_ACCESS_TOKEN'] if ENV['DO_ACCESS_TOKEN']
164
- File.read(Dir.home + '/.do/access_token').delete("\n")
165
- rescue Errno::ENOENT
166
- raise Errno::ENOENT, "No access token found in #{Dir.home}/.do/ directory." \
167
- "Please create files #{Dir.home}/.do/access_token"
168
- end
169
91
  end
170
92
  end
@@ -1,5 +1,15 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module OnlyofficeDigitaloceanWrapper
2
4
  # Class raised if image with name is not found
3
5
  class DigitalOceanImageNotFound < StandardError
4
6
  end
7
+
8
+ # Class raised if droplet size is not supported
9
+ class DigitalOceanSizeNotSupported < StandardError
10
+ end
11
+
12
+ # Class raised if droplet opertaion is timeout
13
+ class DropletOperationTimeout < StandardError
14
+ end
5
15
  end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OnlyofficeDigitaloceanWrapper
4
+ # Module to ignore DigitalOcean exception if they happen irregularly
5
+ module ExceptionsRetryer
6
+ # Retry if exception happened
7
+ # @param exception [Exception] exception to retry
8
+ # @param retries [Integer] how much to retry
9
+ # @param timeout [Integer] wait until next retry
10
+ def retry_exception(exception = DropletKit::Error,
11
+ retries: 5,
12
+ timeout: 10)
13
+ try = 0
14
+ begin
15
+ yield
16
+ rescue exception => e
17
+ try += 1
18
+ logger.error("Error '#{exception}, #{e}' happened during "\
19
+ "operation. Retrying #{try} of #{retries}")
20
+ sleep timeout # Time to cooldown error
21
+ try <= retries ? retry : raise
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OnlyofficeDigitaloceanWrapper
4
+ # Get image, droplet by metadata
5
+ module Getters
6
+ def get_image_id_by_name(image_name)
7
+ all_droplets = @client.images.all
8
+ image = all_droplets.find { |x| x.name == image_name }
9
+ raise DigitalOceanImageNotFound, image_name if image.nil?
10
+
11
+ logger.info("get_image_id_by_name(#{image_name}): #{image.id}")
12
+ image.id
13
+ end
14
+
15
+ # Get droplet by its name
16
+ # @param [String] droplet_name
17
+ # @return [DropletKit::Droplet] droplet
18
+ def droplet_by_name(droplet_name)
19
+ retry_exception do
20
+ droplets = @client.droplets.all
21
+ droplets.find { |x| x.name == droplet_name }
22
+ end
23
+ end
24
+
25
+ # Return droplet id by it's name
26
+ # @param droplet_name [String] name of droplet
27
+ # @return [Integer] id of droplet
28
+ def get_droplet_id_by_name(droplet_name)
29
+ droplet = droplet_by_name(droplet_name)
30
+ if droplet.nil?
31
+ logger.info("get_droplet_id_by_name(#{droplet_name}): not found any droplets")
32
+ nil
33
+ else
34
+ logger.info("get_droplet_id_by_name(#{droplet_name}): #{droplet.id}")
35
+ droplet.id
36
+ end
37
+ end
38
+
39
+ # Return droplet ip by it's name
40
+ # @param droplet_name [String] name of droplet
41
+ # @return [String] ip of droplet
42
+ def get_droplet_ip_by_name(droplet_name)
43
+ droplet = droplet_by_name(droplet_name)
44
+ if droplet.nil?
45
+ logger.info("There is no created droplet with name: #{droplet_name}")
46
+ return
47
+ end
48
+ retry_exception do
49
+ ip = public_ip(droplet)
50
+ logger.info("get_droplet_ip_by_name(#{droplet_name}): #{ip}")
51
+ ip
52
+ end
53
+ end
54
+
55
+ # Return droplet status by it's name
56
+ # @param droplet_name [String] name of droplet
57
+ # @return [Symbol] droplet status
58
+ def get_droplet_status_by_name(droplet_name)
59
+ droplet = droplet_by_name(droplet_name)
60
+ if droplet.nil?
61
+ logger.info("get_droplet_status_by_name(#{droplet_name}): not found any droplets")
62
+ nil
63
+ else
64
+ retry_exception do
65
+ status = droplet.status
66
+ status = :locked if droplet.locked
67
+ logger.info("get_droplet_status_by_name(#{droplet_name}): #{status}")
68
+ status
69
+ end
70
+ end
71
+ end
72
+
73
+ # Get public ip of droplet
74
+ # @param [DropletKit] droplet to get ip
75
+ # @return [String] public ip
76
+ def public_ip(droplet)
77
+ networks = droplet.networks.to_a.first
78
+ public_network = networks.find { |net| net.type == 'public' }
79
+ public_network.ip_address
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'logger'
4
+
5
+ module OnlyofficeDigitaloceanWrapper
6
+ # Logger module for logging stuff
7
+ module LoggerWrapper
8
+ # @return [Logger] default logger
9
+ def logger
10
+ @logger ||= Logger.new($stdout)
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OnlyofficeDigitaloceanWrapper
4
+ # Actions with power (turn on/off, reboot)
5
+ module PowerActions
6
+ # Turn off droplet
7
+ # @param droplet_name [String] droplet to turn off
8
+ # @return [Symbol] droplet result status
9
+ def power_off_droplet(droplet_name)
10
+ droplet_id = get_droplet_id_by_name(droplet_name)
11
+ client.droplet_actions.power_off(droplet_id: droplet_id)
12
+ wait_until_droplet_have_status(droplet_name, 'off')
13
+ end
14
+
15
+ # Turn on droplet
16
+ # @param droplet_name [String] droplet to turn on
17
+ # @return [Symbol] droplet result status
18
+ def power_on_droplet(droplet_name)
19
+ droplet_id = get_droplet_id_by_name(droplet_name)
20
+ client.droplet_actions.power_on(droplet_id: droplet_id)
21
+ wait_until_droplet_have_status(droplet_name)
22
+ end
23
+
24
+ # Reboot droplet
25
+ # @param droplet_name [String] droplet to reboot
26
+ # @return [Symbol] droplet result status
27
+ def reboot_droplet(droplet_name)
28
+ droplet_id = get_droplet_id_by_name(droplet_name)
29
+ client.droplet_actions.reboot(droplet_id: droplet_id)
30
+ wait_until_droplet_have_status(droplet_name)
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OnlyofficeDigitaloceanWrapper
4
+ # Methods to login in account
5
+ module TokenMethods
6
+ # Check if access token is correct
7
+ # @return [true, false] result of check
8
+ def correct_access_token?
9
+ begin
10
+ @client.droplets.all.first
11
+ rescue DropletKit::Error
12
+ return false
13
+ end
14
+ true
15
+ end
16
+
17
+ # Read access token from file system
18
+ # @param token_file_path [String] path to token
19
+ # @param force_file_read [True, False] should read from file be forced
20
+ # @return [String] token
21
+ def read_token(token_file_path: "#{Dir.home}/.do/access_token",
22
+ force_file_read: false)
23
+ return ENV['DO_ACCESS_TOKEN'] if ENV['DO_ACCESS_TOKEN'] && !force_file_read
24
+
25
+ File.read(token_file_path).delete("\n")
26
+ rescue Errno::ENOENT
27
+ raise Errno::ENOENT, "No access token found in #{token_file_path}. " \
28
+ "Please create file #{token_file_path} with token"
29
+ end
30
+ end
31
+ end
@@ -1,3 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module OnlyofficeDigitaloceanWrapper
2
- VERSION = '0.1.0'.freeze
4
+ # @return [String] version of gem
5
+ VERSION = '0.6.0'
6
+ # @return [String] name of gem
7
+ NAME = 'onlyoffice_digitalocean_wrapper'
3
8
  end
metadata CHANGED
@@ -1,58 +1,157 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onlyoffice_digitalocean_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
+ - ONLYOFFICE
7
8
  - Pavel Lobashov
8
9
  - Oleg Nazarov
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2016-12-05 00:00:00.000000000 Z
13
+ date: 2021-02-12 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
- name: activesupport
16
+ name: droplet_kit
16
17
  requirement: !ruby/object:Gem::Requirement
17
18
  requirements:
18
19
  - - "~>"
19
20
  - !ruby/object:Gem::Version
20
- version: '4'
21
+ version: '3'
21
22
  type: :runtime
22
23
  prerelease: false
23
24
  version_requirements: !ruby/object:Gem::Requirement
24
25
  requirements:
25
26
  - - "~>"
26
27
  - !ruby/object:Gem::Version
27
- version: '4'
28
+ version: '3'
28
29
  - !ruby/object:Gem::Dependency
29
- name: droplet_kit
30
+ name: codecov
30
31
  requirement: !ruby/object:Gem::Requirement
31
32
  requirements:
32
33
  - - "~>"
33
34
  - !ruby/object:Gem::Version
34
- version: 2.0.1
35
- type: :runtime
35
+ version: '0'
36
+ type: :development
36
37
  prerelease: false
37
38
  version_requirements: !ruby/object:Gem::Requirement
38
39
  requirements:
39
40
  - - "~>"
40
41
  - !ruby/object:Gem::Version
41
- version: 2.0.1
42
+ version: '0'
42
43
  - !ruby/object:Gem::Dependency
43
- name: onlyoffice_logger_helper
44
+ name: overcommit
44
45
  requirement: !ruby/object:Gem::Requirement
45
46
  requirements:
46
- - - '='
47
+ - - "~>"
47
48
  - !ruby/object:Gem::Version
48
- version: 1.0.0
49
- type: :runtime
49
+ version: '0'
50
+ type: :development
50
51
  prerelease: false
51
52
  version_requirements: !ruby/object:Gem::Requirement
52
53
  requirements:
53
- - - '='
54
+ - - "~>"
54
55
  - !ruby/object:Gem::Version
55
- version: 1.0.0
56
+ version: '0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: rake
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '13.0'
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - "~>"
69
+ - !ruby/object:Gem::Version
70
+ version: '13.0'
71
+ - !ruby/object:Gem::Dependency
72
+ name: rspec
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '3'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - "~>"
83
+ - !ruby/object:Gem::Version
84
+ version: '3'
85
+ - !ruby/object:Gem::Dependency
86
+ name: rubocop
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: 0.49.0
92
+ type: :development
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 0.49.0
99
+ - !ruby/object:Gem::Dependency
100
+ name: rubocop-performance
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: '1'
106
+ type: :development
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - "~>"
111
+ - !ruby/object:Gem::Version
112
+ version: '1'
113
+ - !ruby/object:Gem::Dependency
114
+ name: rubocop-rake
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ type: :development
121
+ prerelease: false
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - "~>"
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ - !ruby/object:Gem::Dependency
128
+ name: rubocop-rspec
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - "~>"
132
+ - !ruby/object:Gem::Version
133
+ version: '2'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - "~>"
139
+ - !ruby/object:Gem::Version
140
+ version: '2'
141
+ - !ruby/object:Gem::Dependency
142
+ name: yard
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ version: 0.9.20
148
+ type: :development
149
+ prerelease: false
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: 0.9.20
56
155
  description: Wrapper gem for DigitalOcean. Use in testing projects
57
156
  email:
58
157
  - shockwavenn@gmail.com
@@ -61,15 +160,24 @@ executables: []
61
160
  extensions: []
62
161
  extra_rdoc_files: []
63
162
  files:
64
- - README.md
65
163
  - lib/onlyoffice_digitalocean_wrapper.rb
66
164
  - lib/onlyoffice_digitalocean_wrapper/digitalocean_wrapper.rb
67
165
  - lib/onlyoffice_digitalocean_wrapper/digitalocean_wrapper/digitalocean_exceptions.rb
166
+ - lib/onlyoffice_digitalocean_wrapper/digitalocean_wrapper/exceptions_retryer.rb
167
+ - lib/onlyoffice_digitalocean_wrapper/digitalocean_wrapper/getters.rb
168
+ - lib/onlyoffice_digitalocean_wrapper/digitalocean_wrapper/logger_wrapper.rb
169
+ - lib/onlyoffice_digitalocean_wrapper/digitalocean_wrapper/power_actions.rb
170
+ - lib/onlyoffice_digitalocean_wrapper/digitalocean_wrapper/token_methods.rb
68
171
  - lib/onlyoffice_digitalocean_wrapper/version.rb
69
- homepage: https://github.com/onlyoffice-testing-robot/onlyoffice_digitalocean_wrapper
172
+ homepage: https://github.com/ONLYOFFICE-QA/onlyoffice_digitalocean_wrapper
70
173
  licenses:
71
174
  - AGPL-3.0
72
- metadata: {}
175
+ metadata:
176
+ bug_tracker_uri: https://github.com/ONLYOFFICE-QA/onlyoffice_digitalocean_wrapper/issues
177
+ changelog_uri: https://github.com/ONLYOFFICE-QA/onlyoffice_digitalocean_wrapper/blob/master/CHANGELOG.md
178
+ documentation_uri: https://www.rubydoc.info/gems/onlyoffice_digitalocean_wrapper
179
+ homepage_uri: https://github.com/ONLYOFFICE-QA/onlyoffice_digitalocean_wrapper
180
+ source_code_uri: https://github.com/ONLYOFFICE-QA/onlyoffice_digitalocean_wrapper
73
181
  post_install_message:
74
182
  rdoc_options: []
75
183
  require_paths:
@@ -78,15 +186,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
186
  requirements:
79
187
  - - ">="
80
188
  - !ruby/object:Gem::Version
81
- version: '0'
189
+ version: '2.5'
82
190
  required_rubygems_version: !ruby/object:Gem::Requirement
83
191
  requirements:
84
192
  - - ">="
85
193
  - !ruby/object:Gem::Version
86
194
  version: '0'
87
195
  requirements: []
88
- rubyforge_project:
89
- rubygems_version: 2.5.1
196
+ rubygems_version: 3.2.9
90
197
  signing_key:
91
198
  specification_version: 4
92
199
  summary: Wrapper gem for DigitalOcean
data/README.md DELETED
@@ -1,41 +0,0 @@
1
- # OnlyofficeDigitaloceanWrapper
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library
4
- into a gem. Put your Ruby code in the file `lib/onlyoffice_digitalocean_wrapper`. To experiment with that code, run
5
- `bin/console` for an interactive prompt.
6
-
7
- TODO: Delete this and the text above, and describe your gem
8
-
9
- ## Installation
10
-
11
- Add this line to your application's Gemfile:
12
-
13
- ```ruby
14
- gem 'onlyoffice_digitalocean_wrapper'
15
- ```
16
-
17
- And then execute:
18
-
19
- $ bundle
20
-
21
- Or install it yourself as:
22
-
23
- $ gem install onlyoffice_digitalocean_wrapper
24
-
25
- ## Usage
26
-
27
- TODO: Write usage instructions here
28
-
29
- ## Development
30
-
31
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
32
- You can also run `bin/console` for an interactive prompt that will allow you to experiment.
33
-
34
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update
35
- the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for
36
- the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
37
-
38
- ## Contributing
39
-
40
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/onlyoffice_digitalocean_wrapper.
41
-