net-ftp-port_command 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -3
- data/lib/net/ftp/port_command/version.rb +1 -1
- data/net-ftp-port_command.gemspec +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54a6089ae3425d0cd581a8a679fc6f924f39b3b2
|
4
|
+
data.tar.gz: 1e37eae012d97091b0c0eadb5e7b32aeb2389461
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a989e7e7dca04751f85db126991dcfbc114c8cfb42780310367398ad81b6089509d15440b78b5e91d50b5547b3524925b63dd0bdc22f921e6e56cde6b515fc2
|
7
|
+
data.tar.gz: 9450d549bfef62d6324e863b178ed80029a87fdd7b5740770c406f023d3eac894818b461ada439f0d748a6fad8c1eae3db0a159506c0313126f90e31e698f9cd
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
# Net::
|
1
|
+
# Net::FTP::PortCommand
|
2
2
|
|
3
|
-
|
3
|
+
This gem enables Net::FTP to send FTP `PORT` command.
|
4
|
+
|
5
|
+
If your FTP client have to use active mode and over NAT, this gem may be helpful.
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -20,7 +22,20 @@ Or install it yourself as:
|
|
20
22
|
|
21
23
|
## Usage
|
22
24
|
|
23
|
-
|
25
|
+
```ruby
|
26
|
+
require 'net/ftp'
|
27
|
+
require 'net/ftp/port_command'
|
28
|
+
|
29
|
+
ftp = Net::FTP.new("exmaple.com", "ussername", "password")
|
30
|
+
ftp.port("203.0.113.0", 10020) # Set listening address and port of Data connection.
|
31
|
+
ftp.list # => ["foo.txt", "bar.txt"]
|
32
|
+
```
|
33
|
+
|
34
|
+
After address or port was set once, it will be effective until explicitly removed.
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
ftp.port(nil, nil) # default behavior of Net::FTP
|
38
|
+
```
|
24
39
|
|
25
40
|
## Contributing
|
26
41
|
|
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.required_ruby_version = '>= 2.0.0'
|
22
|
+
|
21
23
|
spec.add_development_dependency "bundler", "~> 1.7"
|
22
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-ftp-port_command
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OSA Shunsuke
|
@@ -65,7 +65,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 2.0.0
|
69
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
71
|
- - ">="
|