vagrant-nfs4j 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4296f3bbb1d4aa3a2e8c76913e7bdf3fa2af6a33ba0c669f313ce9a5960bebe
4
- data.tar.gz: 62aab3a846663ed13f5e41fb56f3bbf33148025ddd4e72b55447403188587ad5
3
+ metadata.gz: 7beb1cfc59c2071e3d812d4f03256afd142232df130c75c5cc86fa2ba353a211
4
+ data.tar.gz: e60375d6b277bee89018d19f178b1ecc6b41806994bb5f6f60c2ec5f6244a4df
5
5
  SHA512:
6
- metadata.gz: 2a4713b8db011857a9270d86008a514c5f37138734d08ce7032298d1443e3e17e9b3d1ffd85d85f93db28af22b3e3e6f26d15b1ffb0bc223c85ba589c26d674a
7
- data.tar.gz: 8dccc782e3537d7e606fbc269e5d43aae5fa70ceeba7d15265201007a1dc623af6cb097f419c5cc9ea81f9e2b95a04af7e3121d4e637a72e35d19bdd5acf1ed3
6
+ metadata.gz: '087d1dab737461f4c20ea65221a228cfe5b3d60490fcb742c0474ac5cf93449bcc40bbf28e25e7f8b5632c0c337286a756dfb52d4c889577789ec5b30c6b1dce'
7
+ data.tar.gz: e379fced5cbc2c84e78056501772f1798be5186b696db8933357076f465810dda1c77601159e7700ca32c85136dbe4228e2045b9776d07729f5d1ac0e15e34e5
data/.gitignore CHANGED
@@ -8,4 +8,5 @@
8
8
  /tmp/
9
9
 
10
10
  .vagrant
