vagrant-winrm-syncedfolders 0.1.0 → 1.0.0

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: 868b9258f8e103e9dc60e643f19788dab619c748
4
- data.tar.gz: 82982f674a94cf23045f83e09966673ec3374882
3
+ metadata.gz: 650f7f92fdc8fec5ba9506f1b3671501291fabec
4
+ data.tar.gz: d0df2f6eed24f41cbff7134e5847b1e09cb90dd3
5
5
  SHA512:
6
- metadata.gz: aafb45924e7bf8c69cfe4b77ac1ebe616c90be8ab32a498f42037a25aa926a66aac1d4cf04979c4517aa308c857685b2f7ce2549a89693fdce2e767ee3d6bd99
7
- data.tar.gz: 504d785790e6a05c532f7d2ed07b97c0401622a339bf694278ba5f6a9cfd854eace513d7bf3d4c197ed90471529a35ddb690673b61535218e6148966ca4ab199
6
+ metadata.gz: 1d09172db6e8d2c63c630438d787bd68893593aee69d050d224e40e4c5a0b72b7b943c8bf9471093b2bc7d45ea0e6a1fadf3bd5a97bac110f75b14abee15b4dc
7
+ data.tar.gz: e7c417bdb5dd358a5153e5763f838afa6373724556abf5df9ec1e9b7e71089920dcceb5ad25c4bfda42f4175d4ef448fd08970afe12cff9888e6eba40e475ea7
@@ -1,24 +1,11 @@
1
- AllCops:
2
- Exclude:
3
- - '*.gemspec'
4
-
5
1
  Metrics/LineLength:
6
2
  Max: 120
7
3
 
8
- Metrics/ClassLength:
9
- Max: 150
4
+ StringLiterals:
5
+ EnforcedStyle: double_quotes
10
6
 
11
7
  Style/Documentation:
12
8
  Enabled: false
13
9
 
14
- Metrics/MethodLength:
15
- Max: 20
16
-
17
- StringLiterals:
18
- EnforcedStyle: double_quotes
19
-
20
10
  Style/FileName:
21
11
  Enabled: false
22
-
23
- Metrics/AbcSize:
24
- Max: 100
@@ -0,0 +1,8 @@
1
+ ## 1.0.0 (TBR)
2
+
3
+ * Force dependency on `winrm-fs ~> 0.2.1` to work around bug in the version
4
+ bundled with Vagrant 1.7.4 [GH-3]
5
+
6
+ ## 0.1.0 (2015-05-21)
7
+
8
+ * Initial version (split from `vagrant-managed-servers`)
data/Gemfile CHANGED
@@ -1,12 +1,12 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in vagrant-orchestrate.gemspec
4
- gemspec
5
-
6
- group :development do
7
- gem "vagrant", git: "https://github.com/mitchellh/vagrant.git", ref: "v1.7.2"
8
- end
9
-
10
- group :plugins do
11
- gem "vagrant-winrm-syncedfolders", path: "."
12
- end
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in vagrant-orchestrate.gemspec
4
+ gemspec
5
+
6
+ group :development do
7
+ gem "vagrant", git: "https://github.com/mitchellh/vagrant.git", ref: "v1.7.4"
8
+ end
9
+
10
+ group :plugins do
11
+ gem "vagrant-winrm-syncedfolders", path: "."
12
+ end
data/README.md CHANGED
@@ -1,22 +1,32 @@
1
1
  # vagrant-winrm-syncedfolders
2
2
 
3
- Vagrant plugin that allows you to use WinRM as a folder synchronization mechanism.
3
+ vagrant-winrm-syncedfolders is a Vagrant plugin that allows you to use WinRM as a folder synchronization mechanism.
4
4
 
5
- *Limitations:* The WinRM communicator that is used to perform the folder synchronization is known to be slow for large numbers of files.
5
+ *Limitations:* The WinRM communicator that is used to perform the folder synchronization is known to be slow for large directories.
6
6
 
7
7
  ## Installation
8
8
 
9
+ *Note:* vagrant-winrm-syncedfolders versions 1.0.0 and later *only* supports
10
+ Vagrant 1.7.4 and later, due to an issue with the version of `winrm-fs`
11
+ bundled with the installer.
12
+
13
+ Vagrant 1.7.4 users can install this plugin via:
14
+
9
15
  vagrant plugin install vagrant-winrm-syncedfolders
10
16
 
