vagrant-digitalocean 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MTJjOGFiNDlhMGIzMGM5ZWY5YTM1YWQ0ZGVmNzU0NjdjZjNlMGI5Yg==
5
+ data.tar.gz: !binary |-
6
+ NzAxZjc5OTNjMjdlZTE2YjgxYjFlNDBkN2NmNjNkNDg4M2M1ZTRlNQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ OTBkZWU1MDJhNGVmZDA2NTNjZjhkMmVhODI3MmQwMDQ4ZGZjNzkyYTFjYjYx
10
+ NmMxMmQ0YWU1OTVmYjExM2MzNmEyMzExMzM1NTU2NWQ3ZWFlNTgxMWMzMTNj
11
+ NGYwZWQ2ZWVjOTA2MmUyMWZkNWZjYzc2YTdmNDM1NjE1NTk3ODc=
12
+ data.tar.gz: !binary |-
13
+ ODk4MTFkYTI3NTJhNjczYmFiMTNmZmU2OTRhYmE1ZGRkZDhiOThmYWNmMTEy
14
+ N2UwOGRhZjViZWNlMDk1ODUzNmMyNjA1YjA3ZmQ1MDQ4MDQxYWYyODg4ZmY4
15
+ NmIwZGNiMWY2OTYwOWFiMTQ2MmRjODY5ZDRlNDhlYzgzZmI4ZTg=
data/README.md CHANGED
@@ -77,7 +77,7 @@ The following attributes are available to further configure the provider:
77
77
  - `provider.image` - A string representing the image to use when creating a
78
78
  new droplet (e.g. `Debian 6.0 x64`). The available options may
79
79
  be found on Digital Ocean's new droplet [form](https://www.digitalocean.com/droplets/new).
80
- It defaults to `Ubuntu 12.04.3 x64`.
80
+ It defaults to `Ubuntu 14.04.3 x64`.
81
81
  - `provider.region` - A string representing the region to create the new
82
82
  droplet in. It defaults to `New York 2`.
83
83
  - `provider.size` - A string representing the size to use when creating a
@@ -5,7 +5,7 @@ module VagrantPlugins
5
5
  module Actions
6
6
  class Rebuild
7
7
  include Helpers::Client
8
- include Vagrant::Util::Retryable
8
+ include Vagrant::Util::Retryable
9
9
 
10
10
  def initialize(app, env)
11
11
  @app = app
@@ -38,7 +38,7 @@ module VagrantPlugins
38
38
  def create_ssh_key(name, env)
39
39
  # assumes public key exists on the same path as private key with .pub ext
40
40
  path = @machine.config.ssh.private_key_path
41
- path = path[0] if path.is_a?(Array)
41
+ path = path[0] if path.is_a?(Array)
42
42
  path = File.expand_path(path, @machine.env.root_path)
43
43
  pub_key = DigitalOcean.public_key(path)
44
44
 
@@ -44,7 +44,7 @@ module VagrantPlugins
44
44
 
45
45
  # add the specified key to the authorized keys file
46
46
  path = @machine.config.ssh.private_key_path
47
- path = path[0] if path.is_a?(Array)
47
+ path = path[0] if path.is_a?(Array)
48
48
  path = File.expand_path(path, @machine.env.root_path)
49
49
  pub_key = DigitalOcean.public_key(path)
50
50
  @machine.communicate.execute(<<-BASH)
@@ -17,10 +17,15 @@ module VagrantPlugins
17
17
  @machine.config.vm.synced_folders.each do |id, data|
18
18
  next if data[:disabled]
19
19
 
20
- unless Vagrant::Util::Which.which('rsync')
21
- env[:ui].warn I18n.t('vagrant_digital_ocean.info.rsync_missing')
22
- break
23
- end
20
+ if @machine.guest.capability?(:rsync_installed)
21
+ installed = @machine.guest.capability(:rsync_installed)
22
+ if !installed
23
+ can_install = @machine.guest.capability?(:rsync_install)
24
+ raise Vagrant::Errors::RSyncNotInstalledInGuest if !can_install
25
+ @machine.ui.info I18n.t("vagrant.rsync_installing")
26
+ @machine.guest.capability(:rsync_install)
27
+ end
28
+ end
24
29
 
25
30
  hostpath = File.expand_path(data[:hostpath], env[:root_path])
26
31
  guestpath = data[:guestpath]
@@ -29,10 +34,10 @@ module VagrantPlugins
29
34
  # avoid creating an additional directory with rsync
30
35
  hostpath = "#{hostpath}/" if hostpath !~ /\/$/
31
36
 
32
- # on windows rsync.exe requires cygdrive-style paths
33
- if Vagrant::Util::Platform.windows?
34
- hostpath = hostpath.gsub(/^(\w):/) { "/cygdrive/#{$1}" }
35
- end
37
+ # on windows rsync.exe requires cygdrive-style paths
38
+ if Vagrant::Util::Platform.windows?
39
+ hostpath = hostpath.gsub(/^(\w):/) { "/cygdrive/#{$1}" }
40
+ end
36
41
 
