mina 0.3.2 → 0.3.3
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/HISTORY.md +7 -7
- data/Readme.md +21 -14
- data/lib/mina/deploy.rb +23 -1
- data/lib/mina/helpers.rb +2 -0
- data/lib/mina/rails.rb +11 -2
- data/lib/mina/version.rb +1 -1
- data/mina.gemspec +1 -1
- data/spec/dsl/invoke_spec.rb +1 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2b6b88e6812eb7ebcfceb198931304b415e71c8
|
4
|
+
data.tar.gz: a4d2b0b278e6ab972d7776c00fcee34cbf1c245d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64e84169e5dd133db2734012303969569f3025ef71a5a127016d6e70285c97420b610063e3066630fa07f385aa6cd4b3c5d2b39825c07b76822af42bed2d2005
|
7
|
+
data.tar.gz: 559043af839f8a34e61585d641976780160bd0c88a3523c9161a607d7f2f5ae329e351cee8ba9728549225b017e5b73fbc0d4777b6c767048ea4435706e19b05
|
data/HISTORY.md
CHANGED
@@ -10,13 +10,13 @@ v0.3.2 - January 24, 2015
|
|
10
10
|
* `mina ssh` command to connect to server (#249) [Anton Dieterle]
|
11
11
|
* link in the support guide (#254) [Aaditya S]
|
12
12
|
|
13
|
-
[Denis]:
|
14
|
-
[Aaditya S]:
|
15
|
-
[Tomi]:
|
16
|
-
[lucapette]:
|
17
|
-
[Ted Price]:
|
18
|
-
[Anton Dieterle]:
|
19
|
-
[Paul B.]:
|
13
|
+
[Denis]: https://github.com/stereodenis
|
14
|
+
[Aaditya S]: https://github.com/jartek
|
15
|
+
[Tomi]: https://github.com/equivalent
|
16
|
+
[lucapette]: https://github.com/lucapette
|
17
|
+
[Ted Price]: https://github.com/pricees
|
18
|
+
[Anton Dieterle]: https://github.com/adie
|
19
|
+
[Paul B.]: https://github.com/paulRbr
|
20
20
|
|
21
21
|
|
22
22
|
v0.3.1 - October 17, 2014
|
data/Readme.md
CHANGED
@@ -56,7 +56,7 @@ change it's ownership to the correct user.
|
|
56
56
|
### Step 3: Run 'mina setup'
|
57
57
|
|
58
58
|
Back at your computer, do `mina setup` to set up the [folder
|
59
|
-
structure](#
|
59
|
+
structure](#directory-structure) in this path. This will connect to your server
|
60
60
|
via SSH and create the right directories.
|
61
61
|
|
62
62
|
$ mina setup
|
@@ -751,21 +751,20 @@ NOTE: Requires sudo privileges
|
|
751
751
|
|
752
752
|
## Common usage
|
753
753
|
|
754
|
-
set :application, "app-name"
|
755
|
-
|
756
|
-
task :deploy => :environment do
|
757
754
|
~~~ ruby
|
758
|
-
|
759
|
-
# ...
|
760
|
-
invoke 'foreman:export'
|
761
|
-
# ...
|
762
|
-
end
|
763
|
-
to :launch do
|
764
|
-
invoke 'foreman:restart'
|
765
|
-
end
|
766
|
-
~~~
|
755
|
+
set :application, "app-name"
|
767
756
|
|
768
|
-
|
757
|
+
task :deploy => :environment do
|
758
|
+
deploy do
|
759
|
+
# ...
|
760
|
+
invoke 'foreman:export'
|
761
|
+
# ...
|
762
|
+
end
|
763
|
+
to :launch do
|
764
|
+
invoke 'foreman:restart'
|
765
|
+
end
|
766
|
+
end
|
767
|
+
~~~
|
769
768
|
|
770
769
|
## Settings
|
771
770
|
Any and all of these settings can be overriden in your `deploy.rb`.
|
@@ -1022,6 +1021,14 @@ their own.
|
|
1022
1021
|
* [mina-s3](https://github.com/stas/mina-s3)
|
1023
1022
|
* [mina-scp](https://github.com/adie/mina-scp)
|
1024
1023
|
* [mina-hooks](https://github.com/elskwid/mina-hooks)
|
1024
|
+
* [mina-slack](https://github.com/TAKAyukiatkwsk/mina-slack)
|
1025
|
+
* [mina-cakephp](https://github.com/mobvox/mina-cakephp)
|
1026
|
+
* [mina-unicorn](https://github.com/openteam/mina-unicorn)
|
1027
|
+
* [mina-puma](https://github.com/sandelius/mina-puma)
|
1028
|
+
* [mina-mercurial](https://github.com/rainlabs/mina-mercurial)
|
1029
|
+
* [mina-faye](https://github.com/NingenUA/mina-faye)
|
1030
|
+
* [mina-clockwork](https://github.com/907th/mina-clockwork)
|
1031
|
+
* [mina-ftp](https://github.com/stas/mina-ftp)
|
1025
1032
|
|
1026
1033
|
Acknowledgements
|
1027
1034
|
----------------
|
data/lib/mina/deploy.rb
CHANGED
@@ -85,6 +85,28 @@ namespace :deploy do
|
|
85
85
|
#{echo_cmd %{ls -1d [0-9]* | sort -rn | tail -n $remove | xargs rm -rf {}}}
|
86
86
|
}
|
87
87
|
end
|
88
|
+
|
89
|
+
# ### deploy:rollback
|
90
|
+
# Rollbacks the latest release.
|
91
|
+
#
|
92
|
+
# Changes the current link to previous release, and deletes the newest deploy release
|
93
|
+
# Does NOT rollback the database, use
|
94
|
+
#
|
95
|
+
# mina "rake[db:rollback]"
|
96
|
+
desc "Rollbacks the latest release"
|
97
|
+
task :rollback => :environment do
|
98
|
+
queue %[echo "-----> Rolling back to previous release for instance: #{domain}"]
|
99
|
+
|
100
|
+
# Delete existing sym link and create a new symlink pointing to the previous release
|
101
|
+
queue %[echo -n "-----> Creating new symlink from the previous release: "]
|
102
|
+
queue %[ls -Art "#{deploy_to}/releases" | sort | tail -n 2 | head -n 1]
|
103
|
+
queue! %[ls -Art "#{deploy_to}/releases" | sort | tail -n 2 | head -n 1 | xargs -I active ln -nfs "#{deploy_to}/releases/active" "#{deploy_to}/current"]
|
104
|
+
|
105
|
+
# Remove latest release folder (current release)
|
106
|
+
queue %[echo -n "-----> Deleting current release: "]
|
107
|
+
queue %[ls -Art "#{deploy_to}/releases" | sort | tail -n 1]
|
108
|
+
queue! %[ls -Art "#{deploy_to}/releases" | sort | tail -n 1 | xargs -I active rm -rf "#{deploy_to}/releases/active"]
|
109
|
+
end
|
88
110
|
end
|
89
111
|
|
90
112
|
# ### setup
|
@@ -124,7 +146,7 @@ end
|
|
124
146
|
# ### run[]
|
125
147
|
# Runs a command on a server.
|
126
148
|
#
|
127
|
-
# $ mina run[tail -f logs.txt]
|
149
|
+
# $ mina "run[tail -f logs.txt]"
|
128
150
|
|
129
151
|
desc "Runs a command in the server."
|
130
152
|
task :run, [:command] => [:environment] do |t, args|
|
data/lib/mina/helpers.rb
CHANGED
data/lib/mina/rails.rb
CHANGED
@@ -102,7 +102,7 @@ end
|
|
102
102
|
# ### rails[]
|
103
103
|
# Invokes a rails command.
|
104
104
|
#
|
105
|
-
# $ mina rails[console]
|
105
|
+
# $ mina "rails[console]"
|
106
106
|
|
107
107
|
desc "Execute a Rails command in the current deploy."
|
108
108
|
make_run_task[:rails, 'console']
|
@@ -110,7 +110,7 @@ make_run_task[:rails, 'console']
|
|
110
110
|
# ### rake[]
|
111
111
|
# Invokes a rake command.
|
112
112
|
#
|
113
|
-
# $ mina rake
|
113
|
+
# $ mina "rake[db:migrate]"
|
114
114
|
|
115
115
|
desc "Execute a Rake command in the current deploy."
|
116
116
|
make_run_task[:rake, 'db:migrate']
|
@@ -166,6 +166,15 @@ namespace :rails do
|
|
166
166
|
}
|
167
167
|
end
|
168
168
|
|
169
|
+
# ### rails:db_rollback
|
170
|
+
desc "Rollbacks the Rails database."
|
171
|
+
task :'db_rollback' do
|
172
|
+
queue %{
|
173
|
+
echo "-----> Rollbacking database"
|
174
|
+
#{echo_cmd %[#{rake} db:rollback]}
|
175
|
+
}
|
176
|
+
end
|
177
|
+
|
169
178
|
# ### rails:assets_precompile:force
|
170
179
|
desc "Precompiles assets."
|
171
180
|
task :'assets_precompile:force' do
|
data/lib/mina/version.rb
CHANGED
data/mina.gemspec
CHANGED
data/spec/dsl/invoke_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mina
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rico Sta. Cruz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -54,19 +54,19 @@ dependencies:
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 3.0.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name: pry
|
57
|
+
name: pry
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - "
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
62
|
+
version: 0.9.0
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - "
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 0.9.0
|
70
70
|
description: Really fast deployer and server automation tool.
|
71
71
|
email:
|
72
72
|
- rico@nadarei.co
|