vagrant-digitalocean 0.7.3 → 0.7.4

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: c9b3f5eb95ee3301c21692d988e2a80d254cb368
4
- data.tar.gz: 949878d9783b37fac398503ab1c66c3dc2046afc
3
+ metadata.gz: 197c341c3da97aa929fc86ed355e958d2f3c204f
4
+ data.tar.gz: d36e00bb323c039ff69373b63181e06c9f6bcf81
5
5
  SHA512:
6
- metadata.gz: 9760c883463a9d6826856b3e0543425702268bd22c56720ed04bb1c75c71ceff84a430a34bf52f41e7dd99b4c336f0fd4364458a6d1343038f90c72870c67981
7
- data.tar.gz: 6e2cffc6a7e95090d63971f9d30abb804812c8c4ee6c340e0015e80ca80cb51933f29096c4832e01e1ac982dbc66b9a1125e3b9056a96578c3093d073303d21d
6
+ metadata.gz: 61563549121759eaa3ca6b55e2ad32c780d67a73e1eedd7fa4ee901adf7f2d5db36fb7e652e704ac2014aec30388e2ef93488e4da354e8f698be0f265fc03c23
7
+ data.tar.gz: bc860f3242cd0e0c9d5798e42fd3c0c8afcd95ee1966a051393530d506e00230857cd97605af00b7e833658b3fbd7bbbb6398bd62f77c6b26853abadaeb0bebf
data/README.md CHANGED
@@ -77,7 +77,10 @@ Please note the following:
77
77
  **Supported Configuration Attributes**
78
78
 
79
79
  The following attributes are available to further configure the provider:
80
- - `provider.image` - A string representing the image to use when creating a new droplet. It defaults to `ubuntu-14-04-x64`. List available images with the `digitalocean-list images` command.
80
+ - `provider.image` - A string representing the image to use when creating a new
81
+ droplet. It defaults to `ubuntu-14-04-x64`. List available images with the
82
+ `digitalocean-list images` command. Like when using the DigitalOcean API
83
+ directly, [it can be an image ID or slug](https://developers.digitalocean.com/documentation/v2/#create-a-new-droplet).
81
84
  - `provider.ipv6` - A boolean flag indicating whether to enable IPv6
82
85
  - `provider.region` - A string representing the region to create the new droplet in. It defaults to `nyc2`. List available regions with the `digitalocean-list regions` command.
83
86
  - `provider.size` - A string representing the size to use when creating a
@@ -17,15 +17,11 @@ module VagrantPlugins
17
17
  def call(env)
18
18
  ssh_key_id = [env[:ssh_key_id]]
19
19
 
20
- image_id = @client
21
- .request('/v2/images')
22
- .find_id(:images, :slug => @machine.provider_config.image)
23
-
24
20
  # submit new droplet request
25
21
  result = @client.post('/v2/droplets', {
26
22
  :size => @machine.provider_config.size,
27
23
  :region => @machine.provider_config.region,
28
- :image => image_id,
24
+ :image => @machine.provider_config.image,
29
25
  :name => @machine.config.vm.hostname || @machine.name,
30
26
  :ssh_keys => ssh_key_id,
31
27
  :private_networking => @machine.provider_config.private_networking,
@@ -34,12 +34,12 @@ module VagrantPlugins
34
34
  images = Array(result["images"])
35
35
  if @regions
36
36
  images_table = images.map do |image|
37
- '%-50s %-30s %-50s' % ["#{image['distribution']} #{image['name']}", image['slug'], image['regions'].join(', ')]
37
+ '%-50s %-20s %-20s %-50s' % ["#{image['distribution']} #{image['name']}", image['slug'], image['id'], image['regions'].join(', ')]
38
38
  end
39
39
  @env.ui.info I18n.t('vagrant_digital_ocean.info.images_with_regions', images: images_table.sort.join("\r\n"))
40
40
  else
41
41
  images_table = images.map do |image|
42
- '%-50s %-30s' % ["#{image['distribution']} #{image['name']}", image['slug']]
42
+ '%-50s %-30s %-30s' % ["#{image['distribution']} #{image['name']}", image['slug'], image['id']]
43
43
  end
44
44
  @env.ui.info I18n.t('vagrant_digital_ocean.info.images', images: images_table.sort.join("\r\n"))
45
45
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module DigitalOcean
3
- VERSION = '0.7.3'
3
+ VERSION = '0.7.4'
4
4
  end
5
5
  end
data/locales/en.yml CHANGED
@@ -20,8 +20,8 @@ en:
20
20
  trying_rsync_install: "Rsync not found, attempting to install with yum..."
21
21
  rsyncing: "Rsyncing folder: %{hostpath} => %{guestpath}..."
22
22
  rsync_missing: "The rsync executable was not found in the current path."
23
- images: "Description Slug\n\n%{images}"
24
- images_with_regions: "Description Slug Regions\n\n%{images}"
23
+ images: "Description Slug ID\n\n%{images}"
24
+ images_with_regions: "Description Slug ID Regions\n\n%{images}"
25
25
  regions: "Description Slug\n\n%{regions}"
26
26
  sizes: "Memory CPUs Slug\n\n%{sizes}"
27
27
  list_error: 'Could not contact the Digital Ocean API: %{message}'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-digitalocean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Bender
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-07 00:00:00.000000000 Z
11
+ date: 2015-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  requirements: []
119
119
  rubyforge_project:
120
- rubygems_version: 2.4.5
120
+ rubygems_version: 2.4.4
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Enables Vagrant to manage Digital Ocean droplets
@@ -128,3 +128,4 @@ test_files:
128
128
  - test/test.sh
129
129
  - test/test_id_rsa
130
130
  - test/test_id_rsa.pub
131
+ has_rdoc: