Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stas/mina-ftp
FTP support for Mina.
https://github.com/stas/mina-ftp
Last synced: about 1 month ago
JSON representation
FTP support for Mina.
- Host: GitHub
- URL: https://github.com/stas/mina-ftp
- Owner: stas
- License: mit
- Created: 2013-07-16T15:44:23.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-02T07:45:27.000Z (over 11 years ago)
- Last Synced: 2024-05-02T00:07:42.235Z (9 months ago)
- Language: Ruby
- Size: 54.7 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# FTP support for Mina
You can use mina now to deploy static websites to FTP servers.
## Installation
Add this line to your application's Gemfile:
gem 'mina-ftp'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mina-ftp
## Usage
Use mina to generate the config file:
$ bundle exec mina init
Load the FTP tasks:
```ruby
require 'mina/ftp'
```Add some settings to the `config/deploy.rb` or to `Minafile` file.
```ruby
set :ftp_path, 'public_www'
set :ftp_host, 'ftp.domain.com'
set :ftp_username, '[email protected]'
set :ftp_password, 'secret'
set :ftp_from_path, 'public'
set :ftp_options, {:passive => false}
```Update `deploy` task to invoke `ftp:deploy` task:
```ruby
task :deploy do
invoke :'ftp:deploy'
end
```Deploy it!
$ bundle exec mina deploy
Use `--verbose` flag if you want to see FTP client calls.
To clear the remote path, use the `ftp:empty` task:
$ bundle exec mina ftp:empty
Thats it.
## Todo
Write some tests.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request## Thanks and credits
This gem uses [ftp_sync](https://github.com/jebw/ftp_sync) gem.
Huge thanks to [mina](https://github.com/nadarei/mina) developers for the awesome tool.