infrataster-plugin-ftp 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +37 -8
- data/lib/infrataster/plugin/ftp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b80b5aeb7ac9b3473f558e366430209645249fdf23acde9a9afdbe16e9b52402
|
4
|
+
data.tar.gz: a11891f0c2b9f39889cada25f9d56934716706c4291c674947883289ebd832fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80176500071deeef4305c4884f244dfd8c99eb003023e1612e3a6f535a513083c70556a21738ead8fc2d6b5d4812a9226c829c6f795210b3c4870f59ee262982
|
7
|
+
data.tar.gz: a9a23195825cbc814fa11fe96bffe9e3ed5e1c42af7c9de87eb1e92736051a3ae6db87db5598ee8d70ee41248f95aef09add2f66bf638b809cba0bdddcb20bdf
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Infrataster::Plugin::Ftp
|
2
2
|
[![Build Status](https://travis-ci.org/inokappa/infrataster-plugin-ftp.svg?branch=master)](https://travis-ci.org/inokappa/infrataster-plugin-ftp)
|
3
3
|
|
4
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/infrataster/plugin/ftp`. To experiment with that code, run `bin/console` for an interactive prompt.
|
5
|
-
|
6
4
|
## Installation
|
7
5
|
|
8
6
|
Add this line to your application's Gemfile:
|
@@ -21,14 +19,45 @@ Or install it yourself as:
|
|
21
19
|
|
22
20
|
## Usage
|
23
21
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
22
|
+
```ruby
|
23
|
+
require 'spec_helper'
|
24
|
+
|
25
|
+
describe server(:ftp_server) do
|
26
|
+
describe ftp('welcome') do
|
27
|
+
it 'check accessible' do
|
28
|
+
expect(result.chomp).to eq('230 Login successful.')
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe ftp('pwd') do
|
33
|
+
it 'check `chroot` enabled' do
|
34
|
+
expect(result).to eq('/')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe ftp('mkdir test_dir') do
|
39
|
+
it 'run `mkdir`' do
|
40
|
+
expect(result).to include '/test_dir'
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe ftp('ls') do
|
45
|
+
it 'run ls' do
|
46
|
+
expect(result).to include 'sample.txt'
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
```
|
29
51
|
|
30
|
-
|
52
|
+
You can specify `server.address`, username, password by options passed to Infrataster::Server.define:
|
31
53
|
|
54
|
+
```ruby
|
55
|
+
Infrataster::Server.define(
|
56
|
+
:ftp_server,
|
57
|
+
'192.168.0.6',
|
58
|
+
ftp: { user: 'ftpuser', pass: 'supersecret', passive: true },
|
59
|
+
)
|
60
|
+
```
|
32
61
|
## Contributing
|
33
62
|
|
34
63
|
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/infrataster-plugin-ftp.
|