apiotics 0.2.10 → 0.2.11
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 +4 -4
- data/lib/apiotics/hardware.rb +11 -10
- data/lib/apiotics/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db6cd04319d0626204bec257c2996307ea450b80
|
4
|
+
data.tar.gz: 5b7aab3cfba5c14cb824f04b2f3d78c4947a9373
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b33c0097709e5bfd1551e8fc1c838d4c23383c92a7f5fe07b3be35a1735960796f0792e68e9a26c21ba3ad81ab751fa7057087718d48b15158addce4d4e035f
|
7
|
+
data.tar.gz: 8b30fde35f8a3b9b0e2c0c9082711414c66a147d89642d66b1f49f659fd655bbb62e2e12b4d66698a9044d63223d539cacc53ea437fcea1ffdfe6732fd294b2e
|
data/lib/apiotics/hardware.rb
CHANGED
@@ -391,6 +391,7 @@ module Apiotics
|
|
391
391
|
end
|
392
392
|
if branding_script_path != nil
|
393
393
|
#puts "Please wait..."
|
394
|
+
puts "Running #{branding_script_path} #{image_path} #{wifi_settings["ssid"]} #{wifi_settings["password"]} #{config_file_path} dhcp"
|
394
395
|
IO.popen("#{branding_script_path} #{image_path} #{wifi_settings["ssid"]} #{wifi_settings["password"]} #{config_file_path} dhcp") do |io|
|
395
396
|
while (line = io.gets) do
|
396
397
|
puts line
|
@@ -433,7 +434,7 @@ module Apiotics
|
|
433
434
|
def self.burn_sd_image(download_directory, image_path, disk)
|
434
435
|
Dir.chdir download_directory
|
435
436
|
img_path = image_path.chomp(".img.gz") + "_branded.img.gz"
|
436
|
-
puts "Burning #{image_path}
|
437
|
+
puts "Burning #{image_path}..."
|
437
438
|
if Hardware.mac == true
|
438
439
|
execute_path = download_directory.to_s + "/burn_image_to_disk.mac.sh"
|
439
440
|
elsif Hardware.linux == true
|
@@ -444,9 +445,9 @@ module Apiotics
|
|
444
445
|
if execute_path == nil
|
445
446
|
puts "This computer is not running a recognized OS. Exiting."
|
446
447
|
else
|
447
|
-
puts "Running sudo #{execute_path} #{image_path}
|
448
|
+
puts "Running sudo #{execute_path} #{image_path}"
|
448
449
|
#pwd = STDIN.getpass("Password:")
|
449
|
-
IO.popen("sudo -S #{execute_path} #{img_path}
|
450
|
+
IO.popen("sudo -S #{execute_path} #{img_path}") do |io|
|
450
451
|
while (line = io.gets) do
|
451
452
|
puts line
|
452
453
|
end
|
@@ -455,16 +456,16 @@ module Apiotics
|
|
455
456
|
end
|
456
457
|
|
457
458
|
def self.sd_card(worker_name, name, config)
|
458
|
-
download_directory = Hardware.check_sd_card_scripts
|
459
|
+
download_directory = Apiotics::Hardware.check_sd_card_scripts
|
459
460
|
if download_directory != nil
|
460
|
-
image_path = Hardware.get_sd_image(download_directory, worker_name)
|
461
|
-
wifi_settings = Hardware.fetch_wifi
|
461
|
+
image_path = Apiotics::Hardware.get_sd_image(download_directory, worker_name)
|
462
|
+
wifi_settings = Apiotics::Hardware.fetch_wifi
|
462
463
|
if wifi_settings != nil
|
463
|
-
config_file_path = Hardware.sd_config_file(worker_name, name, download_directory)
|
464
|
-
if Hardware.brand_sd_image(download_directory, image_path, wifi_settings, config_file_path)
|
465
|
-
disk = Hardware.find_smallest_disk
|
464
|
+
config_file_path = Apiotics::Hardware.sd_config_file(worker_name, name, download_directory)
|
465
|
+
if Apiotics::Hardware.brand_sd_image(download_directory, image_path, wifi_settings, config_file_path)
|
466
|
+
disk = Apiotics::Hardware.find_smallest_disk
|
466
467
|
if disk != "no_disk"
|
467
|
-
Hardware.burn_sd_image(download_directory, image_path, disk)
|
468
|
+
Apiotics::Hardware.burn_sd_image(download_directory, image_path, disk)
|
468
469
|
else
|
469
470
|
puts "No plausible SD card disk found. Please insert an SD card into your computer. Exiting."
|
470
471
|
end
|
data/lib/apiotics/version.rb
CHANGED