vagrant-guests-photon 1.0.3 → 1.0.4

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: 3f068c2d0f88fbb767baf0d3e19c5a691bcd6e39
4
- data.tar.gz: ebd485009371016f2582474a39111700d721cbb6
3
+ metadata.gz: 5661eae2e1ac8a7dba4c1cdf1d0f1b96dc971b1b
4
+ data.tar.gz: 3c5d6b704433efc4d77060522597fce9d19826e7
5
5
  SHA512:
6
- metadata.gz: 57691f75a8ab900dfb4ce87fd08bd6654267cb534336fd9ee578d5448eea6c8bb6787991e4d4d2aa13640d04b2e7eb8de71414d4377dd914fe7c99b3b92d2f6f
7
- data.tar.gz: ab118243e154017d22d689ec7e6c45df64d78faffe92a0cbeebc09d6828f1389a93411c63cb4a8571be6a894023d5af5c8a0214741963cffea4297dae3e05bfd
6
+ metadata.gz: 54045005398f6386f6edbee97c278155b357ca7e75a2e4d28c67315817ba2fe6ab68e8ebefb83efa13f97b872a65b73f0366dd113ef4783095cfa3cd4f87ab4b
7
+ data.tar.gz: f9a93e899d7947e43a918c5983fe54f44e0ca7ab3c421620e39eb4b8e811d024877f0fa71b9777ecd6c00d1b05c78064743e3c65eff2ec0208d6f451101cbf96
data/.travis.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0
3
+ - 2.2.3
@@ -7,8 +7,10 @@ module VagrantPlugins
7
7
  class ChangeHostName
8
8
  def self.change_host_name(machine, name)
9
9
  machine.communicate.tap do |comm|
10
- unless comm.test("sudo hostname --fqdn | grep '#{name}'")
11
- comm.sudo("hostname #{name.split('.')[0]}")
10
+ unless comm.test("hostnamectl --static | grep '#{name}'")
11
+ comm.sudo("rm /etc/machine-id")
12
+ comm.sudo("systemd-machine-id-setup")
13
+ comm.sudo("hostnamectl set-hostname #{name.split('.')[0]}")
12
14
  end
13
15
  end
14
16
  end
@@ -4,6 +4,6 @@
4
4
  module VagrantPlugins
5
5
  # Set version for vagrant-guests-photon gem.
6
6
  module GuestPhoton
7
- VERSION = '1.0.3'
7
+ VERSION = '1.0.4'
8
8
  end
9
9
  end
@@ -9,8 +9,10 @@ describe VagrantPlugins::GuestPhoton::Cap::ChangeHostName do
9
9
 
10
10
  it 'should change hostname when hostname is differ from current' do
11
11
  hostname = 'vagrant-photon'
12
- expect(communicate).to receive(:test).with("sudo hostname --fqdn | grep 'vagrant-photon'")
13
- communicate.should_receive(:sudo).with("hostname #{hostname.split('.')[0]}")
12
+ expect(communicate).to receive(:test).with("hostnamectl --static | grep 'vagrant-photon'")
13
+ communicate.should_receive(:sudo).with("rm /etc/machine-id")
14
+ communicate.should_receive(:sudo).with("systemd-machine-id-setup")
15
+ communicate.should_receive(:sudo).with("hostnamectl set-hostname #{hostname.split('.')[0]}")
14
16
  described_class.change_host_name(machine, hostname)
15
17
  end
16
18
 
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.summary = 'VMware Photon Guest Plugin for Vagrant'
15
15
  s.description = 'Enables Vagrant to manage VMware Photon machines.'
16
16
 
17
- s.add_development_dependency 'bundler', '~> 1.3'
17
+ s.add_development_dependency 'bundler'
18
18
  s.add_development_dependency 'rake'
19
19
  s.add_development_dependency 'rspec-core', '~> 2.14'
20
20
  s.add_development_dependency 'rspec-expectations', '~> 2.14'
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-guests-photon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Rapposelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-05 00:00:00.000000000 Z
11
+ date: 2016-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.3'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement