vagrant-digitalocean 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MGJlMDI2MjE0N2UzMTQwMDY5MjYzNThkNDg0OGRmOTY0NzJjNTNlOA==
5
- data.tar.gz: !binary |-
6
- OGJlZTgwZGM2NzU1M2I3ZmQ2YTBkZmZhM2UzZTQxM2I3MDM0OWFiZQ==
2
+ SHA1:
3
+ metadata.gz: 6b505b44641b6c612ed3f9415a063788a97697ed
4
+ data.tar.gz: cd483c6ca13e403373dbda1436d866c586f4c7a4
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NmUwMWI4ZjMyMTA3Y2U4NzE3MDk4M2M4Nzk2YTYyYjU0MzAxZjQ3MjcyZmZh
10
- ODVlOGNlYTQ1ODUzZmIzZTI5NWFmODU4YjIwZjYzZDBiMGY3ZjVkZDY2ODAz
11
- YzUxZmU5ZTkzMjBmNzk5NzM3MzhiY2QyNWNiMzU2MTljMjJjYzU=
12
- data.tar.gz: !binary |-
13
- NGE0ZWEzMTA2MDgyMjQ1MmNiNzI2OTgzYjMxM2YxMjdiYWYwMzUwZmJkZTY4
14
- YjUyZmY5ZGY1MTdmYjUxMmNmZjQ2ZDMzZGFjOTk1OTZjODI2ZTJiYzZmMzJk
15
- NGE2ZWFhZTdmYzU3MzgwYmM1MWYwOGNiZjVlZmEzYzUxYzBlNWI=
6
+ metadata.gz: 6a4dcfbb3dde87819cf34839d28fcbb3f8af6f2e622b1cf1cbc753e137e6ab099ade9323f703896d79149985bd88078616783113da279bb7c02c6fabe6e9f0ee
7
+ data.tar.gz: 665a616d3bf05643c7d95abfbf739141bc9b7d33d607d46752be5da6e1192c9f2fbd29ee383184fdb4d9fa9b239775f95be821537f1b5c1b37bc0fe6ef96afb9
data/README.md CHANGED
@@ -78,7 +78,7 @@ Please note the following:
78
78
  The following attributes are available to further configure the provider:
79
79
  - `provider.image` - A string representing the image to use when creating a
80
80
  new droplet (e.g. `Debian 6.0 x64`). The available options may
81
- be found on Digital Ocean's new droplet [form](https://www.digitalocean.com/droplets/new).
81
+ be found on Digital Ocean's new droplet [form](https://cloud.digitalocean.com/droplets/new).
82
82
  It defaults to `Ubuntu 14.04 x64`.
83
83
  - `provider.region` - A string representing the region to create the new
84
84
  droplet in. It defaults to `nyc2`.
@@ -29,7 +29,7 @@ module VagrantPlugins
29
29
  :name => @machine.config.vm.hostname || @machine.name,
30
30
  :ssh_keys => ssh_key_id,
31
31
  :private_networking => @machine.provider_config.private_networking,
32
- :backups_enabled => @machine.provider_config.backups_enabled
32
+ :backups => @machine.provider_config.backups_enabled
33
33
  })
34
34
 
35
35
  # wait for request to complete
@@ -41,12 +41,14 @@ module VagrantPlugins
41
41
 
42
42
  # refresh droplet state with provider and output ip address
43
43
  droplet = Provider.droplet(@machine, :refresh => true)
44
+ public_network = droplet['networks']['v4'].find { |network| network['type'] == 'public' }
45
+ private_network = droplet['networks']['v4'].find { |network| network['type'] == 'private' }
44
46
  env[:ui].info I18n.t('vagrant_digital_ocean.info.droplet_ip', {
45
- :ip => droplet['ip_address']
47
+ :ip => public_network['ip_address']
46
48
  })
47
- if droplet['private_ip_address']
49
+ if private_network
48
50
  env[:ui].info I18n.t('vagrant_digital_ocean.info.droplet_private_ip', {
49
- :ip => droplet['private_ip_address']
51
+ :ip => private_network['ip_address']
50
52
  })
51
53
  end
52
54
 
@@ -60,8 +60,9 @@ module VagrantPlugins
60
60
  next_page = body["links"]["pages"]["next"] rescue nil
61
61
  unless next_page.nil?
62
62
  uri = URI.parse(next_page)
63
- next_result = self.request("#{path}?#{uri.query}")
64
- req_target = path.split("/")[-1]
63
+ new_path = path.split("?")[0]
64
+ next_result = self.request("#{new_path}?#{uri.query}")
65
+ req_target = new_path.split("/")[-1]
65
66
  body["#{req_target}"].concat(next_result["#{req_target}"])
66
67
  end
67
68
  rescue JSON::ParserError => e
@@ -79,8 +79,10 @@ module VagrantPlugins
79
79
 
80
80
  return nil if droplet['status'].to_sym != :active
81
81
 
82
+ public_network = droplet['networks']['v4'].find { |network| network['type'] == 'public' }
83
+
82
84
  return {
83
- :host => droplet['networks']['v4'].first['ip_address'],
85
+ :host => public_network['ip_address'],
84
86
  :port => '22',
85
87
  :username => 'root',
86
88
  :private_key_path => nil
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module DigitalOcean
3
- VERSION = '0.6.1'
3
+ VERSION = '0.6.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-digitalocean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Bender
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-27 00:00:00.000000000 Z
11
+ date: 2014-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.8.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.8.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: log4r
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Enables Vagrant to manage Digital Ocean droplets
@@ -59,7 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .gitignore
62
+ - ".gitignore"
63
63
  - CHANGELOG.md
64
64
  - Gemfile
65
65
  - LICENSE.txt
@@ -106,17 +106,17 @@ require_paths:
106
106
  - lib
107
107
  required_ruby_version: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ! '>='
109
+ - - ">="
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - ! '>='
114
+ - - ">="
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  requirements: []
118
118
  rubyforge_project:
119
- rubygems_version: 2.2.2
119
+ rubygems_version: 2.3.0
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Enables Vagrant to manage Digital Ocean droplets