double-bag-ftps 0.1.2 → 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: af6b500341ec8519c6a00209062fe5c87795416f
4
- data.tar.gz: 3d9d3ba31e952470ccb2cd31818913d69da9e3af
3
+ metadata.gz: '0805592b0f09a1cc49b11af0017ec1433450872e'
4
+ data.tar.gz: e0000c635ac5128da19631cc415542cd85352ecf
5
5
  SHA512:
6
- metadata.gz: 5e58308523925e5de233a5e463e8099b26a302b8b1c1bbcd768a2337d981739c50faa74118bb6fab94a0623086bcc0c6b07bff1542e944b4d080056d6314fa20
7
- data.tar.gz: b53b99bd2d481a38389c0168facae1a6184fb094358596e56f81b50b78c440fbd1bd084e35f02604b30185f640cedfdf7abd8b30dd1edc8cfd5e4e9942802405
6
+ metadata.gz: 587dd881f8a0c6a35ec5055732b179815cb5bf1e923811d55318fcfaa3000754822bea0c5dd6e066bbf3c5d12c8efc72a03485eee917ed5db729e09f9aa998d9
7
+ data.tar.gz: a104e89cf48ab9f795eb0fa1be785787a58802272c4e34992057f02b25a98774f216c7ffc66a5d1e1ad13e0855df00d04b6fd8c27cb2cf2a621c7e6fbe9bf903
data/CHANGELOG.md CHANGED
@@ -1,4 +1,18 @@
1
+ ## 0.1.4
2
+
3
+ Buffixes:
4
+
5
+ - Fix active mode transfers hanging in some versions of Ruby 2.1
6
+
7
+ ## 0.1.3
8
+
9
+ Bugfixes:
10
+
11
+ - Fix active mode transfers hanging in some versions of Ruby 2.2 and
12
+ 2.3
13
+
1
14
  ## 0.1.2
15
+
2
16
  Bugfixes:
3
17
 
4
18
  - Reuse SSL session when creating new sockets
@@ -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.2"
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"
@@ -1,4 +1,5 @@
1
1
  require 'net/ftp'
2
+ require 'rubygems'
2
3
  begin
3
4
  require 'openssl'
4
5
  rescue LoadError
@@ -109,6 +110,7 @@ class DoubleBagFTPS < Net::FTP
109
110
  conn = ssl_socket(conn) # SSL connection now possible after cmd sent
110
111
  else
111
112
  sock = makeport
113
+ sendport(sock.addr[3], sock.addr[1]) if sendport_needed?
112
114
  if @resume and rest_offset
113
115
  resp = sendcmd('REST ' + rest_offset.to_s)
114
116
  if resp[0] != ?3
@@ -129,6 +131,19 @@ class DoubleBagFTPS < Net::FTP
129
131
  end
130
132
  private :transfercmd
131
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
+
132
147
  def ftps_explicit?; @ftps_mode == EXPLICIT end
133
148
  def ftps_implicit?; @ftps_mode == IMPLICIT end
134
149
 
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: double-bag-ftps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
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: 2014-01-12 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
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description:
@@ -44,7 +44,7 @@ executables: []
44
44
  extensions: []
45
45
  extra_rdoc_files: []
46
46
  files:
47
- - .gitignore
47
+ - ".gitignore"
48
48
  - CHANGELOG.md
49
49
  - LICENSE
50
50
  - README.md
@@ -63,20 +63,19 @@ require_paths:
63
63
  - lib
64
64
  required_ruby_version: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - '>='
71
+ - - ">="
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
75
  rubyforge_project:
76
- rubygems_version: 2.0.14
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: