kitchen-lxd 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
  SHA1:
3
- metadata.gz: d8b4b8d0c6bdd0c29cd0017f24ced51347c69e47
4
- data.tar.gz: 51fc54f38b95e6dc5134c819d6fee81f8e336e5c
3
+ metadata.gz: 7b5f6f350edea90a709ffead687670c907a9c633
4
+ data.tar.gz: bf6eb5e0662a9192eaab03da7bff0e76365e0594
5
5
  SHA512:
6
- metadata.gz: 45825e97e2ab9c3290a4d231099a73ebff730ab1fd3a9f0019c12cf244d7a816272b47949ec02ee16f2883f5c2fade9c29880f8211d863db996eeb86bd69889d
7
- data.tar.gz: 82f62bb46aec07952acd8e5872db76fc0a03b17198421dcb42bcf2768f31b61780eb9014c4a5742b82dfc5cf73dff75988cd29465776a36a2c8e50b04aa2cfd0
6
+ metadata.gz: d666a0dcce090ba13431e6a52841ea8713068785d9efb85051bd785edb56401f1fc5b442e374e5a27219390f75846effd190fddcab291f8b30bc452fb17f42a3
7
+ data.tar.gz: c8b7037a3a11d3317c688e81f117fa8f2d8397a388e16c1faf555a0e698e2d2d5d8d007b3133642a36e557ba197655aabe79b913b9154f9f250235e25737a508
@@ -1,8 +1,12 @@
1
- ## 0.2.1 (2017-10-13)
1
+ ## 0.2.2 (January 30, 2018)
2
+
3
+ - Fix upload bug.
4
+
5
+ ## 0.2.1 (October 13, 2017)
2
6
 
3
7
  - Add workaround to Ubuntu hostnamectl bug in LXD (https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1575779)
4
8
 
5
- ## 0.2.0 (2017-10-11)
9
+ ## 0.2.0 (October 11, 2017)
6
10
 
7
11
  - Add LXD transport.
8
12
  - Remove ssh transport support.
@@ -10,10 +14,10 @@
10
14
  - Allow specifying path to lxc executable.
11
15
  - Support downloading image from remote, if it's not available locally.
12
16
 
13
- ## 0.1.1 (2017-02-08)
17
+ ## 0.1.1 (February 08, 2017)
14
18
 
15
19
  - Support Lxd version 2.8.
16
20
 
17
- ## 0.1.0 (2017-02-07)
21
+ ## 0.1.0 (February 07, 2017)
18
22
 
19
23
  - Initial release.
@@ -62,11 +62,11 @@ module Kitchen
62
62
  info 'Wait for network to become ready.'
63
63
  9.times do
64
64
  s = fetch_state[:state].nil? ? @state[:State] : @state[:state]
65
- inet = s[:network][:eth0][:addresses].detect do |i|
65
+ inet = s.dig(:network, :eth0, :addresses)&.detect do |i|
66
66
  i[:family] == 'inet'
67
67
  end
68
68
  return inet[:address] if inet
69
- sleep 1 unless defined?( Minitest )
69
+ sleep 1 unless defined?( Kitchen::Driver::UnitTest )
70
70
  end
71
71
  nil
72
72
  end
@@ -76,18 +76,17 @@ module Kitchen
76
76
  end
77
77
 
78
78
  def execute( command )
79
- return if command.nil?
79
+ return if command.nil? or command.empty?
80
80
  run_command "#@binary exec #@name -- #{command}"
81
81
  end
82
82
 
83
83
  def login_command
84
- LoginCommand.new( "#@binary exec #@name -- bash", {} )
84
+ LoginCommand.new( "#@binary exec #@name -- sh", {} )
85
85
  end
86
86
 
87
87
  def upload( locals, remote )
88
- locals.each do |local|
89
- run_command "#@binary file push -rp #{local} #@name/#{remote}"
90
- end
88
+ # Mixlib::ShellOut.new("#@binary file push --verbose --debug -r #{locals.join(' ')} #@name#{remote}" ).run_command
89
+ run_command "#@binary file push -r #{locals.join(' ')} #@name#{remote}"
91
90
  end
92
91
 
93
92
  def fix_chef_install( platform )
@@ -105,7 +104,7 @@ module Kitchen
105
104
  execute 'ln -s /usr/bin/true /usr/bin/hostnamectl'
106
105
  end
107
106
 
108
- private
107
+ # private
109
108
 
110
109
  def image_exists?
111
110
  !JSON.parse(
@@ -128,7 +127,7 @@ module Kitchen
128
127
  end
129
128
 
130
129
  def device_attached?( network )
131
- fetch_state[:devices] and @state[:devices][network.to_sym]
130
+ fetch_state.dig(:devices, network.to_sym) ? true : false
132
131
  end
133
132
  end
134
133
  end
@@ -20,7 +20,7 @@ module Kitchen
20
20
  module Driver
21
21
  class Lxd
22
22
  # Version string for Lxd Kitchen driver
23
- VERSION = '0.2.1'
23
+ VERSION = '0.2.2'
24
24
  end
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-lxd
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
  - Juri Timošin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-13 00:00:00.000000000 Z
11
+ date: 2018-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.14'
19
+ version: '1.17'
20
20
  type: :runtime
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.14'
26
+ version: '1.17'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '12.0'
41
- - !ruby/object:Gem::Dependency
42
- name: mocha
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '1.1'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '1.1'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: minitest
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +80,7 @@ dependencies:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
82
  version: '0.10'
97
- description: Kitchen::Driver::Lxd - an Lxd driver for Test Kitchen.
83
+ description: Kitchen::Driver::Lxd - an Lxd driver (and transport) for Test Kitchen.
98
84
  email:
99
85
  - draco.ater@gmail.com
100
86
  executables: []
@@ -120,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
120
106
  requirements:
121
107
  - - "~>"
122
108
  - !ruby/object:Gem::Version
123
- version: '2.0'
109
+ version: '2.3'
124
110
  required_rubygems_version: !ruby/object:Gem::Requirement
125
111
  requirements:
126
112
  - - ">="