prun-ops 0.0.22 → 0.1.0
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/README.md +3 -2
- data/lib/capistrano/all.rake +18 -6
- data/lib/capistrano/diagnosis.rake +2 -2
- data/lib/prun-ops/version.rb +1 -1
- 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: 4dfe043ce4d4265da56b513a118114dcfef69bbe
|
4
|
+
data.tar.gz: 41ab4091364d9c7f9fc5b1c81e740adcf9252d9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37d83a550238ca458976b3a5e0e07590cac43c6e6f6043d3a58750b7313684c40e07476c5e9da87da6315494245bc83b2a7921b864e07ba4fa53c434cd6dcf00
|
7
|
+
data.tar.gz: b8d4744c0e7d77ba8fa3e1d0b57643076bc046ee0f709dd548f1a6a4a23c60e57e511a70ec90264c9495a6e1816efc2587ca0ba285aada59ca12ed1b6434f1d6
|
data/README.md
CHANGED
@@ -60,11 +60,12 @@ Note: Remember change this line in production.rb file: `config.assets.compile =
|
|
60
60
|
|
61
61
|
### Deployment
|
62
62
|
|
63
|
+
* `cap [stg] deploy:cold` first time deployment with schema:load and seeds (replacing db:migrate)
|
63
64
|
* `cap [stg] deploy` deploy your app as usual
|
64
65
|
* `cap [stg] deploy:restart` restart thin server of this application
|
65
66
|
* `cap [stg] deploy:stop` stop thin server
|
66
67
|
* `cap [stg] deploy:start` start thin server
|
67
|
-
* `cap [stg]
|
68
|
+
* `cap [stg] deploy:db_reset` load schema and seeds for first DB setup
|
68
69
|
* `cap [stg] git:remove_repo` Removes repo (useful when repo_url changes)
|
69
70
|
|
70
71
|
Added the possibility of deploying from local repository. Add to `deploy.rb` or `[stg].rb` files:
|
@@ -115,7 +116,7 @@ Release management
|
|
115
116
|
Some capistrano commands useful to connect to server and help with the problem solving.
|
116
117
|
|
117
118
|
* `cap [stg] ssh` open a ssh connection with server
|
118
|
-
* `cap [stg] log[LOG_FILENAME]` tail rails
|
119
|
+
* `cap [stg] log[LOG_FILENAME]` tail all rails logs by default, or only one if LOG_FILENAME is provided
|
119
120
|
* `cap [stg] c` open a rails console with server
|
120
121
|
* `cap [stg] x[COMMAND]` execute any command in server provided as COMMAND (i.e.: cap production x['free -m'])
|
121
122
|
|
data/lib/capistrano/all.rake
CHANGED
@@ -17,13 +17,25 @@ namespace :deploy do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
after :publishing, :restart
|
20
|
-
end
|
21
20
|
|
21
|
+
desc 'Deploy app for first time'
|
22
|
+
task :cold do
|
23
|
+
invoke 'deploy:starting'
|
24
|
+
invoke 'deploy:started'
|
25
|
+
invoke 'deploy:updating'
|
26
|
+
invoke 'bundler:install'
|
27
|
+
invoke 'deploy:db_reset' # This replaces deploy:migrations
|
28
|
+
invoke 'deploy:compile_assets'
|
29
|
+
invoke 'deploy:normalize_assets'
|
30
|
+
invoke 'deploy:publishing'
|
31
|
+
invoke 'deploy:published'
|
32
|
+
invoke 'deploy:finishing'
|
33
|
+
invoke 'deploy:finished'
|
34
|
+
end
|
22
35
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
on roles(:all) do
|
36
|
+
desc 'Setup database'
|
37
|
+
task :db_reset do
|
38
|
+
on roles(:db) do
|
27
39
|
within release_path do
|
28
40
|
with rails_env: fetch(:stage) do
|
29
41
|
execute :rake, 'db:schema:load'
|
@@ -32,4 +44,4 @@ namespace :db do
|
|
32
44
|
end
|
33
45
|
end
|
34
46
|
end
|
35
|
-
end
|
47
|
+
end
|
@@ -19,7 +19,7 @@ end
|
|
19
19
|
desc 'Tails the environment log or the log passed as argument: cap log[thin.3000.log]'
|
20
20
|
task :log, :file do |task, args|
|
21
21
|
on roles(:app) do
|
22
|
-
file = args[:file]? args[:file] : "
|
22
|
+
file = args[:file]? args[:file] : "*"
|
23
23
|
execute "tail -f #{shared_path}/log/#{file}"
|
24
24
|
end
|
25
25
|
end
|
@@ -34,5 +34,5 @@ task :x, :command do |task, args|
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def run_in(host, cmd)
|
37
|
-
exec "ssh #{host.user}@#{host.hostname} -p #{host.port} -tt '#{cmd}'"
|
37
|
+
exec "ssh #{host.user}@#{host.hostname} -p #{host.port || '22'} -tt '#{cmd}'"
|
38
38
|
end
|
data/lib/prun-ops/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prun-ops
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Lebrijo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|