push
travis-ci
227 of 529 relevant lines covered (42.91%)
1.78 hits per line
1 |
require_relative 'adapter/abstract'
|
4 all except jruby-9.0.0.0 ✔ |
2 |
|
|
3 |
require_relative 'adapter/digitalocean'
|
4 all except jruby-9.0.0.0 ✔ |
4 |
require_relative 'adapter/digitalocean_v2'
|
4 all except jruby-9.0.0.0 ✔ |
5 |
|
|
6 |
module DoSnapshot |
4 all except jruby-9.0.0.0 ✔ |
7 |
# Adapter interface for API connections
|
|
8 |
# Ability to select DigitalOcean API versions.
|
|
9 |
#
|
|
10 |
module Adapter |
4 all except jruby-9.0.0.0 ✔ |
11 |
def api(protocol, options) |
4 all except jruby-9.0.0.0 ✔ |
12 |
case protocol
|
× |
13 |
when 2 |
|
14 |
return DigitaloceanV2.new(options) |
× |
15 |
else
|
|
16 |
return Digitalocean.new(options) |
× |
17 |
end
|
|
18 |
end
|
|
19 |
module_function :api
|
4 all except jruby-9.0.0.0 ✔ |
20 |
end
|
|
21 |
end
|