ftp_liar 0.1.1 → 0.1.2
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/README.md +13 -5
- data/lib/ftp_liar/version.rb +1 -1
- data/lib/ftp_liar.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 46a94e03d4451cb163649ebbca4ea29b357c1b4b
|
|
4
|
+
data.tar.gz: 0682537419402274ba2b73e1a7aa5af171afe1cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb7fc9663f7137a6764d6af8fc366807341489ecf75f6cfc932263b1b9a03a9002979179a8082b4770b8ba48743820020b3a93d312a5b05b71a93cd5938903ba
|
|
7
|
+
data.tar.gz: d65874cef4501bd231d7ae3768f58c5eb857b71b3f99798b1fe0d69318e907cd201e1367001d182628a0c345bacb6470102a0596bae8cdedb051f9f90746b158
|
data/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# FTPLiar
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
|
3
|
+
This is experimental gem to simulate Net::FTP object using temporary directory. You use it or your own risk.
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
@@ -21,9 +19,19 @@ Or install it yourself as:
|
|
|
21
19
|
$ gem install ftp_liar
|
|
22
20
|
|
|
23
21
|
## Usage
|
|
22
|
+
Use FTPLiar class with proxy pattern, override interesting class.
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
```ruby
|
|
25
|
+
class MyFTP
|
|
26
|
+
def initialize(*args)
|
|
27
|
+
@ftp_liar = FTPLiar::FTPLiar.new
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def method_missing(name, *args)
|
|
31
|
+
@ftp_liar.send(name, *args)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
```
|
|
27
35
|
## Development
|
|
28
36
|
|
|
29
37
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/ftp_liar/version.rb
CHANGED
data/lib/ftp_liar.rb
CHANGED
|
@@ -12,6 +12,9 @@ module FTPLiar
|
|
|
12
12
|
FileUtils.cd(Dir.tmpdir)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
def login(*args)
|
|
16
|
+
end
|
|
17
|
+
|
|
15
18
|
def getbinaryfile(remotefile, localfile = nil, blocksize = nil)
|
|
16
19
|
# A simple method that manages to copy a remote file to local
|
|
17
20
|
FileUtils.cp(remotefile, localfile ? localfile : File.basename(remotefile))
|