struggle 2.4.3 → 2.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8fd0fe098d5b9742470ed55c764daced3c5101f14d7aa6248d330d2f6764a83
4
- data.tar.gz: bd99a799faeabf1a42024f85847658d7461bfc715d0876b92b8eebaf12a03b51
3
+ metadata.gz: 8eed13f75451e0fd49c798b83dc03571562b6214177b0145b282361ba9284e3a
4
+ data.tar.gz: d5ca75d4fed7a3b5bb540c4defc2857517270966b198c86be8b761863f275b16
5
5
  SHA512:
6
- metadata.gz: 7ae9954e08a7a3a9e3f1aeba53a3181bb35d7ff518b3d9d4293d2a5dcec15979052559ed937ab2652e1a5aa72a198ca488a79146e36baacafec8e5403a489219
7
- data.tar.gz: ed35daa24d047b86fe4c6e1eab8b8bfc0f6c418eed8d0b3b0ed78e9c75c6398701accb939253b617ebf53c1fc5be541e327e6ca75104b27f8158bca136650c83
6
+ metadata.gz: 87563c4c6cd9350c061a5afca3beefcf6ec414e32acdd8a2a53c875253720e19cabc1f4097bb5386ec02e89efd0cb7a791b2c7cce113d3b098fa5182ac2e4c4f
7
+ data.tar.gz: 1de164ba9a53f52aae43c29558a9f9753afd80e859264a0ce5ce895cb5cfc983102d036f02c157099911ef1b60c24479880687207384b3a12d15c7c470e35a9d
data/lib/struggle.rb CHANGED
@@ -5,7 +5,7 @@ begin
5
5
  rescue LoadError
6
6
  #do nothing
7
7
  end
8
- require 'zip'
8
+ # require 'zip'
9
9
  require 'struggle/tfile'
10
10
  require 'struggle/http'
11
11
  require 'struggle/logistic'
@@ -37,7 +37,6 @@ module Struggle
37
37
 
38
38
  # 上传文件到指定的路径
39
39
  # 例如: put("tmp\\test\\test.txt", "/test/")
40
- #
41
40
  def put(origin_file, remote_path)
42
41
  return nil if not File.exist?(origin_file)
43
42
  _file_name = File.basename(origin_file)
@@ -51,14 +51,15 @@ module Struggle
51
51
  end
52
52
 
53
53
  def Tfile.getname(filestream, filepath)
54
- file_for = Tfile.file_format(filestream.original_filename)
55
- filename = Time.now.strftime("%Y%m%d%h%m%s")<<rand(99999).to_s<<file_for
56
- file = filepath+filename
57
- while File.exist?(file) do
58
- filename = Time.now.strftime("%Y%m%d%h%m%s")<<rand(99999).to_s<<file_for
59
- file = filepath+filename
60
- end
61
- filename
54
+ # file_for = Tfile.file_format(filestream.original_filename)
55
+ # filename = Time.now.strftime("%Y%m%d%h%m%s")<<rand(99999).to_s<<file_for
56
+ # file = filepath+filename
57
+ # while File.exist?(file) do
58
+ # filename = Time.now.strftime("%Y%m%d%h%m%s")<<rand(99999).to_s<<file_for
59
+ # file = filepath+filename
60
+ # end
61
+ # filename
62
+ filepath+filestream.original_filename
62
63
  end
63
64
 
64
65
  def Tfile.file_format(filename)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: struggle
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.3
4
+ version: 2.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - lean
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-05 00:00:00.000000000 Z
11
+ date: 2018-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iconv
@@ -138,8 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubyforge_project:
142
- rubygems_version: 2.7.7
141
+ rubygems_version: 3.0.8
143
142
  signing_key:
144
143
  specification_version: 4
145
144
  summary: struggle!