tdi 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/helper/file.rb +8 -8
- data/lib/tdi/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f667efd818c32c1de975332ee09be3747289808
|
4
|
+
data.tar.gz: 0cf62be71c8cfec8340700096c3e6dd971973c17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb7abf813d5c473abe06ca6ac4b180fc558bdaf2ff79c0132723b4593bca85acc69770a25b12ce29fee99fc23b73c274d1e88a75510b728a44f27d7cd793b06b
|
7
|
+
data.tar.gz: 35b2f359c3a5ad88ff0ed98c233bcc28f33a90f93b1cbed45716774ccb5f07978ed722cf9f0ee08e6b3d4aa1a2d102859a007b99b2081e108673508ff3524d69
|
data/helper/file.rb
CHANGED
@@ -19,6 +19,10 @@
|
|
19
19
|
|
20
20
|
require 'fileutils'
|
21
21
|
require 'etc'
|
22
|
+
require 'sys/filesystem'
|
23
|
+
include Sys
|
24
|
+
|
25
|
+
REMOTE_FS_LIST = %w(cifs coda nfs nfs4 smbfs)
|
22
26
|
|
23
27
|
class TDIPlan < TDI
|
24
28
|
def file(role_name, plan_name, plan_content)
|
@@ -84,18 +88,14 @@ class TDIPlan < TDI
|
|
84
88
|
end
|
85
89
|
|
86
90
|
# Location.
|
87
|
-
|
88
|
-
|
89
|
-
else
|
90
|
-
df_path = path
|
91
|
-
end
|
92
|
-
device = %x(df -P #{df_path} | tail -n 1 | awk '{print $1}')
|
91
|
+
mount_p = Filesystem.mount_point(path)
|
92
|
+
mount_t = Filesystem.mounts.select { |mount| mount.mount_point.eql?(mount_p) }.first.mount_type
|
93
93
|
|
94
94
|
case location
|
95
95
|
when 'local'
|
96
|
-
@flag_success = false if
|
96
|
+
@flag_success = false if REMOTE_FS_LIST.include?(mount_t)
|
97
97
|
when 'nfs'
|
98
|
-
@flag_success = false unless
|
98
|
+
@flag_success = false unless mount_t.eql?('nfs')
|
99
99
|
else
|
100
100
|
puts "ERR: Invalid file plan format \"#{location}\". Location must be \"local\" or \"nfs\".".light_magenta
|
101
101
|
exit 1
|
data/lib/tdi/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tdi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rogério Carvalho Schneider
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2017-04-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -124,6 +124,20 @@ dependencies:
|
|
124
124
|
- - ">="
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
|
+
- !ruby/object:Gem::Dependency
|
128
|
+
name: sys-filesystem
|
129
|
+
requirement: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :runtime
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
138
|
+
- - ">="
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '0'
|
127
141
|
description: |-
|
128
142
|
Test Driven Infrastructure acceptance helpers for
|
129
143
|
validating your deployed infrastructure and external dependencies.
|