-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
794 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,3 +69,4 @@ AllCops: | |
- '*.gemspec' | ||
- 'tasks/**/*' | ||
- 'Rakefile' | ||
- 'example/**/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.4.1 | ||
2.3.4 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
*.gem | ||
*.rbc | ||
.bundle | ||
.config | ||
.yardoc | ||
Gemfile.lock | ||
InstalledFiles | ||
_yardoc | ||
coverage | ||
doc/ | ||
lib/bundler/man | ||
pkg | ||
rdoc | ||
spec/reports | ||
test/tmp | ||
test/version_tmp | ||
log/* | ||
!log/.keep | ||
tmp/* | ||
!tmp/.keep | ||
*.bundle | ||
*.so | ||
*.o | ||
*.a | ||
mkmf.log | ||
.idea | ||
.irb_history | ||
.ruby-version | ||
.envrc |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- encoding : utf-8 -*- | ||
# frozen_string_literal: true | ||
require 'bundler/setup' | ||
|
||
PROJECT_ROOT = File.expand_path('..', __FILE__) | ||
PROJECT_ROOT_DIR = File.dirname(__FILE__) | ||
$LOAD_PATH.unshift "#{PROJECT_ROOT}/lib" | ||
require 'new_adapter' | ||
|
||
begin | ||
require 'rspec/core/rake_task' | ||
|
||
desc 'Run all specs' | ||
RSpec::Core::RakeTask.new(:spec) | ||
rescue LoadError | ||
nil | ||
# The test gem group fails to install on the platform for some reason | ||
end | ||
|
||
task default: :spec |
4 changes: 2 additions & 2 deletions
4
example/adapter/lib/new_adapter.rb → example/new_adapter/lib/new_adapter.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# frozen_string_literal: true | ||
require_relative 'new_adapter/version' | ||
require_relative 'new_adapter/adapter' | ||
|
||
module NewAdapter | ||
autoload :Adapter, 'new_adapter/adapter' | ||
module NewAdapter | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
require 'do_snapshot/helpers' | ||
require 'do_snapshot/adapter' | ||
|
||
module NewAdapter | ||
class Adapter < ::DoSnapshot::Adapter::DropletKit | ||
end | ||
end |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
example/adapter/new_adapter.gemspec → example/new_adapter/new_adapter.gemspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# -*- encoding : utf-8 -*- | ||
# frozen_string_literal: true | ||
require 'spec_helper' | ||
|
||
module NewAdapter | ||
RSpec.describe Adapter do | ||
include DoSnapshot::RSpec::Environment | ||
include DoSnapshot::RSpec::ApiV2Helpers | ||
include DoSnapshot::RSpec::Adapter | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# -*- encoding : utf-8 -*- | ||
# frozen_string_literal: true | ||
require 'spec_helper' | ||
|
||
RSpec.describe NewAdapter do | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
4 changes: 4 additions & 0 deletions
4
lib/do_snapshot/rspec/fixtures/digitalocean/v2/error_message.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"id": "not_found", | ||
"message": "The resource you were accessing could not be found." | ||
} |
29 changes: 29 additions & 0 deletions
29
lib/do_snapshot/rspec/fixtures/digitalocean/v2/response_event.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"action":{ | ||
"id": 7499, | ||
"status": "in-progress", | ||
"type": "snapshot", | ||
"started_at": "2014-11-14T16:34:39Z", | ||
"completed_at": null, | ||
"resource_id": 100823, | ||
"resource_type": "droplet", | ||
"region": { | ||
"name": "Amsterdam 1", | ||
"slug": "ams1", | ||
"sizes": [ | ||
"512mb", | ||
"1gb", | ||
"4gb", | ||
"2gb", | ||
"8gb", | ||
"16gb" | ||
], | ||
"features": [ | ||
"virtio", | ||
"backups" | ||
], | ||
"available": true | ||
}, | ||
"region_slug": "ams1" | ||
} | ||
} |
102 changes: 102 additions & 0 deletions
102
lib/do_snapshot/rspec/fixtures/digitalocean/v2/show_droplet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{ | ||
"droplet": { | ||
"id": 100823, | ||
"name": "example.com", | ||
"memory": 512, | ||
"vcpus": 1, | ||
"disk": 20, | ||
"locked": false, | ||
"status": "active", | ||
"kernel": { | ||
"id": 2233, | ||
"name": "CentOS 6.4 x64 vmlinuz-2.6.32-358.6.2.el6.x86_64", | ||
"version": "2.6.32-358.6.2.el6.x86_64" | ||
}, | ||
"created_at": "2014-11-14T16:36:31Z", | ||
"features": [ | ||
"ipv6", | ||
"virtio" | ||
], | ||
"backup_ids": [ | ||
], | ||
"snapshot_ids": [ | ||
5019770, | ||
5019903, | ||
5020783, | ||
5030783 | ||
], | ||
"image": { | ||
"id": 562354, | ||
"name": "CentOS 6.4 x64", | ||
"distribution": "CentOS", | ||
"slug": "centos-6-4-x64", | ||
"public": false, | ||
"regions": [ | ||
"nyc1", | ||
"ams1", | ||
"sfo1", | ||
"nyc2", | ||
"ams2", | ||
"sgp1", | ||
"lon1", | ||
"nyc3", | ||
"ams3", | ||
"nyc3", | ||
"fra1" | ||
], | ||
"created_at": "2014-10-17T20:24:33Z", | ||
"type": "snapshot", | ||
"min_disk_size": 20 | ||
}, | ||
"size": { | ||
"slug": "512mb", | ||
"memory": 512, | ||
"vcpus": 1, | ||
"disk": 20, | ||
"transfer": 1.0, | ||
"price_monthly": 5.0, | ||
"price_hourly": 0.00744, | ||
"regions": [ | ||
"nyc1", | ||
"sgp1", | ||
"ams1", | ||
"sfo1", | ||
"nyc2", | ||
"lon1", | ||
"nyc3", | ||
"ams3", | ||
"ams2", | ||
"fra1" | ||
] | ||
}, | ||
"size_slug": "512mb", | ||
"networks": { | ||
"v4": [ | ||
{ | ||
"ip_address": "104.131.186.241", | ||
"netmask": "255.255.240.0", | ||
"gateway": "104.131.176.1", | ||
"type": "public" | ||
} | ||
], | ||
"v6": [] | ||
}, | ||
"region": { | ||
"name": "Amsterdam 1", | ||
"slug": "ams1", | ||
"sizes": [ | ||
"16gb", | ||
"2gb", | ||
"1gb", | ||
"4gb", | ||
"8gb", | ||
"512mb" | ||
], | ||
"features": [ | ||
"virtio", | ||
"backups" | ||
], | ||
"available": true | ||
} | ||
} | ||
} |
102 changes: 102 additions & 0 deletions
102
lib/do_snapshot/rspec/fixtures/digitalocean/v2/show_droplet_inactive.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{ | ||
"droplet": { | ||
"id": 100823, | ||
"name": "example.com", | ||
"memory": 512, | ||
"vcpus": 1, | ||
"disk": 20, | ||
"locked": false, | ||
"status": "off", | ||
"kernel": { | ||
"id": 2233, | ||
"name": "CentOS 6.4 x64 vmlinuz-2.6.32-358.6.2.el6.x86_64", | ||
"version": "2.6.32-358.6.2.el6.x86_64" | ||
}, | ||
"created_at": "2014-11-14T16:36:31Z", | ||
"features": [ | ||
"ipv6", | ||
"virtio" | ||
], | ||
"backup_ids": [ | ||
], | ||
"snapshot_ids": [ | ||
5019770, | ||
5019903, | ||
5020783, | ||
5030783 | ||
], | ||
"image": { | ||
"id": 562354, | ||
"name": "CentOS 6.4 x64", | ||
"distribution": "CentOS", | ||
"slug": "centos-6-4-x64", | ||
"public": false, | ||
"regions": [ | ||
"nyc1", | ||
"ams1", | ||
"sfo1", | ||
"nyc2", | ||
"ams2", | ||
"sgp1", | ||
"lon1", | ||
"nyc3", | ||
"ams3", | ||
"nyc3", | ||
"fra1" | ||
], | ||
"created_at": "2014-10-17T20:24:33Z", | ||
"type": "snapshot", | ||
"min_disk_size": 20 | ||
}, | ||
"size": { | ||
"slug": "512mb", | ||
"memory": 512, | ||
"vcpus": 1, | ||
"disk": 20, | ||
"transfer": 1.0, | ||
"price_monthly": 5.0, | ||
"price_hourly": 0.00744, | ||
"regions": [ | ||
"nyc1", | ||
"sgp1", | ||
"ams1", | ||
"sfo1", | ||
"nyc2", | ||
"lon1", | ||
"nyc3", | ||
"ams3", | ||
"ams2", | ||
"fra1" | ||
] | ||
}, | ||
"size_slug": "512mb", | ||
"networks": { | ||
"v4": [ | ||
{ | ||
"ip_address": "104.131.186.241", | ||
"netmask": "255.255.240.0", | ||
"gateway": "104.131.176.1", | ||
"type": "public" | ||
} | ||
], | ||
"v6": [] | ||
}, | ||
"region": { | ||
"name": "Amsterdam 1", | ||
"slug": "ams1", | ||
"sizes": [ | ||
"16gb", | ||
"2gb", | ||
"1gb", | ||
"4gb", | ||
"8gb", | ||
"512mb" | ||
], | ||
"features": [ | ||
"virtio", | ||
"backups" | ||
], | ||
"available": true | ||
} | ||
} | ||
} |
Oops, something went wrong.