testkit123 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 920bf0a0901c6b09370b33e601182a763759e256
4
- data.tar.gz: e4ef2fb72744f7a083ddb7399e2ecca26fa8e0c2
3
+ metadata.gz: 450ccc9a442f2658473064888bce01da57694917
4
+ data.tar.gz: 623373ce095ff80479de0753b41063b620acf14a
5
5
  SHA512:
6
- metadata.gz: 8acdcc6e58c8e216bba3399f0a65cc878ca1580976e0a82d7fc4cbf66bf22fe9345ca3e4d1da1ff156c708e794eae680667f45476cea0aed643c32c724f8ebef
7
- data.tar.gz: 30b89c3e422b261f31191e55533bfa3c5966fa19c9ac3c6b1dc67314850a005f19bb4d0a26991c03d1a32f599827d90bfaa061b7626435e68f7037d6446cb332
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
- @project_config = project
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 destroy_files()
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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testkit123
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file