kanrisuru 0.16.7 → 0.16.8

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: 1dad2f67bc43f63f08358733b56f5f2c60b0badba2fad40072b5fd856bcd0f00
4
- data.tar.gz: 84a2b6a7a85bcbd2282fed9540e70a86517605e2681a64e231681a5d156f3332
3
+ metadata.gz: 19051625865d261facba9c6c32d6a91ae68cbc23e6723713c07eee7f674dba04
4
+ data.tar.gz: 62485343ad12ecc892c70ad30168f30366bdcb6cc4dd2eff37aa378e63790186
5
5
  SHA512:
6
- metadata.gz: a9cc599d2f48f0d3643489b87c850be0972b217e67b4e488531f5e6de0727fe265460f8af0023917bd65920805d763047b801a23fb49bf5abc78f745a8900d14
7
- data.tar.gz: de40ab48a6758caa3ae9d4f8de9a71b0c15723d5921bb065054003e9756b874a7f248da34c2b7721b78f29b967aa5c61d9a07ac7582a1c994df0261bf3714028
6
+ metadata.gz: '08760e0e1d80c29dd4db38984a13aabb554321555820834f4ccb50ba48562af5e1fd932e946bb7fd223d734dcf936c199b24936d0f3a1204e70dc4b204c25f95'
7
+ data.tar.gz: 5d6590c530553c36b0aea32e2dff7fe14f6ced645445d53933b4e564364a44786825fb8ae3cbc886bfe418edcc04c03bba4c8ed297c2b75ac3b31a7a1ce7483c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Kanrisuru 0.16.8 (December 27, 2021) ##
2
+ * Fix return value of field for dmi parser.
3
+ * Fix upload command to copy contents of directory when transfering directories from tmp location.
4
+
1
5
  ## Kanrisuru 0.16.7 (December 27, 2021) ##
2
6
  * Update homepage to docs website.
3
7
 
@@ -94,40 +94,40 @@ module Kanrisuru
94
94
 
95
95
  def dmi_field_translate(struct, field)
96
96
  field = dmi_scrub_field(field)
97
-
98
97
  case struct.dmi_type
99
98
  when 'Memory Device'
100
99
  case field
101
100
  when 'size'
102
- 'mem_size'
101
+ field = 'mem_size'
103
102
  end
104
103
  when 'System Slots'
105
104
  case field
106
105
  when 'length'
107
- 'slot_length'
106
+ field = 'slot_length'
108
107
  end
109
108
  when 'OEM Strings'
110
109
  case field
111
110
  when /^string/
112
- 'strings'
111
+ field = 'strings'
113
112
  end
114
113
  when 'Boot Integrity Services'
115
114
  case field
116
115
  when '16_bit_entry_point_address'
117
- 'sixteen_bit_entry_point_address'
116
+ field = 'sixteen_bit_entry_point_address'
118
117
  when '32_bit_entry_point_address'
119
- 'thirty_two_bit_entry_point_address'
118
+ field = 'thirty_two_bit_entry_point_address'
120
119
  end
121
- else
122
- field
123
120
  end
121
+
122
+ field
124
123
  end
125
124
 
126
125
  def dmi_scrub_field(field)
127
126
  field = field.downcase
128
127
  field = field.gsub(/\s/, '_')
129
128
  field = field.gsub('-', '_')
130
- field.gsub(':', '')
129
+ field = field.gsub(':', '')
130
+ field
131
131
  end
132
132
 
133
133
  def dmi_type_to_struct(type)
@@ -10,6 +10,15 @@ module Kanrisuru
10
10
  result = ssh.scp.upload!(local_path, tmp_path, opts)
11
11
  raise 'Unable to upload file' unless result
12
12
 
13
+ ## Need to copy internal dir contents, not the tmp dir itself
14
+ if opts[:recursive]
15
+ tmp_path = "#{tmp_path}/*"
16
+
17
+ unless dir?(remote_path)
18
+ mkdir(remote_path, silent: true)
19
+ end
20
+ end
21
+
13
22
  result = mv(tmp_path, remote_path)
14
23
  raise 'Unable to move file to remote path' unless result.success?
15
24
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kanrisuru
4
- VERSION = '0.16.7'
4
+ VERSION = '0.16.8'
5
5
  end
@@ -68,7 +68,7 @@ RSpec.shared_examples 'transfer' do |os_name, host_json, spec_dir|
68
68
  end
69
69
 
70
70
  it 'uploads a dir' do
71
- path = '../meta/'
71
+ path = '/home/ubuntu/kanrisuru/meta/'
72
72
  dest_path = "#{spec_dir}/meta"
73
73
 
74
74
  result = host.upload(path, dest_path, recursive: true)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanrisuru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.7
4
+ version: 0.16.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Mammina