mina 1.0.0 → 1.0.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/docs/faq.md +1 -1
- data/lib/mina/version.rb +1 -1
- data/spec/support/outputs/rvm_use.txt +1 -1
- data/spec/support/outputs/ssh_keyscan_repo.txt +2 -2
- data/spec/tasks/default_spec.rb +1 -0
- data/tasks/mina/default.rb +2 -0
- data/tasks/mina/rvm.rb +3 -3
- 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: 7e57d7a2f311be20dd29e310433712323e2a108b
|
4
|
+
data.tar.gz: 3c2188b7ec7e9b7b04e6979a6d4779130c6ad766
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5b3ee0b4444deb707c716b95ac2f5ecc9f804ca926cc75033a2a3ccd1c5877e66322e93b43a596fcde5cfca36389917dbe31ac47737f5794353a2fc7abe9a42
|
7
|
+
data.tar.gz: ab068668773392d48fe8d8018d120d8c7c331981f97a7855bcd8de97482ac03972b1e9526521c422b076954a86c63d19f7d950b88e4e278ecb0c18c8d3285dde
|
data/docs/faq.md
CHANGED
@@ -17,7 +17,7 @@ if you setup your server correctly and you are using a ruby environment manager
|
|
17
17
|
|
18
18
|
## - Mina hangs after i type my password in
|
19
19
|
|
20
|
-
Mina assumes that you have set up the communication with your server
|
20
|
+
Mina assumes that you have set up the communication with your server through the public/private keys, not password. If you want to use the password you will have to change the execution mode:
|
21
21
|
|
22
22
|
set :execution_mode, :system
|
23
23
|
|
data/lib/mina/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
echo\ "\-\-\-\-\->\ Using\ RVM\ environment\ \\\"123\\\"\"\s*if\ \[\[\ !\ \-s\ "\$HOME/\.rvm/scripts/rvm"\ \]\];\ then\s*echo\ "!\ Ruby\ Version\ Manager\ not\ found"\s*echo\ "!\ If\ RVM\ is\ installed,\ check\ your\ :rvm_use_path\ setting\."\s*exit 1\s*fi\s*source\ \$HOME/\.rvm/scripts/rvm\n\s*
|
1
|
+
echo\ "\-\-\-\-\->\ Using\ RVM\ environment\ \\\"123\\\"\"\s*if\ \[\[\ !\ \-s\ "\$HOME/\.rvm/scripts/rvm"\ \]\];\ then\s*echo\ "!\ Ruby\ Version\ Manager\ not\ found"\s*echo\ "!\ If\ RVM\ is\ installed,\ check\ your\ :rvm_use_path\ setting\."\s*exit 1\s*fi\s*source\ \$HOME/\.rvm/scripts/rvm\n\s*rvm\ use\ \"123\"\ \-\-create
|
@@ -1,3 +1,3 @@
|
|
1
|
-
if ! ssh-keygen -H -F
|
2
|
-
ssh-keyscan -t rsa -p 22 -H
|
1
|
+
if ! ssh-keygen -H -F github.com &>/dev/null; then
|
2
|
+
ssh-keyscan -t rsa -p 22 -H github.com >> ~/.ssh/known_hosts
|
3
3
|
fi
|
data/spec/tasks/default_spec.rb
CHANGED
@@ -3,6 +3,7 @@ require 'spec_helper'
|
|
3
3
|
RSpec.describe 'default', type: :rake do
|
4
4
|
describe 'ssh_keyscan_repo' do
|
5
5
|
it 'scans ssh' do
|
6
|
+
Mina::Configuration.instance.set(:repository, 'git@github.com/exapmle')
|
6
7
|
expect { invoke_all }.to output(output_file('ssh_keyscan_repo')).to_stdout
|
7
8
|
end
|
8
9
|
end
|
data/tasks/mina/default.rb
CHANGED
@@ -27,6 +27,8 @@ task :ssh_keyscan_repo do
|
|
27
27
|
repo_host = fetch(:repository).split(%r{@|://}).last.split(%r{:|\/}).first
|
28
28
|
repo_port = /:([0-9]+)/.match(fetch(:repository)) && /:([0-9]+)/.match(fetch(:repository))[1] || '22'
|
29
29
|
|
30
|
+
next if repo_host == ""
|
31
|
+
|
30
32
|
command %{
|
31
33
|
if ! ssh-keygen -H -F #{repo_host} &>/dev/null; then
|
32
34
|
ssh-keyscan -t rsa -p #{repo_port} -H #{repo_host} >> ~/.ssh/known_hosts
|
data/tasks/mina/rvm.rb
CHANGED
@@ -3,7 +3,7 @@ set :rvm_use_path, '$HOME/.rvm/scripts/rvm'
|
|
3
3
|
task :'rvm:use', :env do |_, args|
|
4
4
|
unless args[:env]
|
5
5
|
puts "Task 'rvm:use' needs an RVM environment name as an argument."
|
6
|
-
puts "Example: invoke :'rvm:use
|
6
|
+
puts "Example: invoke :'rvm:use', 'ruby-1.9.2@default'"
|
7
7
|
exit 1
|
8
8
|
end
|
9
9
|
|
@@ -16,13 +16,13 @@ task :'rvm:use', :env do |_, args|
|
|
16
16
|
fi
|
17
17
|
}
|
18
18
|
command %{source #{fetch(:rvm_use_path)}}
|
19
|
-
|
19
|
+
command %{rvm use "#{args[:env]}" --create}
|
20
20
|
end
|
21
21
|
|
22
22
|
task :'rvm:wrapper', :env, :name, :bin do |_, args|
|
23
23
|
unless args[:env] && args[:name] && args[:bin]
|
24
24
|
puts "Task 'rvm:wrapper' needs an RVM environment name, an wrapper name and the binary name as arguments"
|
25
|
-
puts "Example: invoke :'rvm:wrapper
|
25
|
+
puts "Example: invoke :'rvm:wrapper', 'ruby-1.9.2@myapp,myapp,unicorn_rails'"
|
26
26
|
exit 1
|
27
27
|
end
|
28
28
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mina
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stjepan Hadjić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|