do_snapshot 0.6.0 → 0.6.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
  SHA1:
3
- metadata.gz: 7c7c9e3cd13d683e5ba91602e678fdcdb83cc434
4
- data.tar.gz: e3dc35838e951eed9fdd6390203573af0de761a9
3
+ metadata.gz: 5fcb4d069e44a1e05fbb9cca875ab007b3668933
4
+ data.tar.gz: dab066517f558ea1cb6fdfb2497a4ac9f0cda002
5
5
  SHA512:
6
- metadata.gz: bd1fd908c738b06b4ebb86d11f8e05f55c343d21eef81d769e103603d2e19f9462553ca9a7d0256df2d0ae0ce05fbd758ef3d20032aa277b35f891f3a9f512d2
7
- data.tar.gz: e49489aaab514f945a3eb7f345c3c351545c3e099bbca988202796ebea2172cc32596b8472b87dfe201269892de7faaf6d2903adfc13de09beeb225f13559b84
6
+ metadata.gz: 1bbea6f804044dc1cbfe31581e6806f36a454f619cad4123bcfb89d1ece4eabd4d010fcfb9f7ca89d9544de14852a9fc255ec779f975667abc21c481c2efcdbb
7
+ data.tar.gz: 38832a5b4e1ae1863f007c496348ab6202e68b58f424d8ad1db771c001440a63e0667af0a72c9801a33643dc3ae7962eab55250d131fce60d2fd485cea718546
@@ -27,7 +27,7 @@ module DoSnapshot
27
27
  set_mailer
28
28
 
29
29
  # Check for keys via options
30
- %w( digital_ocean_client_id digital_ocean_api_key digital_ocean_access_token ).each do |key|
30
+ %w( digital_ocean_access_token ).each do |key|
31
31
  ENV[key.upcase] = options[key] if options.include? key
32
32
  end
33
33
  end
@@ -40,9 +40,9 @@ module DoSnapshot
40
40
 
41
41
  ### Examples
42
42
 
43
- Select api version (1, 2):
43
+ Select api version (2):
44
44
 
45
- $ do_snapshot -p 1
45
+ $ do_snapshot -p 2
46
46
 
47
47
  Set DigitalOcean keys:
48
48
 
@@ -151,14 +151,6 @@ module DoSnapshot
151
151
  type: :string,
152
152
  banner: 'YOURLONGAPITOKEN',
153
153
  desc: 'DIGITAL_OCEAN_ACCESS_TOKEN. if you can\'t use environment.'
154
- method_option :digital_ocean_client_id,
155
- type: :string,
156
- banner: 'YOURLONGAPICLIENTID',
157
- desc: 'DIGITAL_OCEAN_CLIENT_ID. if you can\'t use environment.'
158
- method_option :digital_ocean_api_key,
159
- type: :string,
160
- banner: 'YOURLONGAPIKEY',
161
- desc: 'DIGITAL_OCEAN_API_KEY. if you can\'t use environment.'
162
154
 
163
155
  def snap
164
156
  command.snap
@@ -197,7 +189,7 @@ module DoSnapshot
197
189
  end
198
190
 
199
191
  def command_filter
200
- %w( log smtp mail trace digital_ocean_client_id digital_ocean_api_key digital_ocean_access_token )
192
+ %w( log smtp mail trace digital_ocean_access_token )
201
193
  end
202
194
 
203
195
  def setup_config # rubocop:disable Metrics/AbcSize
@@ -2,5 +2,5 @@
2
2
  # Current version
3
3
  #
4
4
  module DoSnapshot
5
- VERSION = '0.6.0'
5
+ VERSION = '0.6.1'
6
6
  end
@@ -15,7 +15,7 @@ RSpec.describe DoSnapshot::CLI do
15
15
  expect(cli_obj.args)
16
16
  .to include('help')
17
17
  expect(cli_obj.options)
18
- .to include('digital_ocean_client_id')
18
+ .to include('digital_ocean_access_token')
19
19
  end
20
20
  end
21
21
  end
@@ -16,8 +16,8 @@ RSpec.shared_context 'environment' do
16
16
  let(:image_id) { '5019770' }
17
17
  let(:image_id2) { '5019903' }
18
18
  let(:cli_env_nil) { Hash['DIGITAL_OCEAN_CLIENT_ID' => nil, 'DIGITAL_OCEAN_API_KEY' => nil, 'DIGITAL_OCEAN_ACCESS_TOKEN' => nil] }
19
- let(:cli_keys) { Thor::CoreExt::HashWithIndifferentAccess.new(digital_ocean_client_id: client_key, digital_ocean_api_key: api_key, digital_ocean_access_token: access_token) }
20
- let(:cli_keys_other) { Thor::CoreExt::HashWithIndifferentAccess.new(digital_ocean_client_id: 'NOTFOO', digital_ocean_api_key: 'NOTBAR', digital_ocean_access_token: 'NOTTOK') }
19
+ let(:cli_keys) { Thor::CoreExt::HashWithIndifferentAccess.new(digital_ocean_access_token: access_token) }
20
+ let(:cli_keys_other) { Thor::CoreExt::HashWithIndifferentAccess.new(digital_ocean_access_token: 'NOTTOK') }
21
21
  let(:snapshot_name) { "example.com_#{DateTime.now.strftime('%Y_%m_%d')}" }
22
22
  let(:default_options) { Hash[protocol: 2, only: %w( 100823 ), exclude: %w(), keep: 3, stop: false, trace: true, clean: true, delay: 0, timeout: 600] }
23
23
  let(:default_options_cli) { default_options.reject { |key, _| %w( droplets threads ).include?(key.to_s) } }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: do_snapshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Merkulov