11
- /*.log
11
+ /*.log
12
+ /vagrant-nfs4j-*.gem
@@ -98,7 +98,7 @@ module VagrantNfs4j
98
98
  return false
99
99
  end
100
100
  begin
101
- r = RestClient::Request.execute method: :get, url: "http://localhost:#{@api_port}/ping", headers: {accept: :json}.merge(self.headers()), timeout: 5
101
+ r = RestClient::Request.execute method: :get, url: "http://127.0.0.1:#{@api_port}/ping", headers: {accept: :json}.merge(self.headers()), timeout: 5
102
102
  data = JSON.parse(r.body)
103
103
  return data === 'pong'
104
104
  rescue
@@ -168,6 +168,7 @@ module VagrantNfs4j
168
168
  if @api_bearer
169
169
  opts = " --api-bearer=#{@api_bearer}#{opts}"
170
170
  end
171
+ opts = " --api-ip=127.0.0.1#{opts}"
171
172
  opts = " --api-port=#{@api_port}#{opts}"
172
173
  opts = " --no-share#{opts}"
173
174
 
@@ -191,7 +192,7 @@ module VagrantNfs4j
191
192
 
192
193
  def stop
193
194
  begin
194
- RestClient.post "http://localhost:#{@api_port}/stop", nil, self.headers()
195
+ RestClient.post "http://127.0.0.1:#{@api_port}/stop", nil, self.headers()
195
196
  rescue
196
197
  raise StopFailed
197
198
  end
@@ -206,7 +207,7 @@ module VagrantNfs4j
206
207
 
207
208
  def attach(share)
208
209
  begin
209
- RestClient.post "http://localhost:#{@api_port}/attach", share.to_json, self.headers()
210
+ RestClient.post "http://127.0.0.1:#{@api_port}/attach", share.to_json, self.headers()
210
211
  rescue RestClient::Exception => e
211
212
  if e.http_code != 409
212
213
  raise AttachFailed
@@ -220,7 +221,7 @@ module VagrantNfs4j
220
221
 
221
222
  def detach(share)
222
223
  begin
223
- RestClient.post "http://localhost:#{@api_port}/detach", share.to_json, self.headers()
224
+ RestClient.post "http://127.0.0.1:#{@api_port}/detach", share.to_json, self.headers()
224
225
  rescue RestClient::Exception => e
225
226
  if e.http_code != 409
226
227
  raise DetachFailed
@@ -237,7 +238,7 @@ module VagrantNfs4j
237
238
  return false
238
239
  end
239
240
  begin
240
- status = RestClient.get "http://localhost:#{@api_port}/status", self.headers()
241
+ status = RestClient.get "http://127.0.0.1:#{@api_port}/status", self.headers()
241
242
  return JSON.parse(status)
242
243
  rescue
243
244
  raise StatusFailed
@@ -1,3 +1,3 @@
1
1
  module VagrantNfs4j
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
@@ -30,7 +30,9 @@ nfs4j-daemon under the hood.
30
30
  # Specify which files should be added to the gem when it is released.
31
31
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
32
32
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
33
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
33
+ `git ls-files -z`.split("\x0").reject do |f|
34
+ f.match(%r{^(test|spec|features)/}) || f.match(%r{^(Vagrantfile|config.yaml)})
35
+ end
34
36
  end
35
37
  spec.bindir = "exe"
36
38
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-nfs4j
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rémi Alvergnat
@@ -52,11 +52,9 @@ files:
52
52
  - LICENSE
53
53
  - README.md
54
54
  - Rakefile
55
- - Vagrantfile
56
55
  - bin/nfs4j-daemon.exe
57
56
  - bin/nfs4j-daemon.jar
58
57
  - bin/request_uac_header.bat
59
- - config.yaml
60
58
  - lib/vagrant-nfs4j.rb
61
59
  - lib/vagrant-nfs4j/cap/nfs.rb
62
60
  - lib/vagrant-nfs4j/config/config.rb
data/Vagrantfile DELETED
@@ -1,60 +0,0 @@
1
- # -*- mode: ruby -*-
2
- # vi: set ft=ruby :
3
-
4
- # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5
- VAGRANTFILE_API_VERSION = '2'
6
-
7
- ###############################
8
- # General project settings
9
- # -----------------------------
10
- box_name = 'ubuntu/xenial64'
11
-
12
- require 'yaml'
13
-
14
- current_dir = File.dirname(File.expand_path(__FILE__))
15
- config_file = YAML.load_file("#{current_dir}/config.yaml")
16
-
17
- ip_address = config_file['ip_address'] || '192.168.1.100'
18
-
19
- if config_file['ssh'].nil? || config_file['ssh']['username'].nil?
20
- ssh_username = 'vagrant'
21
- else
22
- ssh_username = config_file['ssh']['username']
23
- end
24
-
25
- Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
26
- config.vm.box = box_name
27
-
28
- config.vm.network 'private_network', ip: ip_address, use_dhcp_assigned_default_route: true
29
-
30
- synced_folders = config_file['synced_folders']
31
- if Vagrant.has_plugin?('vagrant-nfs4j') and synced_folders
32
- synced_folders.each do |id, folder|
33
- mount_options = if folder.key?('mount_options') then
34
- folder['mount_options']
35
- else
36
- %w(noatime nodiratime actimeo=1)
37
- end
38
- mount_options = if not mount_options or mount_options.kind_of?(Array) then
39
- mount_options
40
- else
41
- mount_options.split(/[,\s]/)
42
- end
43
-
44
- mount_options.push('uid=1000')
45
- mount_options.push('gid=1000')
46
-
47
- source = "#{folder['source']}"
48
- target = if folder['target'].start_with?("/") then
49
- folder['target']
50
- else
51
- "/home/#{ssh_username}/#{folder['target']}"
52
- end
53
-
54
- config.vm.synced_folder source, target,
55
- id: "#{id}",
56
- type: 'nfs',
57
- mount_options: mount_options
58
- end
59
- end
60
- end
data/config.yaml DELETED
@@ -1,8 +0,0 @@
1
- ip_address: 192.168.1.100
2
- synced_folders:
3
- user:
4
- source: 'D:\Users\FRUP67305' # absolute or relative path from Vagrantfile
5
- target: '/D/Users/FRUP67305' # absolute or relative path from home of VM
6
- project:
7
- source: 'C:\' # absolute or relative path from Vagrantfile
8
- target: '/C' # absolute or relative path from home of VM