17
+ Vagrant 1.7.2 users will need to continue using an old version of the plugin via:
18
+
19
+ vagrant plugin install vagrant-winrm-syncedfolders --plugin-version 0.1.0
20
+
11
21
  ## Usage
12
22
 
13
23
  Upon installation of this plugin the priority order of synced folders for Windows guests will be as follows:
14
24
 
15
- - SMB
25
+ - SMB (Windows host only)
16
26
  - WinRM
17
27
  - Rsync
18
28
 
19
- It is also possible to force a synced folder to use the WinRM:
29
+ It is also possible to force a synced folder to use the WinRM folder sync:
20
30
 
21
31
  config.vm.synced_folder ".", "/vagrant", type: "winrm"
22
32
 
@@ -1,14 +1,13 @@
1
- require "pathname"
2
-
3
- require "vagrant-winrm-syncedfolders/plugin"
4
-
5
- module VagrantPlugins
6
- module SyncedFolderWinRM
7
- # This returns the path to the source of this plugin.
8
- #
9
- # @return [Pathname]
10
- def self.source_root
11
- @source_root ||= Pathname.new(File.expand_path("../../", __FILE__))
12
- end
13
- end
14
- end
1
+ require "pathname"
2
+ require "vagrant-winrm-syncedfolders/plugin"
3
+
4
+ module VagrantPlugins
5
+ module SyncedFolderWinRM
6
+ # This returns the path to the source of this plugin.
7
+ #
8
+ # @return [Pathname]
9
+ def self.source_root
10
+ @source_root ||= Pathname.new(File.expand_path("../../", __FILE__))
11
+ end
12
+ end
13
+ end
@@ -1,24 +1,30 @@
1
- require "vagrant"
2
-
3
- module VagrantPlugins
4
- module SyncedFolderWinRM
5
- # This plugin implements WinRM synced folders.
6
- class Plugin < Vagrant.plugin("2")
7
- name "WinRM synced folders"
8
- description <<-EOF
9
- The WinRM synced folders plugin enables you to use WinRM as a mechanism
10
- to transfer files to a guest machine. There are known limitations to this
11
- mechanism, most notably that file tranfer is slow for large numbers of files.
12
- EOF
13
-
14
- synced_folder("winrm", 6) do
15
- require_relative "synced_folder"
16
- init!
17
- SyncedFolder
18
- end
19
-
20
- def self.init!
21
- end
22
- end
23
- end
24
- end
1
+ require "vagrant"
2
+
3
+ module VagrantPlugins
4
+ module SyncedFolderWinRM
5
+ # This plugin implements WinRM synced folders.
6
+ class Plugin < Vagrant.plugin("2")
7
+ name "WinRM synced folders"
8
+ description <<-EOF
9
+ The WinRM synced folders plugin enables you to use WinRM as a mechanism
10
+ to transfer files to a guest machine. There are known limitations to this
11
+ mechanism, most notably that file tranfer is slow for large numbers of files.
12
+ EOF
13
+
14
+ # The 6 below represents priority. Choosing a value of 6 puts it right in between
15
+ # the built in synced folder implementations of SMB (7) and RSync (5), which is
16
+ # useful since the SMB implementation has some non-trivial prerequisites and the
17
+ # RSync implementation isn't guaranteed to work on Windows natively. This provides
18
+ # a nice way to fall back to something that is pretty sure to work, with the cost
19
+ # being slower transfer times.
20
+ synced_folder("winrm", 6) do
21
+ require_relative "synced_folder"
22
+ init!
23
+ SyncedFolder
24
+ end
25
+
26
+ def self.init!
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,46 +1,51 @@
1
- require "log4r"
2
-
3
- require "vagrant/util/retryable"
4
-
5
- module VagrantPlugins
6
- module SyncedFolderWinRM
7
- class SyncedFolder < Vagrant.plugin("2", :synced_folder)
8
- include Vagrant::Util::Retryable
9
-
10
- def initialize(*args)
11
- super
12
- @logger = Log4r::Logger.new("vagrant::synced_folders::winrm")
13
- end
14
-
15
- def usable?(machine, _raise_error = false)
16
- machine.config.vm.communicator == :winrm
17
- end
18
-
19
- def prepare(_machine, _folders, _opts)
20
- end
21
-
22
- def enable(machine, folders, _nfsopts)
23
- folders.each do |_id, data|
24
- hostpath = File.expand_path(data[:hostpath], machine.env.root_path)
25
- guestpath = data[:guestpath]
26
-
27
- machine.ui.info("Uploading with WinRM: #{hostpath} => #{guestpath}")
28
- machine.communicate.tap do |comm|
29
- # When syncing many files, we've see SEC_E_INVALID_TOKEN errors
30
- # that appear to be transient (try again and it goes away). Let's
31
- # retry a few times to add some robustness.
32
- attempts = 1
33
- retryable(tries: 3, sleep: 1) do
34
- @logger.debug("Attempting WinRM upload attempt number #{attempts}")
35
- comm.upload(hostpath, guestpath)
36
- attempts += 1
37
- end
38
- end
39
- end
40
- end
41
-
42
- def cleanup(_machine, _opts)
43
- end
44
- end
45
- end
46
- end
1
+ require "log4r"
2
+
3
+ require "vagrant/util/retryable"
4
+
5
+ module VagrantPlugins
6
+ module SyncedFolderWinRM
7
+ class SyncedFolder < Vagrant.plugin("2", :synced_folder)
8
+ include Vagrant::Util::Retryable
9
+
10
+ def initialize(*args)
11
+ super
12
+ @logger = Log4r::Logger.new("vagrant::synced_folders::winrm")
13
+ end
14
+
15
+ def usable?(machine, _raise_error = false)
16
+ machine.config.vm.communicator == :winrm
17
+ end
18
+
19
+ def prepare(_machine, _folders, _opts)
20
+ end
21
+
22
+ def enable(machine, folders, _nfsopts)
23
+ folders.each do |_id, data|
24
+ hostpath = File.expand_path(data[:hostpath], machine.env.root_path)
25
+ guestpath = data[:guestpath]
26
+ sync machine, hostpath, guestpath
27
+ end
28
+ end
29
+
30
+ def cleanup(_machine, _opts)
31
+ end
32
+
33
+ private
34
+
35
+ def sync(machine, hostpath, guestpath)
36
+ machine.ui.info("Uploading with WinRM: #{hostpath} => #{guestpath}")
37
+ machine.communicate.tap do |comm|
38
+ # When syncing many files, we've see SEC_E_INVALID_TOKEN errors
39
+ # that appear to be transient (try again and it goes away). Let's
40
+ # retry a few times to add some robustness.
41
+ attempts = 1
42
+ retryable(tries: 3, sleep: 1) do
43
+ @logger.debug("Attempting WinRM upload attempt number #{attempts}")
44
+ comm.upload(hostpath, guestpath)
45
+ attempts += 1
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module SyncedFolderWinRM
3
- VERSION = "0.1.0"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = VagrantPlugins::SyncedFolderWinRM::VERSION
9
9
  spec.authors = ["Christopher Baldauf"]
