mina-scp 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/CHANGELOG.md +5 -0
- data/CONTRIBUTING.md +60 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +53 -0
- data/Rakefile +1 -0
- data/lib/mina/scp.rb +22 -0
- data/lib/mina/scp/version.rb +5 -0
- data/mina-scp.gemspec +23 -0
- metadata +83 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 187c82a601c1d4220aa6d6411139c208960cfe47
|
4
|
+
data.tar.gz: 7f68dfef63807fdaec9d7e0c12bb141992f36076
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fadd53ad15b4f7920b3b1fb0ab4d45998731c2fc2333772804ed89a29515f368c07e09a0504650f1ccd273c9408fed05175731094c0a3ccaeed1fb3774d4e622
|
7
|
+
data.tar.gz: 415e9d9daaffbbb0996f0511ec5dbc776f3eaad483b7bb1ed4541807463f70d624b52fccf845083af2655aa9d13c69f5d0e231ec550ee3484e409ceea1381d6c
|
data/.gitignore
ADDED
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
## Adding new features
|
2
|
+
|
3
|
+
This section includes advice on how to build new features for the project & what kind of process it includes.
|
4
|
+
|
5
|
+
* This is how we like people to add new features:
|
6
|
+
* Here are some specifics on the coding style we prefer:
|
7
|
+
* This is how you send your pull request:
|
8
|
+
* You should include the following tests:
|
9
|
+
* These are the updates we hope you make to the changelog:
|
10
|
+
|
11
|
+
Don’t get discouraged! We estimate that the response time from the
|
12
|
+
maintainers is around:
|
13
|
+
|
14
|
+
# Bug triage
|
15
|
+
|
16
|
+
This section explains how bug triaging is done for your project. Help beginners by including examples to good bug reports and providing them questions they should look to answer.
|
17
|
+
|
18
|
+
* You can help report bugs by filing them here:
|
19
|
+
* You can look through the existing bugs here:
|
20
|
+
|
21
|
+
* Look at existing bugs and help us understand if
|
22
|
+
** The bug is reproducible? Is it reproducible in other environments (browsers)? What are the steps to reproduce?
|
23
|
+
|
24
|
+
* You can close fixed bugs by testing old tickets to see if they are
|
25
|
+
happening
|
26
|
+
* You can update our change log here
|
27
|
+
* You can remove duplicate bug reports
|
28
|
+
|
29
|
+
# Translations
|
30
|
+
|
31
|
+
This section includes any instructions or translation needs your project has.
|
32
|
+
|
33
|
+
* You can help us translate our project here:
|
34
|
+
|
35
|
+
# Documentation
|
36
|
+
|
37
|
+
This section includes any help you need with the documentation and where it can be found. Code needs explanation, and sometimes those who know the code well have trouble explaining it to someone just getting into it.
|
38
|
+
|
39
|
+
* Help us with documentation here
|
40
|
+
|
41
|
+
# Community
|
42
|
+
This section includes ideas on how non-developers can help with the project. Here's a few examples:
|
43
|
+
|
44
|
+
* You can help us answer questions our users have here:
|
45
|
+
* You can help build and design our website here:
|
46
|
+
* You can help write blog posts about the project by:
|
47
|
+
* You can help with newsletters and internal communications by:
|
48
|
+
|
49
|
+
* Create an example of the project in real world by building something or
|
50
|
+
showing what others have built.
|
51
|
+
* Write about other people’s projects based on this project. Show how
|
52
|
+
it’s used in daily life. Take screenshots and make videos!
|
53
|
+
|
54
|
+
|
55
|
+
# Your first bugfix
|
56
|
+
This section should help a person get started with their very first bug fix and thinking through the problem.
|
57
|
+
|
58
|
+
* If you have further questions, contact:
|
59
|
+
|
60
|
+
This contributing file template is from [contribute.md](http://contribute.md/).
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Anton Dieterle
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# Mina SCP
|
2
|
+
|
3
|
+
Basic SCP helpers for [Mina](https://github.com/nadarei/mina) deployer.
|
4
|
+
Used to download/upload files from/to the server.
|
5
|
+
|
6
|
+
### Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'mina-scp', require: false
|
12
|
+
```
|
13
|
+
|
14
|
+
### Usage
|
15
|
+
|
16
|
+
Require it in your `deploy.rb`
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'mina/scp'
|
20
|
+
```
|
21
|
+
|
22
|
+
# Download file from the server
|
23
|
+
|
24
|
+
```
|
25
|
+
scp_download(remote_file, local_file)
|
26
|
+
```
|
27
|
+
|
28
|
+
# Upload file to the server
|
29
|
+
|
30
|
+
```
|
31
|
+
scp_upload(local_file, remote_file)
|
32
|
+
```
|
33
|
+
|
34
|
+
# Options
|
35
|
+
|
36
|
+
If you specify `verbose: true` as the last parameter, it will print the SCP command before running it.
|
37
|
+
|
38
|
+
### Development
|
39
|
+
|
40
|
+
For suggestions, bugs and pull requests, use [GitHub Issues](http://github.com/adie/mina-scp/issues).
|
41
|
+
See [CONTRIBUTING](http://github.com/adie/mina-scp/blob/master/CONTRIBUTING.md) for more details.
|
42
|
+
|
43
|
+
To see what has changed in recent versions of Mina SCP, see the [CHANGELOG](http://github.com/adie/mina-scp/blob/master/CHANGELOG.md).
|
44
|
+
|
45
|
+
### Core Team Members
|
46
|
+
|
47
|
+
* [Anton Dieterle](http://github.com/adie)
|
48
|
+
|
49
|
+
### Copyright
|
50
|
+
|
51
|
+
Copyright © 2013 Anton Dieterle. See [LICENSE](http://github.com/adie/mina-scp/blob/master/LICENSE.txt) for details.
|
52
|
+
|
53
|
+
Project is a member of the [OSS Manifesto](http://ossmanifesto.com/).
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/lib/mina/scp.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
def scp_transfer(direction, from, to, options = {})
|
2
|
+
remote_prefix = "#{domain!}:"
|
3
|
+
remote_prefix = "#{user}@#{remote_prefix}" if user?
|
4
|
+
command = "scp"
|
5
|
+
command << " -i #{identity_file}" if identity_file?
|
6
|
+
command << " -P #{port}" if port?
|
7
|
+
case direction
|
8
|
+
when :up then to = remote_prefix + to
|
9
|
+
when :down then from = remote_prefix + from
|
10
|
+
end
|
11
|
+
command << " #{from} #{to}"
|
12
|
+
print_command command if options[:verbose]
|
13
|
+
exec command
|
14
|
+
end
|
15
|
+
|
16
|
+
def scp_download(from, to, options = {})
|
17
|
+
scp_transfer(:down, from, to, options)
|
18
|
+
end
|
19
|
+
|
20
|
+
def scp_upload(from, to, options = {})
|
21
|
+
scp_transfer(:up, from, to, options)
|
22
|
+
end
|
data/mina-scp.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'mina/scp/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "mina-scp"
|
8
|
+
spec.version = Mina::Scp::VERSION
|
9
|
+
spec.authors = ["Anton Dieterle"]
|
10
|
+
spec.email = ["antondie@gmail.com"]
|
11
|
+
spec.description = %q{Basic SCP helpers for Mina deployer for download/upload}
|
12
|
+
spec.summary = %q{Download/upload helpers for Mina deployer using SCP}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mina-scp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Anton Dieterle
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-05-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Basic SCP helpers for Mina deployer for download/upload
|
42
|
+
email:
|
43
|
+
- antondie@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- .gitignore
|
49
|
+
- CHANGELOG.md
|
50
|
+
- CONTRIBUTING.md
|
51
|
+
- Gemfile
|
52
|
+
- Gemfile.lock
|
53
|
+
- LICENSE.txt
|
54
|
+
- README.md
|
55
|
+
- Rakefile
|
56
|
+
- lib/mina/scp.rb
|
57
|
+
- lib/mina/scp/version.rb
|
58
|
+
- mina-scp.gemspec
|
59
|
+
homepage: ''
|
60
|
+
licenses:
|
61
|
+
- MIT
|
62
|
+
metadata: {}
|
63
|
+
post_install_message:
|
64
|
+
rdoc_options: []
|
65
|
+
require_paths:
|
66
|
+
- lib
|
67
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - '>='
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
requirements: []
|
78
|
+
rubyforge_project:
|
79
|
+
rubygems_version: 2.0.2
|
80
|
+
signing_key:
|
81
|
+
specification_version: 4
|
82
|
+
summary: Download/upload helpers for Mina deployer using SCP
|
83
|
+
test_files: []
|