frachtraum 0.0.3 → 0.0.4.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODhlMDk0OWE3ZDUzNTIwM2RkNmFmMjk2OTRlMDlmMzBjMTU2OGM0ZA==
4
+ ZjQwM2Y2NTdkZTFkNDY1ODA1OTc2MmNkNzNlMjM2NjZiNDMwMmIyZQ==
5
5
  data.tar.gz: !binary |-
6
- YmQwYzliN2JmYWU3NmMyNjdjZWJhNTI2Nzk2YjM0NWM3OGRmMWQyYQ==
6
+ MGJiZWY5NzAzNmQxZDgxZTk3YjVkODBhZmRjYjQ0YzA3NGM0NzU3MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTBhMmU5OWQyYTk4OTRlZGRjMjc4YTY3YTk3NzBiZmI2YmM4OTk3Nzg2NzMy
10
- OGEwZTk4NThlYjE4MDg1NjhlMzAyYjJjNWQxOWZiYWRiZTkyMzIyOWMyOWZl
11
- YTM2YmFiNTFkYjAzZjExMmY3NTU5YTdiZDU1NTlkYmY4YmU3ZGI=
9
+ MDYyYTQ2N2YwNTdhOWYwNGMzN2Q0YmVlOWE2YzJjYzhmM2Q3NWQzMGE1ZGMy
10
+ ZGE1MmZiMWEwMGZhNmQ2MTcxYTZkM2IyNzFhZmQ4MjlmNGU0OWFkY2Q0Y2U2
11
+ MDhkOTY3N2MyMjQ0ZmU5YTEzZmQ4NmJjMzI0MjYwNGIxNTgwZDg=
12
12
  data.tar.gz: !binary |-
13
- NGVkNjJhMGQ0YmEwMDU5OTk2MmZiMDdiYWNkZjk5ODJjNjViZmIwMTZkNzkz
14
- MDUyYjc3ZGRjYjg5MDFhOTFmMTM3ZGUwMTA1MTc0Y2JlNTA5MGRhOGM5OGY5
15
- ZjVmMDBlYzQ1ZDZhNTBkMzFjMTMzNjE2YzA5MjhiZGVkYzM0NTE=
13
+ ZTE4YWEzODAyYTFmYWU0MGMxYTRiMzBkNGFjOTBmNmNiMDJjNTJhODM2MDUy
14
+ NmFiYmEyM2E1NDJkMzJmYjgyZTU1MWY2NGM5Mjg1ZTI1NTVmZTFiODA3MGQw
15
+ NDQyY2ViODc0MTVmM2UxYzMxMmJiOGZjYWE0YWNhYTEwOGMxNTE=
@@ -1,6 +1,6 @@
1
1
  module Frachtraum
2
2
 
3
- REQUIRED_TOOLS_BSD = ['dd','grep','gpart','glabel','geli','zfs','zpool']
3
+ REQUIRED_TOOLS_BSD = ['dd','grep','gpart','glabel','geli','zfs','zpool']
4
4
 
5
5
  def attach_bsd(password, volume=nil)
6
6
 
@@ -9,7 +9,7 @@ module Frachtraum
9
9
 
10
10
  # first of all, decrypt and mount all depots
11
11
  volumes.each do |v|
12
- print "decrypting /dev/label/#{v}...".ljust(35,".") # TODO: the length should be dynamically calculated, for tm targets as well
12
+ print "decrypting #{v}...".ljust(OUTPUT_DOTS_LEN,".") # TODO: the length should be dynamically calculated, for tm targets as well
13
13
 
14
14
  output = %x( echo #{password} | geli attach -d -j - /dev/label/#{v} 2>&1 )
15
15
  if $?.success?
@@ -23,7 +23,7 @@ module Frachtraum
23
23
 
24
24
  # mount timemachine targets as well
25
25
  Frachtraum::TIMEMACHINE_TARGETS.each do |tmtarget|
26
- print "mounting timemachine target #{tmtarget}...".ljust(35,".") # TODO: the length should be dynamically calculated, for tm targets as well
26
+ print "mounting tm #{tmtarget}...".ljust(OUTPUT_DOTS_LEN,".") # TODO: the length should be dynamically calculated, for tm targets as well
27
27
 
28
28
  output = %x( zfs mount #{tmtarget} 2>&1 )
29
29
  if $?.success? then puts "DONE"
@@ -31,7 +31,7 @@ module Frachtraum
31
31
  end
32
32
 
33
33
  # restart samba so it reports the correct pool size
34
- print "restarting samba server..."
34
+ print "restarting samba server...".ljust(OUTPUT_DOTS_LEN,".") # TODO: the length should be dynamically calculated, for tm targets as well
35
35
  output = %x( /usr/local/etc/rc.d/samba restart 2>&1 )
36
36
  if $?.success? then puts Rainbow("DONE").green
37
37
  else puts Rainbow("FAILED!").red + " --> #{output}" end
data/lib/frachtraum.rb CHANGED
@@ -14,7 +14,7 @@ require 'frachtraum/osx'
14
14
 
15
15
  module Frachtraum
16
16
 
17
- VERSION = '0.0.3'.freeze
17
+ VERSION = '0.0.4-alpha'.freeze
18
18
 
19
19
  # Kibibyte, Mebibyte, Gibibyte, etc... all the IEC sizes
20
20
  BYTES_IN_KiB = 2**10
@@ -28,6 +28,8 @@ module Frachtraum
28
28
  BYTES_IN_GB = 10**9
29
29
  BYTES_IN_TB = 10**12
30
30
 
31
+ OUTPUT_DOTS_LEN = 40 # TODO: the length should be dynamically calculated, based on the strlen of longest tmtarget or volume
32
+
31
33
 
32
34
  def exec_cmd(msg, cmd)
33
35
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frachtraum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4.pre.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maximilian Irro
@@ -115,9 +115,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
115
  version: 1.9.3
116
116
  required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  requirements:
118
- - - ! '>='
118
+ - - ! '>'
119
119
  - !ruby/object:Gem::Version
120
- version: '0'
120
+ version: 1.3.1
121
121
  requirements: []
122
122
  rubyforge_project:
123
123
  rubygems_version: 2.4.2