double-bag-ftps 0.1.3 → 0.1.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
  SHA1:
3
- metadata.gz: a21ace12a48f5f7dffef8a49500c4099bc29a2aa
4
- data.tar.gz: 770e0e388fc64f8de0e7b116701f6765d4ca4509
3
+ metadata.gz: '0805592b0f09a1cc49b11af0017ec1433450872e'
4
+ data.tar.gz: e0000c635ac5128da19631cc415542cd85352ecf
5
5
  SHA512:
6
- metadata.gz: 0cc67b957f9a055240d0e2628407b33b803b005c56869f1b243cef8aaa276d220fd3470c1828c64e1b5cc91aad4a9fbb114c749892ad182369aa7a3598d42992
7
- data.tar.gz: 85d66d57f27d6132393f59b91e39e161ab5274dac591e558e92097a03661a6a365bfd7065ed5416a0632ca320c620a797983833e1fd82e3556cbca57262e049d
6
+ metadata.gz: 587dd881f8a0c6a35ec5055732b179815cb5bf1e923811d55318fcfaa3000754822bea0c5dd6e066bbf3c5d12c8efc72a03485eee917ed5db729e09f9aa998d9
7
+ data.tar.gz: a104e89cf48ab9f795eb0fa1be785787a58802272c4e34992057f02b25a98774f216c7ffc66a5d1e1ad13e0855df00d04b6fd8c27cb2cf2a621c7e6fbe9bf903
@@ -1,8 +1,15 @@
1
+ ## 0.1.4
2
+
3
+ Buffixes:
4
+
5
+ - Fix active mode transfers hanging in some versions of Ruby 2.1
6
+
1
7
  ## 0.1.3
2
8
 
3
9
  Bugfixes:
4
10
 
5
- - Active mode transfers send proper commands with Ruby > 2.2.2
11
+ - Fix active mode transfers hanging in some versions of Ruby 2.2 and
12
+ 2.3
6
13
 
7
14
  ## 0.1.2
8
15
 
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "double-bag-ftps"
6
- s.version = "0.1.3"
6
+ s.version = "0.1.4"
7
7
  s.license = "MIT"
8
8
  s.author = "Bryan Nix"
9
9
  s.homepage = "https://github.com/bnix/double-bag-ftps"
@@ -110,10 +110,7 @@ class DoubleBagFTPS < Net::FTP
110
110
  conn = ssl_socket(conn) # SSL connection now possible after cmd sent
111
111
  else
112
112
  sock = makeport
113
- # Before ruby-2.2.3, makeport did a sendport automatically
114
- if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.2.3")
115
- sendport(sock.addr[3], sock.addr[1])
116
- end
113
+ sendport(sock.addr[3], sock.addr[1]) if sendport_needed?
117
114
  if @resume and rest_offset
118
115
  resp = sendcmd('REST ' + rest_offset.to_s)
119
116
  if resp[0] != ?3
@@ -134,6 +131,19 @@ class DoubleBagFTPS < Net::FTP
134
131
  end
135
132
  private :transfercmd
136
133
 
134
+ # Before ruby-2.2.3, makeport called sendport automatically. After
135
+ # Ruby 2.3.0, makeport does not call sendport automatically, so do
136
+ # it ourselves. This change to Ruby's FTP lib has been backported
137
+ # to Ruby 2.1 since version 2.1.7.
138
+ def sendport_needed?
139
+ @sendport_needed ||= begin
140
+ Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.2.3") ||
141
+ Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.1.7") &&
142
+ Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2.0")
143
+ end
144
+ end
145
+ private :sendport_needed?
146
+
137
147
  def ftps_explicit?; @ftps_mode == EXPLICIT end
138
148
  def ftps_implicit?; @ftps_mode == IMPLICIT end
139
149
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: double-bag-ftps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Nix
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-14 00:00:00.000000000 Z
11
+ date: 2017-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -73,10 +73,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  version: '0'
74
74
  requirements: []
75
75
  rubyforge_project:
76
- rubygems_version: 2.5.1
76
+ rubygems_version: 2.6.12
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: Provides a child class of Net::FTP to support implicit and explicit FTPS.
80
- test_files:
81
- - spec/double_bag_ftps_spec.rb
82
- - spec/spec_helper.rb
80
+ test_files: []
81
+ has_rdoc: