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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cae22a1f308c5c03b29a2e0e6999a4d91be03d22
4
- data.tar.gz: 21bbd317703ba2e9edce06b4d686b2c0c5da531d
3
+ metadata.gz: c600ccb96e7721df46f0db5e8e525d18b6b59387
4
+ data.tar.gz: f0e73a1e10e39374893b7a26fd156c3fb266cd9e
5
5
  SHA512:
6
- metadata.gz: eb92bab261cc5e30981c4758b7e123f93eb18e39a4c0dddf6ebc8832101c7eeca68be40990c5c2dd91bab40bf24a0d88273201f7f9283f955040ae6ed47b012b
7
- data.tar.gz: d739c256ef6f281ec060baebf825c35390748f9575a3284460a93e474a832cfde2030152a226534a46ec76d976c12315498e17f90a73ab6b6c23f044a0a0990f
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 :local { say 'done' }
67
+ # run(:local){ say 'done' }
67
68
  end
68
69
 
69
70
  # For help in making your deploy script, see the Mina documentation:
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Mina
2
- VERSION = '1.0.3'.freeze
2
+ VERSION = '1.0.4'.freeze
3
3
  end
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,7 +1,5 @@
1
- require 'codeclimate-test-reporter'
2
1
  require 'simplecov'
3
2
 
4
- CodeClimate::TestReporter.start
5
3
  SimpleCov.start
6
4
 
7
5
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
@@ -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\ -\)
@@ -7,6 +7,7 @@ task :default do
7
7
  end
8
8
 
9
9
  task :run_commands do
10
+ invoke :environment
10
11
  commands.run(:remote)
11
12
  end
12
13
 
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.3
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-08 00:00:00.000000000 Z
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