testkit123 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/testkit123.rb +32 -3
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 450ccc9a442f2658473064888bce01da57694917
|
4
|
+
data.tar.gz: 623373ce095ff80479de0753b41063b620acf14a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f27894055722acc4c70ffaf98ec8327a1d2488b0bfb2ed399f263537d2a38f6df69a24dead85e1d215b6f589318e5a13e0e37d102d4c0422407d23c6ffcf36e
|
7
|
+
data.tar.gz: d13346dffa9c6969d547228db994b42505aadd4398366066021d5ebd6be8b0e53c023b92aaf6368df5b5b6c8ece1f28dfcbf6b34028434ef13a7fb080fb75b2f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/testkit123.rb
CHANGED
@@ -20,7 +20,13 @@ class TestKit123
|
|
20
20
|
gemtest_url: nil, rubyver: 'ruby-2.5.1')
|
21
21
|
|
22
22
|
@h = templates
|
23
|
-
|
23
|
+
|
24
|
+
@project_config = if project =~ /\.txt$/ then
|
25
|
+
project
|
26
|
+
elsif project
|
27
|
+
File.join(localpath, project + '.txt')
|
28
|
+
end
|
29
|
+
|
24
30
|
@testdata, @debug = testdata, debug
|
25
31
|
@localpath, @datapath, @gemtest_url = localpath, datapath, gemtest_url
|
26
32
|
@rubyver = rubyver
|
@@ -109,7 +115,31 @@ end
|
|
109
115
|
def create_standalone()
|
110
116
|
end
|
111
117
|
|
112
|
-
def
|
118
|
+
def delete_files(s=nil)
|
119
|
+
|
120
|
+
filepath = if s =~ /\.txt$/ then
|
121
|
+
project
|
122
|
+
elsif s
|
123
|
+
File.join(@localpath, s + '.txt')
|
124
|
+
else
|
125
|
+
@project_config
|
126
|
+
end
|
127
|
+
|
128
|
+
puts 'filepath: ' + filepath.inspect if @debug
|
129
|
+
|
130
|
+
config = SimpleConfig.new(filepath).to_h
|
131
|
+
|
132
|
+
proj = config[:project]
|
133
|
+
datafilepath = config[:data_path] + '/' + proj
|
134
|
+
FileUtils.rm_rf datafilepath
|
135
|
+
|
136
|
+
filepath = config[:local_path] + '/' + proj
|
137
|
+
FileUtils.rm_rf filepath
|
138
|
+
|
139
|
+
FileUtils.rm File.join(config[:data_path], "#{proj}.rsf")
|
140
|
+
|
141
|
+
proj + ' test files deleted'
|
142
|
+
|
113
143
|
end
|
114
144
|
|
115
145
|
def new_project(project='myproject', classname=nil, save: false)
|
@@ -150,4 +180,3 @@ EOF
|
|
150
180
|
end
|
151
181
|
|
152
182
|
end
|
153
|
-
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|