mina 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +2 -0
- data/data/deploy.rb +2 -1
- data/docs/3rd_party_plugins.md +1 -0
- data/lib/mina/commands.rb +1 -1
- data/lib/mina/version.rb +1 -1
- data/mina.gemspec +1 -0
- data/spec/lib/mina/commands_spec.rb +2 -2
- data/spec/spec_helper.rb +0 -2
- data/spec/support/outputs/console.txt +1 -1
- data/spec/support/outputs/deploy_cleanup.txt +1 -1
- data/spec/support/outputs/log.txt +1 -1
- data/spec/support/outputs/rollback.txt +1 -1
- data/spec/support/outputs/run.txt +1 -1
- data/tasks/mina/default.rb +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c600ccb96e7721df46f0db5e8e525d18b6b59387
|
4
|
+
data.tar.gz: f0e73a1e10e39374893b7a26fd156c3fb266cd9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: facef90c1d0803c2b0a6cbd0da636647e52e692c79ba0e0aa1b3c320384617329b8cdd40589ce217cc549ae8ed04be96a8955df890feba14ed3c48910c2fdbcd
|
7
|
+
data.tar.gz: 74272016e301dffe407f570745a5ac147c258ff005e49b3f4085b146f8e224eebc0e4c69ad86d7f128a22c1a5e77518cdae51ff7636fc12cbcfde820bbdbd972
|
data/Readme.md
CHANGED
@@ -24,6 +24,8 @@ Compare this to the likes of [Capistrano](https://github.com/capistrano/capistra
|
|
24
24
|
$ gem install mina
|
25
25
|
$ mina init
|
26
26
|
|
27
|
+
Mina requires ruby 2.0.0 or greater. For older please use [0.3.8 version](https://github.com/mina-deploy/mina/blob/v0.3.8/)
|
28
|
+
|
27
29
|
Documentation
|
28
30
|
----------------
|
29
31
|
|
data/data/deploy.rb
CHANGED
@@ -9,6 +9,7 @@ require 'mina/git'
|
|
9
9
|
# repository - Git repo to clone from. (needed by mina/git)
|
10
10
|
# branch - Branch name to deploy. (needed by mina/git)
|
11
11
|
|
12
|
+
set :application_name, 'foobar'
|
12
13
|
set :domain, 'foobar.com'
|
13
14
|
set :deploy_to, '/var/www/foobar.com'
|
14
15
|
set :repository, 'git://...'
|
@@ -63,7 +64,7 @@ task :deploy do
|
|
63
64
|
end
|
64
65
|
|
65
66
|
# you can use `run :local` to run tasks on local machine before of after the deploy scripts
|
66
|
-
# run
|
67
|
+
# run(:local){ say 'done' }
|
67
68
|
end
|
68
69
|
|
69
70
|
# For help in making your deploy script, see the Mina documentation:
|
data/docs/3rd_party_plugins.md
CHANGED
@@ -28,6 +28,7 @@
|
|
28
28
|
* [mina-sidekiq](https://github.com/Mic92/mina-sidekiq)
|
29
29
|
* [mina-slack](https://github.com/TAKAyukiatkwsk/mina-slack)
|
30
30
|
* [mina-stack](https://github.com/div/mina-stack)
|
31
|
+
* [mina-systemd](https://github.com/alexkojin/mina-systemd)
|
31
32
|
* [mina-tail](https://github.com/modomoto/mina-tail)
|
32
33
|
* [mina-unicorn](https://github.com/openteam/mina-unicorn)
|
33
34
|
* [mina-whenever](https://github.com/mina-deploy/mina-whenever)
|
data/lib/mina/commands.rb
CHANGED
@@ -33,7 +33,7 @@ module Mina
|
|
33
33
|
def process(path = nil)
|
34
34
|
if path
|
35
35
|
queue[stage].unshift(%{echo "$ cd #{path}"}) if fetch(:verbose)
|
36
|
-
%{(cd #{path} && #{queue[stage].join(' && ')})}
|
36
|
+
%{(cd #{path} && #{queue[stage].join(' && ')} && cd -)}
|
37
37
|
else
|
38
38
|
queue[stage].join("\n")
|
39
39
|
end
|
data/lib/mina/version.rb
CHANGED
data/mina.gemspec
CHANGED
@@ -24,5 +24,6 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency 'rspec', '~> 3.5.0'
|
25
25
|
spec.add_development_dependency 'pry-byebug'
|
26
26
|
spec.add_development_dependency 'awesome_print'
|
27
|
+
spec.add_development_dependency 'simplecov'
|
27
28
|
spec.add_development_dependency 'codeclimate-test-reporter'
|
28
29
|
end
|
@@ -68,7 +68,7 @@ describe Mina::Commands do
|
|
68
68
|
end
|
69
69
|
|
70
70
|
it 'joins all the commands within a path' do
|
71
|
-
expect(commands.process('some/path')).to eq('(cd some/path && ls -al && pwd)')
|
71
|
+
expect(commands.process('some/path')).to eq('(cd some/path && ls -al && pwd && cd -)')
|
72
72
|
end
|
73
73
|
|
74
74
|
context 'when verbose' do
|
@@ -76,7 +76,7 @@ describe Mina::Commands do
|
|
76
76
|
after { Mina::Configuration.instance.remove(:verbose) }
|
77
77
|
|
78
78
|
it 'joins all the commands within a path and echoes it' do
|
79
|
-
expect(commands.process('some/path')).to eq("(cd some/path && echo \"$ cd some/path\" && ls -al && pwd)")
|
79
|
+
expect(commands.process('some/path')).to eq("(cd some/path && echo \"$ cd some/path\" && ls -al && pwd && cd -)")
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
\(cd\ .*/deploy/current\ &&\ RAILS_ENV="production"\ bundle\ exec\ rails\ console\)
|
1
|
+
\(cd\ .*/deploy/current\ &&\ RAILS_ENV="production"\ bundle\ exec\ rails\ console\ &&\ cd\ -\)
|
@@ -1,2 +1,2 @@
|
|
1
1
|
echo\ "\-\-\-\-\->\ Cleaning\ up\ old\ releases\ \(keeping\ 2\)"
|
2
|
-
\(cd\ .*/deploy/releases\ &&\ count=\$\(ls\ \-A1\ \|\ sort\ \-rn\ \|\ wc\ \-l\)\ &&\ remove=\$\(\(count\ >\ 2\ \?\ count\ \-\ 2\ :\ 0\)\)\ &&\ ls\ \-A1\ \|\ sort\ \-rn\ \|\ tail\ \-n\ \$remove\ \|\ xargs\ rm\ \-rf\ \{\}\)
|
2
|
+
\(cd\ .*/deploy/releases\ &&\ count=\$\(ls\ \-A1\ \|\ sort\ \-rn\ \|\ wc\ \-l\)\ &&\ remove=\$\(\(count\ >\ 2\ \?\ count\ \-\ 2\ :\ 0\)\)\ &&\ ls\ \-A1\ \|\ sort\ \-rn\ \|\ tail\ \-n\ \$remove\ \|\ xargs\ rm\ \-rf\ \{\} &&\ cd\ -\)
|
@@ -1 +1 @@
|
|
1
|
-
\(cd\ .*deploy/shared/log\ &&\ tail\ \-f\ production\.log\)
|
1
|
+
\(cd\ .*deploy/shared/log\ &&\ tail\ \-f\ production\.log\ &&\ cd\ -\)
|
@@ -1,2 +1,2 @@
|
|
1
1
|
echo\ "\-\-\-\-\->\ Rolling\ back\ to\ previous\ release"
|
2
|
-
\(cd\ .*/deploy/releases\ &&\ rollback_release=\$\(ls\ \-1A\ \|\ sort\ \-n\ \|\ tail\ \-n\ 2\ \|\ head\ \-n\ 1\)\ &&\ echo\ "\-\-\-\-\->\ Rollbacking\ to\ release:\ \$rollback_release"\ &&\ ln\ \-nfs\ .*/deploy/releases/\$rollback_release\ .*/deploy/current\ &&\ current_release=\$\(ls\ \-1A\ \|\ sort\ \-n\ \|\ tail\ \-n\ 1\)\ &&\ echo\ "\-\-\-\-\->\ Deleting\ current\ release:\ \$current_release"\ &&\ rm\ \-rf\ .*/deploy/releases/\$current_release\)
|
2
|
+
\(cd\ .*/deploy/releases\ &&\ rollback_release=\$\(ls\ \-1A\ \|\ sort\ \-n\ \|\ tail\ \-n\ 2\ \|\ head\ \-n\ 1\)\ &&\ echo\ "\-\-\-\-\->\ Rollbacking\ to\ release:\ \$rollback_release"\ &&\ ln\ \-nfs\ .*/deploy/releases/\$rollback_release\ .*/deploy/current\ &&\ current_release=\$\(ls\ \-1A\ \|\ sort\ \-n\ \|\ tail\ \-n\ 1\)\ &&\ echo\ "\-\-\-\-\->\ Deleting\ current\ release:\ \$current_release"\ &&\ rm\ \-rf\ .*/deploy/releases/\$current_release\ &&\ cd\ -\)
|
@@ -1 +1 @@
|
|
1
|
-
\(cd .*deploy && ls -al\)
|
1
|
+
\(cd .*deploy && ls -al\ &&\ cd\ -\)
|
data/tasks/mina/default.rb
CHANGED
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.4
|
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-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: codeclimate-test-reporter
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|