vagrant-soa 0.3.1 → 0.3.2

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: 7195925caa51aeb43ae96872e35731ef7bcabd18
4
- data.tar.gz: a336fdaeda940738d7d23bcbc132d07cecbbd9c5
3
+ metadata.gz: 3ddf4c189d3007118c7c28eec41cc5cec3fa3078
4
+ data.tar.gz: 1383801f3598b670d6430ae266394f3956b8e1c8
5
5
  SHA512:
6
- metadata.gz: dcbbd395cd37f8d75c783e1b8980a4bd447a910c8cc8b14d3a362e110d015c347dddab778e020f42bd2e70e95d47df9d3124699d6cabb138925e348a777e4992
7
- data.tar.gz: 35529cfc7ac1adf32e6f137d13801f958b31aefc322086c32137ebd0a2199510302c4a44bb7ce3f2f387a695212095726db0d8bc3e32fd624ebbc29297d66b32
6
+ metadata.gz: b5f84a4bb90fc147cbdf6637f637c50ab86031ac9e893daca726954d34042dd815308a9e05f58ee94d343cf03bc2058c7b7a650d6105681b1e962357391e8429
7
+ data.tar.gz: d8cbc4d7c706679d5c4ef531c1a0afa3472121c3c29135ca71d4a4988059b257abc8a6f72856f7959f751dc7f3ab36981fca7a388f158878f04327c48176b9ec
@@ -1,3 +1,4 @@
1
+ require 'fileutils'
1
2
  require_relative '../errors'
2
3
 
3
4
  module VagrantPlugins
@@ -162,11 +163,23 @@ module VagrantPlugins
162
163
  end
163
164
  end
164
165
 
166
+ def symlink_local_service(service, config)
167
+ target_directory = File.join @install_dir, service
168
+ # make sure the repo is checked out
169
+ if File.directory? target_directory
170
+ @env[:ui].info "Local Service: #{service} is already symlinked"
171
+ else
172
+ FileUtils.symlink File.expand_path(config['local_path']), target_directory
173
+ @env[:ui].info "Symlinking local service: #{service} to #{target_directory}"
174
+ end
175
+ return target_directory
176
+ end
177
+
165
178
  # To install a service we clone the service repo and add the puppet
166
179
  # path to @puppet_module_registry.puppet_module_paths.
167
180
  def install_service(service, config)
168
181
  if config.has_key? 'local_path'
169
- target_directory = File.expand_path config['local_path']
182
+ target_directory = symlink_local_service(service, config)
170
183
  else
171
184
  target_directory = clone_service_repo(service, config)
172
185
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Soa
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-soa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hahn