net-ftp 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/push_gem.yml +48 -0
- data/.github/workflows/test.yml +8 -1
- data/lib/net/ftp.rb +23 -4
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 461ec5d7ab22ccd0247c0c2743e5eec8e6b98acc45caeb354325853aa726b5e9
|
4
|
+
data.tar.gz: c953747819f0742d5749f4ce53b06ff84a49475ecb937266a3fd908bbe04ed09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f47c2db4011a98a9ac0c6dba7e313dc8eca773e5aeb2b1a23f049d4a316a79d7eff2551286e291844a9ff0a2000a8fccbdf7a8f34854a273527e3462c67d183e
|
7
|
+
data.tar.gz: 6deea76a58d105a7dbbcaab5e46f0b8fe53b80711ea984c7244900d8472d0516bf89540b52b0f9ccf9be67f108d7c1fe567d4241cc91b50ff25aa3783a70247b
|
@@ -0,0 +1,48 @@
|
|
1
|
+
name: Publish gem to rubygems.org
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- 'v*'
|
7
|
+
|
8
|
+
permissions:
|
9
|
+
contents: read
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
push:
|
13
|
+
if: github.repository == 'ruby/net-ftp'
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
|
16
|
+
environment:
|
17
|
+
name: rubygems.org
|
18
|
+
url: https://rubygems.org/gems/net-ftp
|
19
|
+
|
20
|
+
permissions:
|
21
|
+
contents: write
|
22
|
+
id-token: write
|
23
|
+
|
24
|
+
steps:
|
25
|
+
# Set up
|
26
|
+
- name: Harden Runner
|
27
|
+
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
|
28
|
+
with:
|
29
|
+
egress-policy: audit
|
30
|
+
|
31
|
+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
32
|
+
|
33
|
+
- name: Set up Ruby
|
34
|
+
uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
|
35
|
+
with:
|
36
|
+
bundler-cache: true
|
37
|
+
ruby-version: ruby
|
38
|
+
|
39
|
+
# Release
|
40
|
+
- name: Publish to RubyGems
|
41
|
+
uses: rubygems/release-gem@612653d273a73bdae1df8453e090060bb4db5f31 # v1
|
42
|
+
|
43
|
+
- name: Create GitHub release
|
44
|
+
run: |
|
45
|
+
tag_name="$(git describe --tags --abbrev=0)"
|
46
|
+
gh release create "${tag_name}" --verify-tag --draft --generate-notes
|
47
|
+
env:
|
48
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/.github/workflows/test.yml
CHANGED
@@ -3,11 +3,18 @@ name: ubuntu
|
|
3
3
|
on: [push, pull_request]
|
4
4
|
|
5
5
|
jobs:
|
6
|
+
ruby-versions:
|
7
|
+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
|
8
|
+
with:
|
9
|
+
engine: cruby
|
10
|
+
min_version: 2.6
|
11
|
+
|
6
12
|
build:
|
13
|
+
needs: ruby-versions
|
7
14
|
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
|
8
15
|
strategy:
|
9
16
|
matrix:
|
10
|
-
ruby:
|
17
|
+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
|
11
18
|
os: [ ubuntu-latest, macos-latest ]
|
12
19
|
runs-on: ${{ matrix.os }}
|
13
20
|
steps:
|
data/lib/net/ftp.rb
CHANGED
@@ -77,6 +77,10 @@ module Net
|
|
77
77
|
# - #rename
|
78
78
|
# - #delete
|
79
79
|
#
|
80
|
+
# == Mainframe User Support
|
81
|
+
# - #literal
|
82
|
+
# - #quote
|
83
|
+
#
|
80
84
|
class FTP < Protocol
|
81
85
|
include MonitorMixin
|
82
86
|
if defined?(OpenSSL::SSL)
|
@@ -85,7 +89,7 @@ module Net
|
|
85
89
|
end
|
86
90
|
|
87
91
|
# :stopdoc:
|
88
|
-
VERSION = "0.3.
|
92
|
+
VERSION = "0.3.6"
|
89
93
|
FTP_PORT = 21
|
90
94
|
CRLF = "\r\n"
|
91
95
|
DEFAULT_BLOCKSIZE = BufferedIO::BUFSIZE
|
@@ -758,7 +762,7 @@ module Net
|
|
758
762
|
ensure
|
759
763
|
conn.close if conn
|
760
764
|
end
|
761
|
-
|
765
|
+
getresp # The response might be important when connected to a mainframe
|
762
766
|
end
|
763
767
|
end
|
764
768
|
rescue Errno::EPIPE
|
@@ -880,13 +884,18 @@ module Net
|
|
880
884
|
# in +remotefile+. If callback or an associated block is supplied, calls it,
|
881
885
|
# passing in the transmitted data one line at a time.
|
882
886
|
#
|
887
|
+
# Returns the response which will contain a job number if the user was communicating with a mainframe in ASCII mode
|
888
|
+
# after issuing 'quote site filetype=jes'
|
889
|
+
#
|
883
890
|
def puttextfile(localfile, remotefile = File.basename(localfile), &block) # :yield: line
|
884
891
|
f = File.open(localfile)
|
892
|
+
response = ''
|
885
893
|
begin
|
886
|
-
storlines("STOR #{remotefile}", f, &block)
|
894
|
+
response = storlines("STOR #{remotefile}", f, &block)
|
887
895
|
ensure
|
888
896
|
f.close
|
889
897
|
end
|
898
|
+
response
|
890
899
|
end
|
891
900
|
|
892
901
|
#
|
@@ -1226,6 +1235,16 @@ module Net
|
|
1226
1235
|
return parse257(resp)
|
1227
1236
|
end
|
1228
1237
|
|
1238
|
+
#
|
1239
|
+
# The "quote" subcommand sends arguments verbatim to the remote ftp server.
|
1240
|
+
# The "literal" subcommand is an alias for "quote".
|
1241
|
+
# @param arguments Array[String] to be sent verbatim to the remote ftp server
|
1242
|
+
#
|
1243
|
+
def quote(arguments)
|
1244
|
+
sendcmd(arguments)
|
1245
|
+
end
|
1246
|
+
alias literal quote
|
1247
|
+
|
1229
1248
|
#
|
1230
1249
|
# Removes a remote directory.
|
1231
1250
|
#
|
@@ -1343,7 +1362,7 @@ module Net
|
|
1343
1362
|
end
|
1344
1363
|
|
1345
1364
|
feats = []
|
1346
|
-
resp.
|
1365
|
+
resp.each_line do |line|
|
1347
1366
|
next if !line.start_with?(' ') # skip status lines
|
1348
1367
|
|
1349
1368
|
feats << line.strip
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-ftp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shugo Maeda
|
8
|
+
autorequire:
|
8
9
|
bindir: bin
|
9
10
|
cert_chain: []
|
10
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-05 00:00:00.000000000 Z
|
11
12
|
dependencies:
|
12
13
|
- !ruby/object:Gem::Dependency
|
13
14
|
name: net-protocol
|
@@ -45,6 +46,7 @@ extensions: []
|
|
45
46
|
extra_rdoc_files: []
|
46
47
|
files:
|
47
48
|
- ".github/dependabot.yml"
|
49
|
+
- ".github/workflows/push_gem.yml"
|
48
50
|
- ".github/workflows/test.yml"
|
49
51
|
- ".gitignore"
|
50
52
|
- BSDL
|
@@ -62,6 +64,7 @@ licenses:
|
|
62
64
|
metadata:
|
63
65
|
homepage_uri: https://github.com/ruby/net-ftp
|
64
66
|
source_code_uri: https://github.com/ruby/net-ftp
|
67
|
+
post_install_message:
|
65
68
|
rdoc_options: []
|
66
69
|
require_paths:
|
67
70
|
- lib
|
@@ -76,7 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
79
|
- !ruby/object:Gem::Version
|
77
80
|
version: '0'
|
78
81
|
requirements: []
|
79
|
-
rubygems_version: 3.
|
82
|
+
rubygems_version: 3.5.9
|
83
|
+
signing_key:
|
80
84
|
specification_version: 4
|
81
85
|
summary: Support for the File Transfer Protocol.
|
82
86
|
test_files: []
|