Now supporting vagrant 1.2. Simplified config class. SSH not working
[vagrant-dotfiles.git] / lib / copy_my_conf / git.rb
index eea3b86..4ee5240 100644 (file)
@@ -1,18 +1,14 @@
-module Vagrant
-  module Provisioners
-    class CopyMyConf < Base
-      class Git
-        def prepare vm, tmp_root
-          `mkdir -p #{tmp_root}/git`
-          `cp ~/.gitconfig #{tmp_root}/git/`
-          vm.share_folder("git", "#{tmp_root}/git/", "#{tmp_root}/git")
-        end
+module CopyMyConf
+  class Git
+    def prepare vm, tmp_root
+      `mkdir -p #{tmp_root}/git`
+      `cp ~/.gitconfig #{tmp_root}/git/`
+      vm.synced_folder("#{tmp_root}/git/", "#{tmp_root}/git", :id => "git")
+    end
 
-        def provision channel, user_home, tmp_root
-          puts "Copying your gitconfig"
-          channel.execute("cp #{tmp_root}/git/.gitconfig #{user_home}")
-        end
-      end
+    def provision channel, user_home, tmp_root
+      puts "Copying your gitconfig"
+      channel.execute("cp #{tmp_root}/git/.gitconfig #{user_home}")
     end
   end
-end
\ No newline at end of file
+end