net-ftp 0.2.1 → 0.3.0

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: 18559c9c84d96f514739718efbda54e6fad17d4273091daa96439f8b2ca35088
4
- data.tar.gz: 303c0fc5bfbf89f973b5dfc8adcab01353adbde0c1cc0a427ed5bcb545b680eb
3
+ metadata.gz: 6da1dd16a259cb0b9da3833be6087725451c66020a77484962ce512ebe76bd86
4
+ data.tar.gz: 5baf86565938970ff01dca9f6c85d8ae5afa57493ca96c35e8ccb30184f8fd96
5
5
  SHA512:
6
- metadata.gz: d06b941364767d71f483fd1396328324b6c15c88072058f904ca69509f6e70c57c64a2c4c3e3ee041a23aaa5d83b598bcf16061e8b13b76056d405d64fb349de
7
- data.tar.gz: 13234a36e3e7ab0d0026fe84c4ab42b61b3f7ca0354a78dbc98dcbee2e8402d4130658c327c6e1e2124096b4b1faa0092fdb8e159baef060b801746531120e71
6
+ metadata.gz: b634e82e54a09c1ad7174bafa5049f77f4878c5bf8b5d9fe4f43626c75d83831b91968a211075f5e36c7514c29d7dd2f8834134dc08f4f63def4b6e5a266b991
7
+ data.tar.gz: 4b124cb421ad550f889fd5dce46efb22cb726516a1e245131a4d0c5c125c0eb229b8041e952df0c85abed0a8e82697ea3116ef7c1eae1db7ebd09f45ea854355
@@ -11,7 +11,7 @@ jobs:
11
11
  os: [ ubuntu-latest, macos-latest ]
12
12
  runs-on: ${{ matrix.os }}
13
13
  steps:
14
- - uses: actions/checkout@v3
14
+ - uses: actions/checkout@v4
15
15
  - name: Set up Ruby
16
16
  uses: ruby/setup-ruby@v1
17
17
  with:
data/lib/net/ftp.rb CHANGED
@@ -85,7 +85,7 @@ module Net
85
85
  end
86
86
 
87
87
  # :stopdoc:
88
- VERSION = "0.2.1"
88
+ VERSION = "0.3.0"
89
89
  FTP_PORT = 21
90
90
  CRLF = "\r\n"
91
91
  DEFAULT_BLOCKSIZE = BufferedIO::BUFSIZE
@@ -356,19 +356,14 @@ module Net
356
356
  # SOCKS_SERVER, then a SOCKSSocket is returned, else a Socket is
357
357
  # returned.
358
358
  def open_socket(host, port) # :nodoc:
359
- if defined? SOCKSSocket and ENV["SOCKS_SERVER"]
360
- @passive = true
361
- Timeout.timeout(@open_timeout, OpenTimeout) do
359
+ return Timeout.timeout(@open_timeout, OpenTimeout) {
360
+ if defined? SOCKSSocket and ENV["SOCKS_SERVER"]
361
+ @passive = true
362
362
  SOCKSSocket.open(host, port)
363
+ else
364
+ Socket.tcp(host, port)
363
365
  end
364
- else
365
- begin
366
- Socket.tcp host, port, nil, nil, connect_timeout: @open_timeout
367
- rescue Errno::ETIMEDOUT #raise Net:OpenTimeout instead for compatibility with previous versions
368
- raise Net::OpenTimeout, "Timeout to open TCP connection to "\
369
- "#{host}:#{port} (exceeds #{@open_timeout} seconds)"
370
- end
371
- end
366
+ }
372
367
  end
373
368
  private :open_socket
374
369
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shugo Maeda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-05 00:00:00.000000000 Z
11
+ date: 2023-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-protocol
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
- rubygems_version: 3.4.19
79
+ rubygems_version: 3.5.0.dev
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Support for the File Transfer Protocol.