tcms 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tcms.rb +2 -3
- data/lib/tcms/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: 18157b0b61c8d07b1eadf5dd452971855b738d77
|
4
|
+
data.tar.gz: 579b00313e8055f2e17b1c67ac3ec66dce96317e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86c2e82bf7b2c2d1112e89bc9f9f6e522c9df1754f82b47d59ec154da8205b11d891deb1aa5a5b12514326f85d598682a78ab684808c65229625c771f58c0a62
|
7
|
+
data.tar.gz: d4dad85c82b6c583fa9779679f19d9f2ec2f12c3108b46428b3e99ad85b9cf0d7c2c8611c0f1b57a2167ff1ef42cee3efba7aa3df314eace2720d78ae25c02a8
|
data/lib/tcms.rb
CHANGED
@@ -55,9 +55,9 @@ module Tcms
|
|
55
55
|
upload_file_path = file
|
56
56
|
|
57
57
|
begin
|
58
|
-
if config["
|
58
|
+
if config["remote_encoding"]
|
59
59
|
file_content = File.read(file)
|
60
|
-
file_content = file_content.encode(config["
|
60
|
+
file_content = file_content.encode(config["remote_encoding"],"UTF-8",:invalid=>:replace,:undef=>:replace)
|
61
61
|
|
62
62
|
upload_file_path = config["folder"]+'/__upload__'+file_name
|
63
63
|
tmp_file = File.new(upload_file_path,'w+')
|
@@ -65,7 +65,6 @@ module Tcms
|
|
65
65
|
tmp_file.close
|
66
66
|
end
|
67
67
|
|
68
|
-
puts upload_file_path+"::xxxx"
|
69
68
|
response = RestClient.post(upload_path,:NEW_FILE=>File.new(upload_file_path)){|response,request,result|
|
70
69
|
if [200].include? response.code
|
71
70
|
puts '--上传成功!'+response.description
|
data/lib/tcms/version.rb
CHANGED