mina 0.3.2 → 0.3.3

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: 594c93a14da343bc11ca089567d91917f35ce025
4
- data.tar.gz: 100d1d806af4643e1210b27b9854bc736713a9b7
3
+ metadata.gz: c2b6b88e6812eb7ebcfceb198931304b415e71c8
4
+ data.tar.gz: a4d2b0b278e6ab972d7776c00fcee34cbf1c245d
5
5
  SHA512:
6
- metadata.gz: 849c4f473361748007da0571ffd2979f8736b3731cb2b55e92ccc2aa8e1755fe3cb75a530368c9c6ec4b55f57d5bb5cfa1971cf6569f580a7e1801080134bf15
7
- data.tar.gz: 9f48fcbd66be6820e2c34e763ffcfd56726de7447f1fd4a2e23917c344c2525f528fad4f0a28c769cb7e57d46b9e0a642cb8c024783c322c444f09039cf8e1ca
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]: (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)
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](#directory_structure) in this path. This will connect to your server
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
- deploy do
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
- end
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
@@ -16,6 +16,8 @@ module Mina
16
16
  #
17
17
 
18
18
  def invoke(task, options = {})
19
+ # task.to_s is a ruby 1.8.7 fix
20
+ task = task.to_s
19
21
  Rake.application.invoke_task task
20
22
  if options[:reenable]
21
23
  name = Rake.application.parse_task_string(task).first
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 db:cleanup
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
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  def self.version
3
- "0.3.2"
3
+ "0.3.3"
4
4
  end
5
5
  end
data/mina.gemspec CHANGED
@@ -14,5 +14,5 @@ Gem::Specification.new do |s|
14
14
  s.add_dependency "rake"
15
15
  s.add_dependency "open4", "~> 1.3.4"
16
16
  s.add_development_dependency "rspec", "~> 3.0.0"
17
- s.add_development_dependency "pry-debugger"
17
+ s.add_development_dependency "pry", "~> 0.9.0"
18
18
  end
@@ -39,6 +39,7 @@ describe 'Mina' do
39
39
  end
40
40
  }
41
41
 
42
+
42
43
  %w(World Pirate).each { |name|
43
44
  rake { invoke :"hello[#{name}]", :reenable => true }
44
45
  }
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.2
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-01-24 00:00:00.000000000 Z
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-debugger
57
+ name: pry
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ">="
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '0'
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: '0'
69
+ version: 0.9.0
70
70
  description: Really fast deployer and server automation tool.
71
71
  email:
72
72
  - rico@nadarei.co