teleporter 0.0.14 → 0.0.15
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/lib/generators/initial/capistrano.rb +133 -4
- data/lib/generators/initial/templates/capistrano/tasks/{check_revision.cap → check_revision.rake} +0 -0
- data/lib/generators/initial/templates/capistrano/tasks/{compile_assets_locally.cap → compile_assets_locally.rake} +0 -0
- data/lib/generators/initial/templates/capistrano/tasks/{logs.cap → logs.rake} +0 -0
- data/lib/generators/initial/templates/capistrano/tasks/{restart.cap → restart.rake} +0 -0
- data/lib/generators/initial/templates/capistrano/tasks/{setup_config.cap → setup_config.rake} +0 -0
- data/lib/teleporter/version.rb +1 -1
- 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: 5bc1577f3f9290f6a4275836e730defc5fc78a88
|
4
|
+
data.tar.gz: 73e66a6b98e16a75d6bbefd0c1442c9814f88da5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8800bf16f79c5e513c5ca04fe89a4860f8da7dd045da91d2967ec78e65e70b57e8315a72565ca0b0105987364b0b3f18abe3ef830b9bb3bc7a0e2191d37c5d16
|
7
|
+
data.tar.gz: 87fbd5b697d7b637ad03a5c798e5f6317ef3cd2c9247640c50b321ad6cd65731013cb66c14fe4f1d90958333d7ba31996d55d9cd3c2760adb6214e21df6cbd82
|
@@ -11,16 +11,145 @@ module Initial
|
|
11
11
|
gem 'capistrano-sidekiq' , github: 'seuros/capistrano-sidekiq'
|
12
12
|
end
|
13
13
|
|
14
|
-
|
14
|
+
Bundler.with_clean_env do
|
15
|
+
run "bundle install"
|
16
|
+
end
|
15
17
|
|
16
18
|
directory 'capistrano/tasks', 'lib/capistrano/tasks'
|
17
19
|
directory 'capistrano/shared', 'config/deploy/shared'
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
|
21
|
+
template "capistrano/lib/substitute_strings.rb", "lib/capistrano/substitute_strings.rb"
|
22
|
+
template "capistrano/lib/template.rb", "lib/capistrano/template.rb"
|
23
|
+
|
24
|
+
run 'cap install'
|
25
|
+
|
26
|
+
uncomment_lines 'Capfile', /require 'capistrano\/rbenv'/
|
27
|
+
uncomment_lines 'Capfile', /require 'capistrano\/bundler'/
|
28
|
+
uncomment_lines 'Capfile', /require 'capistrano\/rails\/assets'/
|
29
|
+
uncomment_lines 'Capfile', /require 'capistrano\/rails\/migrations'/
|
30
|
+
insert_into_file "Capfile", "require 'capistrano/sidekiq'\n",
|
31
|
+
after: "require 'capistrano/rails/migrations'\n"
|
32
|
+
|
33
|
+
|
34
|
+
append_to_file 'config/deploy.rb' do
|
35
|
+
<<-EOT
|
36
|
+
set :rbenv_type, :system
|
37
|
+
set :rbenv_ruby, '2.1.2'
|
38
|
+
set :rbenv_prefix, "RBENV_ROOT=\#{fetch(:rbenv_path)} RBENV_VERSION=\#{fetch(:rbenv_ruby)} \#{fetch(:rbenv_path)}/bin/rbenv exec"
|
39
|
+
set :rbenv_map_bins, %w{rake gem bundle ruby rails}
|
40
|
+
set :linked_files, %w{config/database.yml config/application.yml}
|
41
|
+
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/uploads}
|
42
|
+
set(:config_files, %w(
|
43
|
+
nginx.conf
|
44
|
+
application.yml
|
45
|
+
database.example.yml
|
46
|
+
log_rotation
|
47
|
+
monit
|
48
|
+
monit_sidekiq
|
49
|
+
unicorn.rb
|
50
|
+
unicorn_init.sh
|
51
|
+
sidekiq_init.sh
|
52
|
+
))
|
53
|
+
set(:executable_config_files, %w(
|
54
|
+
unicorn_init.sh
|
55
|
+
sidekiq_init.sh
|
56
|
+
))
|
57
|
+
set(:symlinks, [
|
58
|
+
{
|
59
|
+
source: "nginx.conf",
|
60
|
+
link: "/etc/nginx/sites-enabled/{{full_app_name}}"
|
61
|
+
},
|
62
|
+
{
|
63
|
+
source: "unicorn_init.sh",
|
64
|
+
link: "/etc/init.d/unicorn_{{full_app_name}}"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
source: "log_rotation",
|
68
|
+
link: "/etc/logrotate.d/{{full_app_name}}"
|
69
|
+
},
|
70
|
+
{
|
71
|
+
source: "monit",
|
72
|
+
link: "/etc/monit/conf.d/{{full_app_name}}.conf"
|
73
|
+
},
|
74
|
+
{
|
75
|
+
source: "monit_sidekiq",
|
76
|
+
link: "/etc/monit/conf.d/sidekiq_{{full_app_name}}.conf"
|
77
|
+
},
|
78
|
+
{
|
79
|
+
source: "sidekiq_init.sh",
|
80
|
+
link: "/etc/init.d/sidekiq_{{full_app_name}}"
|
81
|
+
}
|
82
|
+
])
|
83
|
+
namespace :deploy do
|
84
|
+
desc 'Normalize asset timestamps'
|
85
|
+
task migr: fetch(:stage) do
|
86
|
+
on roles(:app) do
|
87
|
+
within release_path do
|
88
|
+
execute :rake, "migrate:users", "RAILS_ENV=\#{fetch(:stage)}"
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
namespace :deploy do
|
95
|
+
task clear_cache: fetch(:stage) do
|
96
|
+
on roles(:app) do
|
97
|
+
within release_path do
|
98
|
+
execute :rake, 'tmp:cache:clear'
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
namespace :deploy do
|
105
|
+
# make sure we're deploying what we think we're deploying
|
106
|
+
before :deploy, "deploy:check_revision"
|
107
|
+
# only allow a deploy with passing tests to deployed
|
108
|
+
# compile assets locally then rsync
|
109
|
+
#after 'deploy:symlink:shared', 'deploy:compile_assets_locally'
|
110
|
+
after :finishing, 'deploy:cleanup'
|
111
|
+
after :finishing, 'deploy:restart'
|
112
|
+
after :finishing, 'deploy:clear_cache'
|
113
|
+
#after :finishing, 'sidekiq:restart'
|
114
|
+
#after :finishing, 'deploy:migr'
|
115
|
+
end
|
116
|
+
|
117
|
+
EOT
|
118
|
+
end
|
119
|
+
|
120
|
+
append_to_file 'config/deploy/production.rb' do
|
121
|
+
<<-EOT
|
122
|
+
set :stage, :production
|
123
|
+
set :branch, "master"
|
124
|
+
|
125
|
+
# used in case we're deploying multiple versions of the same
|
126
|
+
# app side by side. Also provides quick sanity checks when looking
|
127
|
+
# at filepaths
|
128
|
+
set :full_app_name, "\#{fetch(:application)}_\#{fetch(:stage)}"
|
129
|
+
|
130
|
+
server '95.85.33.125', user: 'deploy', roles: %w{web app db}, primary: true
|
131
|
+
|
132
|
+
set :deploy_to, "/home/\#{fetch(:deploy_user)}/apps/\#{fetch(:full_app_name)}"
|
133
|
+
|
134
|
+
# dont try and infer something as important as environment from
|
135
|
+
# stage name.
|
136
|
+
set :rails_env, :production
|
137
|
+
|
138
|
+
# number of unicorn workers, this will be reflected in
|
139
|
+
# the unicorn.rb and the monit configs
|
140
|
+
set :unicorn_worker_count, 2
|
141
|
+
|
142
|
+
# whether we're using ssl or not, used for building nginx
|
143
|
+
# config file
|
144
|
+
set :enable_ssl, false
|
145
|
+
EOT
|
22
146
|
end
|
23
147
|
|
148
|
+
p '*****'
|
149
|
+
p 'config application name in config/deploy.rb'
|
150
|
+
p 'config git repo path in config/deploy.rb'
|
151
|
+
p 'remove default deploy:start task in config/deploy.rb'
|
152
|
+
p 'remove default examples in config/production/deploy.rb'
|
24
153
|
end
|
25
154
|
end
|
26
155
|
end
|
data/lib/generators/initial/templates/capistrano/tasks/{check_revision.cap → check_revision.rake}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/generators/initial/templates/capistrano/tasks/{setup_config.cap → setup_config.rake}
RENAMED
File without changes
|
data/lib/teleporter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teleporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ponomarev Nikolay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -82,11 +82,11 @@ files:
|
|
82
82
|
- lib/generators/initial/templates/capistrano/shared/sidekiq_init.sh.erb
|
83
83
|
- lib/generators/initial/templates/capistrano/shared/unicorn.rb.erb
|
84
84
|
- lib/generators/initial/templates/capistrano/shared/unicorn_init.sh.erb
|
85
|
-
- lib/generators/initial/templates/capistrano/tasks/check_revision.
|
86
|
-
- lib/generators/initial/templates/capistrano/tasks/compile_assets_locally.
|
87
|
-
- lib/generators/initial/templates/capistrano/tasks/logs.
|
88
|
-
- lib/generators/initial/templates/capistrano/tasks/restart.
|
89
|
-
- lib/generators/initial/templates/capistrano/tasks/setup_config.
|
85
|
+
- lib/generators/initial/templates/capistrano/tasks/check_revision.rake
|
86
|
+
- lib/generators/initial/templates/capistrano/tasks/compile_assets_locally.rake
|
87
|
+
- lib/generators/initial/templates/capistrano/tasks/logs.rake
|
88
|
+
- lib/generators/initial/templates/capistrano/tasks/restart.rake
|
89
|
+
- lib/generators/initial/templates/capistrano/tasks/setup_config.rake
|
90
90
|
- lib/generators/initial/templates/rspec_base/configs/capybara.rb
|
91
91
|
- lib/generators/initial/templates/rspec_base/configs/database_cleaner.rb
|
92
92
|
- lib/generators/initial/templates/rspec_base/configs/devise.rb
|