37
42
  env[:ui].info I18n.t('vagrant_digital_ocean.info.rsyncing', {
38
43
  :hostpath => hostpath,
@@ -44,8 +49,8 @@ module VagrantPlugins
44
49
  @machine.communicate.sudo(
45
50
  "chown -R #{ssh_info[:username]} #{guestpath}")
46
51
 
47
- key = ssh_info[:private_key_path]
48
- key = key[0] if key.is_a?(Array)
52
+ key = ssh_info[:private_key_path]
53
+ key = key[0] if key.is_a?(Array)
49
54
 
50
55
  # rsync over to the guest path using the ssh info
51
56
  command = [
@@ -54,11 +59,11 @@ module VagrantPlugins
54
59
  hostpath,
55
60
  "#{ssh_info[:username]}@#{ssh_info[:host]}:#{guestpath}"]
56
61
 
57
- # we need to fix permissions when using rsync.exe on windows, see
58
- # http://stackoverflow.com/questions/5798807/rsync-permission-denied-created-directories-have-no-permissions
59
- if Vagrant::Util::Platform.windows?
60
- command.insert(1, "--chmod", "ugo=rwX")
61
- end
62
+ # we need to fix permissions when using rsync.exe on windows, see
63
+ # http://stackoverflow.com/questions/5798807/rsync-permission-denied-created-directories-have-no-permissions
64
+ if Vagrant::Util::Platform.windows?
65
+ command.insert(1, "--chmod", "ugo=rwX")
66
+ end
62
67
 
63
68
  r = Vagrant::Util::Subprocess.execute(*command)
64
69
  if r.exit_code != 0
@@ -30,7 +30,7 @@ module VagrantPlugins
30
30
  def finalize!
31
31
  @client_id = ENV['DO_CLIENT_ID'] if @client_id == UNSET_VALUE
32
32
  @api_key = ENV['DO_API_KEY'] if @api_key == UNSET_VALUE
33
- @image = 'Ubuntu 12.04.3 x64' if @image == UNSET_VALUE
33
+ @image = 'Ubuntu 14.04 x64' if @image == UNSET_VALUE
34
34
  @region = 'New York 2' if @region == UNSET_VALUE
35
35
  @size = '512MB' if @size == UNSET_VALUE
36
36
  @private_networking = false if @private_networking == UNSET_VALUE
@@ -46,7 +46,7 @@ module VagrantPlugins
46
46
  errors << I18n.t('vagrant_digital_ocean.config.api_key') if !@api_key
47
47
 
48
48
  key = machine.config.ssh.private_key_path
49
- key = key[0] if key.is_a?(Array)
49
+ key = key[0] if key.is_a?(Array)
50
50
  if !key
51
51
  errors << I18n.t('vagrant_digital_ocean.config.private_key')
52
52
  elsif !File.file?(File.expand_path("#{key}.pub", machine.env.root_path))
@@ -15,7 +15,7 @@ module VagrantPlugins
15
15
  include Vagrant::Util::Retryable
16
16
 
17
17
  def initialize(machine)
18
- @logger = Log4r::Logger.new('vagrant::digitalocean::apiclient')
18
+ @logger = Log4r::Logger.new('vagrant::digitalocean::apiclient')
19
19
  @config = machine.provider_config
20
20
  @client = Faraday.new({
21
21
  :url => 'https://api.digitalocean.com/',
@@ -27,7 +27,7 @@ module VagrantPlugins
27
27
 
28
28
  def request(path, params = {})
29
29
  begin
30
- @logger.info "Request: #{path}"
30
+ @logger.info "Request: #{path}"
31
31
  result = @client.get(path, params = params.merge({
32
32
  :client_id => @config.client_id,
33
33
  :api_key => @config.api_key
@@ -48,7 +48,7 @@ module VagrantPlugins
48
48
 
49
49
  begin
50
50
  body = JSON.parse(result.body)
51
- @logger.info "Response: #{body}"
51
+ @logger.info "Response: #{body}"
52
52
  rescue JSON::ParserError => e
53
53
  raise(Errors::JSONError, {
54
54
  :message => e.message,
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module DigitalOcean
3
- VERSION = '0.5.4'
3
+ VERSION = '0.5.5'
4
4
  end
5
5
  end
data/locales/en.yml CHANGED
@@ -19,6 +19,7 @@ en:
19
19
  creating_key: "Creating new SSH key: %{name}..."
20
20
  trying_rsync_install: "Rsync not found, attempting to install with yum..."
21
21
  rsyncing: "Rsyncing folder: %{hostpath} => %{guestpath}..."
22
+ rsync_missing: "The rsync executable was not found in the current path."
22
23
  config:
23
24
  client_id: "Client ID is required"
24
25
  api_key: "API key is required"
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-digitalocean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
5
- prerelease:
4
+ version: 0.5.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - John Bender
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-04-10 00:00:00.000000000 Z
11
+ date: 2014-06-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: faraday
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: json
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: log4r
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -106,27 +99,26 @@ files:
106
99
  - vagrant-digitalocean.gemspec
107
100
  homepage:
108
101
  licenses: []
102
+ metadata: {}
109
103
  post_install_message:
110
104
  rdoc_options: []
111
105
  require_paths:
112
106
  - lib
113
107
  required_ruby_version: !ruby/object:Gem::Requirement
114
- none: false
115
108
  requirements:
116
109
  - - ! '>='
117
110
  - !ruby/object:Gem::Version
118
111
  version: '0'
119
112
  required_rubygems_version: !ruby/object:Gem::Requirement
120
- none: false
121
113
  requirements:
122
114
  - - ! '>='
123
115
  - !ruby/object:Gem::Version
124
116
  version: '0'
125
117
  requirements: []
126
118
  rubyforge_project:
127
- rubygems_version: 1.8.23
119
+ rubygems_version: 2.2.2
128
120
  signing_key:
129
- specification_version: 3
121
+ specification_version: 4
130
122
  summary: Enables Vagrant to manage Digital Ocean droplets
131
123
  test_files:
132
124
  - test/Vagrantfile