10
10
  spec.email = ["cbaldauf@cimpress.com"]
11
- spec.summary = %q{Use WinRM synced folders for Windows guests using the WinRM communcator}
11
+ spec.summary = "Use WinRM synced folders for Windows guests using the WinRM communcator"
12
12
  spec.homepage = "https://github.com/Cimpress-MCP/vagrant-winrm-syncedfolders"
13
13
  spec.license = "Apache 2.0"
14
14
 
@@ -17,6 +17,10 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
+ # 0.2.0 bundled with vagrant 1.7.4 has a known bug
21
+ # we can force this dependency as a stop-gap [GH-3]
22
+ spec.add_runtime_dependency "winrm-fs", "~> 0.2.2"
23
+
20
24
  spec.add_development_dependency "bundler", "~> 1.6"
21
25
  spec.add_development_dependency "rake", "~> 10.0"
22
26
  spec.add_development_dependency "rspec", "~> 2.14"
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-winrm-syncedfolders
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Baldauf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-21 00:00:00.000000000 Z
11
+ date: 2015-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: winrm-fs
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.2.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.2.2
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -75,6 +89,7 @@ extra_rdoc_files: []
75
89
  files:
76
90
  - ".gitignore"
77
91
  - ".rubocop.yml"
92
+ - CHANGELOG.md
78
93
  - Gemfile
79
94
  - LICENSE
80
95
  - README.md
@@ -105,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
120
  version: '0'
106
121
  requirements: []
107
122
  rubyforge_project:
108
- rubygems_version: 2.2.3
123
+ rubygems_version: 2.4.8
109
124
  signing_key:
110
125
  specification_version: 4
111
126
  summary: Use WinRM synced folders for Windows guests using the WinRM communcator