openteam-capistrano 0.0.5 → 0.0.6

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.
@@ -1,5 +1,7 @@
1
1
  require "openteam/capistrano/dependencies"
2
- require "openteam/capistrano/setup"
3
2
  require "openteam/capistrano/hooks"
4
- require "openteam/capistrano/tagging"
3
+ require "openteam/capistrano/setup_common"
4
+ require "openteam/capistrano/setup_deploy"
5
+ require "openteam/capistrano/setup_git"
5
6
  require "openteam/capistrano/subscriber"
7
+ require "openteam/capistrano/tagging"
@@ -0,0 +1,25 @@
1
+ Capistrano::Configuration.instance.load do
2
+ # do not use sudo by default
3
+ set :use_sudo, false
4
+
5
+ # source repostitory settings
6
+ # this files will be symlinked from shared to current path on deploy:create_symlinks
7
+ set :shared_children, %w[config/settings.yml config/database.yml log tmp/sockets tmp/pids]
8
+
9
+ # for assets compilation on host with nodejs
10
+ set :default_shell, 'bash -l'
11
+
12
+ # make bin stubs for candy console rails runs
13
+ set :bundle_flags, '--binstubs --deployment --quiet'
14
+
15
+ # gem capistrano-db-tasks
16
+ # we do not need dump file after db:pull
17
+ set :db_local_clean, true
18
+
19
+ # gem whenever
20
+ # point to bundled version of whenever command
21
+ set :whenever_command, 'bundle exec whenever'
22
+
23
+ # tagging needs this
24
+ set :local_user, ENV['USER'] || ENV['USERNAME']
25
+ end
@@ -0,0 +1,24 @@
1
+ Capistrano::Configuration.instance.load do
2
+ after 'multistage:ensure', 'openteam:setup_deploy'
3
+
4
+ namespace :openteam do
5
+ task :setup_deploy do
6
+ set :deploy_config, YAML::load(File.open('config/deploy.yml'))[stage.to_s]
7
+
8
+ # application name
9
+ set :application, deploy_config['application']
10
+
11
+ # deployment host
12
+ set :domain, deploy_config['domain']
13
+
14
+ # deloyment gateway
15
+ set:gateway, deploy_config['gateway'] if deploy_config.has_key? 'gateway'
16
+
17
+ # application root
18
+ set :deploy_to, "/srv/#{application}"
19
+
20
+ # setup server
21
+ server domain, :app, :web, :db, :primary => true
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,8 @@
1
+ Capistrano::Configuration.instance.load do
2
+ set :scm, :git
3
+ set(:ssh_repository) { `git config --get remote.origin.url`.chomp }
4
+ set(:repository) { ssh_repository.gsub(/^git@(.+?):(.+)$/, 'git://\1/\2') }
5
+ set :branch, :master
6
+ set :deploy_via, :remote_cache
7
+ set :ssh_options, {:forward_agent => true}
8
+ end
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = 'openteam-capistrano'
7
- gem.version = '0.0.5'
7
+ gem.version = '0.0.6'
8
8
  gem.authors = ["OpenTeam developers"]
9
9
  gem.email = ["developers@openteam.ru"]
10
10
  gem.description = %q{OpenTeam common capistrano recipe}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openteam-capistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-25 00:00:00.000000000 Z
12
+ date: 2013-03-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano-db-tasks
@@ -107,7 +107,9 @@ files:
107
107
  - lib/openteam/capistrano/dependencies.rb
108
108
  - lib/openteam/capistrano/hooks.rb
109
109
  - lib/openteam/capistrano/recipes.rb
110
- - lib/openteam/capistrano/setup.rb
110
+ - lib/openteam/capistrano/setup_common.rb
111
+ - lib/openteam/capistrano/setup_deploy.rb
112
+ - lib/openteam/capistrano/setup_git.rb
111
113
  - lib/openteam/capistrano/subscriber.rb
112
114
  - lib/openteam/capistrano/tagging.rb
113
115
  - openteam-capistrano.gemspec
@@ -125,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
125
127
  version: '0'
126
128
  segments:
127
129
  - 0
128
- hash: 4109376646261653517
130
+ hash: 2912125959121799691
129
131
  required_rubygems_version: !ruby/object:Gem::Requirement
130
132
  none: false
131
133
  requirements:
@@ -134,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
136
  version: '0'
135
137
  segments:
136
138
  - 0
137
- hash: 4109376646261653517
139
+ hash: 2912125959121799691
138
140
  requirements: []
139
141
  rubyforge_project:
140
142
  rubygems_version: 1.8.24
@@ -1,62 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
- after 'multistage:ensure', 'openteam:setup'
3
-
4
- namespace :openteam do
5
- task :setup do
6
- def deploy_config
7
- @deploy_config ||= YAML::load(File.open('config/deploy.yml'))[stage.to_s]
8
- end
9
-
10
- def ssh_git_repository_url
11
- `git config --get remote.origin.url`.chomp
12
- end
13
-
14
- def git_repository_url
15
- @git_repository_url ||= ssh_git_repository_url.gsub(/^git@(.+?):(.+)$/, 'git://\1/\2')
16
- end
17
-
18
- set :application, deploy_config['application']
19
- set :domain, deploy_config['domain']
20
- set :gateway, deploy_config['gateway'] if deploy_config.has_key? 'gateway'
21
-
22
- # application root
23
- set :deploy_to, "/srv/#{application}"
24
-
25
- # do not use sudo by default
26
- set :use_sudo, false
27
-
28
- # source repostitory settings
29
- set :scm, :git
30
- set :repository, git_repository_url
31
- set :branch, :master
32
- set :deploy_via, :remote_cache
33
- set :ssh_options, {:forward_agent => true}
34
-
35
- # this files will be symlinked from shared to current path on deploy
36
- set :shared_children, %w[config/settings.yml config/database.yml log tmp/sockets tmp/pids]
37
-
38
- # for assets compilation on host with nodejs
39
- set :default_shell, 'bash -l'
40
-
41
- # make bin stubs for candy console rails runs
42
- set :bundle_flags, '--binstubs --deployment --quiet'
43
-
44
- # gem capistrano-db-tasks
45
- # we do not need dump file after db:pull
46
- set :db_local_clean, true
47
-
48
- # gem whenever
49
- # point to bundled version of whenever command
50
- set :whenever_command, 'bundle exec whenever'
51
-
52
- # tagging needs this
53
- set :local_user, ENV['USER'] || ENV['USERNAME']
54
-
55
- # subscriber name
56
- set :subscriber_name, "#{application}-subscriber"
57
-
58
- # setup server
59
- server domain, :app, :web, :db, :primary => true
60
- end
61
- end
62
- end