capones_recipes 1.9.0 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1,16 @@
1
- Dir.glob(File.join(File.dirname(__FILE__), '/carrier_wave/*.rb')).sort.each { |f| require f }
1
+ Capistrano::Configuration.instance.load do
2
+ before "deploy:setup", "carrier_wave:setup"
3
+ after "deploy:finalize_update", "carrier_wave:symlink"
4
+
5
+ namespace :carrier_wave do
6
+ desc "Create upload directory in capistrano shared path"
7
+ task :setup do
8
+ run "mkdir -p #{shared_path}/uploads"
9
+ end
10
+
11
+ desc "Make symlink for uploads directory"
12
+ task :symlink do
13
+ run "ln -nfs #{shared_path}/uploads #{release_path}/uploads"
14
+ end
15
+ end
16
+ end
@@ -1 +1,16 @@
1
- Dir.glob(File.join(File.dirname(__FILE__), '/deploy_targets/*.rb')).sort.each { |f| require f }
1
+ Capistrano::Configuration.instance.load do
2
+ # Load configuration
3
+ config_path = File.expand_path('~/.capones.yml')
4
+
5
+ if File.exist?(config_path)
6
+ # Parse config file
7
+ config = YAML.load_file(config_path)
8
+
9
+ # States
10
+ deploy_target_path = File.expand_path(config['deploy_target_repository']['path'])
11
+
12
+ # Add stages
13
+ set :stage_dir, File.join(deploy_target_path, application, 'stages')
14
+ load_paths << ""
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ # Email configuration
2
+ Capistrano::Configuration.instance.load do
3
+ after "deploy:finalize_update", "email:symlink"
4
+
5
+ namespace :email do
6
+ desc "Make symlink for email config"
7
+ task :symlink, :roles => :app do
8
+ run "ln -nfs #{shared_path}/config/initializers/email.rb #{release_path}/config/initializers/email.rb"
9
+ end
10
+ end
11
+ end
@@ -1 +1,16 @@
1
- Dir.glob(File.join(File.dirname(__FILE__), '/kuhsaft/*.rb')).sort.each { |f| require f }
1
+ Capistrano::Configuration.instance.load do
2
+ before "deploy:setup", "kuhsaft:setup"
3
+ after "deploy:update_code", "kuhsaft:symlink"
4
+
5
+ namespace :kuhsaft do
6
+ desc "Create uploads directory in capistrano shared path"
7
+ task :setup do
8
+ run "mkdir -p #{shared_path}/uploads"
9
+ end
10
+
11
+ desc "Make symlink for shared uploads"
12
+ task :symlink do
13
+ run "ln -nfs #{shared_path}/uploads #{release_path}/public/uploads"
14
+ end
15
+ end
16
+ end
@@ -1 +1,15 @@
1
- Dir.glob(File.join(File.dirname(__FILE__), '/new_relic/*.rb')).sort.each { |f| require f }
1
+ Capistrano::Configuration.instance.load do
2
+ after "deploy:update_code", "new_relic:symlink"
3
+
4
+ namespace :new_relic do
5
+ desc "Creates newrelic configuration based on example"
6
+ task :prepare_config do
7
+ upload "config/newrelic.yml.example", "#{shared_path}/config/newrelic.yml", :via => :scp
8
+ end
9
+
10
+ desc "Make symlink for shared application yaml"
11
+ task :symlink do
12
+ run "ln -nfs #{shared_path}/config/newrelic.yml #{release_path}/config/newrelic.yml"
13
+ end
14
+ end
15
+ end
@@ -1 +1,10 @@
1
- Dir.glob(File.join(File.dirname(__FILE__), '/restful_authentication/*.rb')).sort.each { |f| require f }
1
+ Capistrano::Configuration.instance.load do
2
+ after "deploy:update_code", "restful_authentication:symlink"
3
+
4
+ namespace :restful_authentication do
5
+ desc "Make symlink for shared uploads"
6
+ task :symlink do
7
+ run "ln -nfs #{shared_path}/config/initializers/site_keys.rb #{release_path}/config/initializers/site_keys.rb"
8
+ end
9
+ end
10
+ end
@@ -1 +1,16 @@
1
- Dir.glob(File.join(File.dirname(__FILE__), '/settings_logic/*.rb')).sort.each { |f| require f }
1
+ Capistrano::Configuration.instance.load do
2
+ before "db:symlink", "settings_logic:symlink"
3
+
4
+ namespace :settings_logic do
5
+ desc "Create application yaml in capistrano shared path"
6
+ task :prepare_config do
7
+ run "mkdir -p #{shared_path}/config"
8
+ upload "config/application.yml.example", "#{shared_path}/config/application.yml", :via => :scp
9
+ end
10
+
11
+ desc "Make symlink for shared application yaml"
12
+ task :symlink do
13
+ run "ln -nfs #{shared_path}/config/application.yml #{release_path}/config/application.yml"
14
+ end
15
+ end
16
+ end
@@ -1 +1,24 @@
1
- Dir.glob(File.join(File.dirname(__FILE__), '/thinking_sphinx/*.rb')).sort.each { |f| require f }
1
+ # Thinking Sphinx for Capistrano
2
+ require 'thinking_sphinx/deploy/capistrano'
3
+
4
+ Capistrano::Configuration.instance.load do
5
+ before "thinking_sphinx:symlink", "thinking_sphinx:setup"
6
+ after "deploy:finalize_update", "thinking_sphinx:symlink"
7
+ before "deploy:restart", "thinking_sphinx:rebuild"
8
+
9
+ namespace :thinking_sphinx do
10
+ desc "Prepare for sphinx config"
11
+ task :setup, :roles => :app do
12
+ run "mkdir -p #{shared_path}/config/sphinx"
13
+ run "mkdir -p #{shared_path}/db/sphinx"
14
+ run "mkdir -p #{shared_path}/tmp/sockets"
15
+ end
16
+
17
+ desc "Make symlink for sphinx configs and data"
18
+ task :symlink, :roles => :app do
19
+ run "ln -nfs #{shared_path}/config/sphinx #{release_path}/config/sphinx"
20
+ run "ln -nfs #{shared_path}/db/sphinx #{release_path}/db/sphinx"
21
+ run "ln -nfs #{shared_path}/tmp/sockets #{release_path}/tmp/sockets"
22
+ end
23
+ end
24
+ end
@@ -1,3 +1,3 @@
1
1
  module CaponesRecipes
2
- VERSION = "1.9.0"
2
+ VERSION = "1.10.0"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capones_recipes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
4
+ hash: 63
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
- - 9
8
+ - 10
9
9
  - 0
10
- version: 1.9.0
10
+ version: 1.10.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Roman Simecek (CyT)
@@ -135,30 +135,21 @@ files:
135
135
  - lib/capones_recipes/tasks/airbrake/setup.rb
136
136
  - lib/capones_recipes/tasks/airbrake/symlink.rb
137
137
  - lib/capones_recipes/tasks/airbrake/templates/airbrake.rb
138
- - lib/capones_recipes/tasks/bookyt.rb
139
- - lib/capones_recipes/tasks/bookyt/setup.rb
140
- - lib/capones_recipes/tasks/bookyt/templates/bookyt.rb
141
138
  - lib/capones_recipes/tasks/carrier_wave.rb
142
- - lib/capones_recipes/tasks/carrier_wave/carrier_wave.rb
143
139
  - lib/capones_recipes/tasks/database.rb
144
140
  - lib/capones_recipes/tasks/database/mysql.rb
145
141
  - lib/capones_recipes/tasks/database/sqlite.rb
146
142
  - lib/capones_recipes/tasks/database/sync.rb
147
143
  - lib/capones_recipes/tasks/deploy_targets.rb
148
- - lib/capones_recipes/tasks/deploy_targets/load.rb
144
+ - lib/capones_recipes/tasks/email.rb
149
145
  - lib/capones_recipes/tasks/kuhsaft.rb
150
- - lib/capones_recipes/tasks/kuhsaft/setup.rb
151
146
  - lib/capones_recipes/tasks/new_relic.rb
152
- - lib/capones_recipes/tasks/new_relic/new_relic.rb
153
147
  - lib/capones_recipes/tasks/rails.rb
154
148
  - lib/capones_recipes/tasks/rails/database_yml.rb
155
149
  - lib/capones_recipes/tasks/rails/logs.rb
156
150
  - lib/capones_recipes/tasks/restful_authentication.rb
157
- - lib/capones_recipes/tasks/restful_authentication/setup.rb
158
151
  - lib/capones_recipes/tasks/settings_logic.rb
159
- - lib/capones_recipes/tasks/settings_logic/settings_logic.rb
160
152
  - lib/capones_recipes/tasks/thinking_sphinx.rb
161
- - lib/capones_recipes/tasks/thinking_sphinx/thinking_sphinx.rb
162
153
  - lib/capones_recipes/tasks/utilities.rb
163
154
  - lib/capones_recipes/version.rb
164
155
  has_rdoc: true
@@ -1,24 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../utilities')
2
-
3
- Capistrano::Configuration.instance(true).load do
4
- after "deploy:finalize_update", "bookyt:symlink"
5
-
6
- namespace :bookyt do
7
- desc "Interactive configuration"
8
- task :prepare_config, :roles => :app do
9
- modules = [:pos, :salary, :stock, :projects].inject([]) do |out, pos|
10
- out << "bookyt_#{pos.to_s}" if Utilities.yes? "Install bookyt_#{pos.to_s}"
11
-
12
- out
13
- end
14
- modules = modules.map {|item| "'#{item}'" }.join(', ')
15
- initializer_template = File.expand_path(File.dirname(__FILE__) + '/templates/bookyt.rb')
16
- puts Utilities.init_file(initializer_template, "<%%>", modules), "#{shared_path}/initializer/bookyt.rb"
17
- end
18
-
19
- desc "Make symlink for shared bookyt initializer"
20
- task :symlink do
21
- run "ln -nfs #{shared_path}/initializer/bookyt.rb #{release_path}/initializer/bookyt.rb"
22
- end
23
- end
24
- end
@@ -1 +0,0 @@
1
- Bookyt::Application.config.bookyt.engines = [<%%>]
@@ -1 +0,0 @@
1
- Dir.glob(File.join(File.dirname(__FILE__), '/bookyt/*.rb')).sort.each { |f| require f }
@@ -1,16 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
- before "deploy:setup", "carrier_wave:setup"
3
- after "deploy:finalize_update", "carrier_wave:symlink"
4
-
5
- namespace :carrier_wave do
6
- desc "Create upload directory in capistrano shared path"
7
- task :setup do
8
- run "mkdir -p #{shared_path}/uploads"
9
- end
10
-
11
- desc "Make symlink for uploads directory"
12
- task :symlink do
13
- run "ln -nfs #{shared_path}/uploads #{release_path}/uploads"
14
- end
15
- end
16
- end
@@ -1,16 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
- # Load configuration
3
- config_path = File.expand_path('~/.capones.yml')
4
-
5
- if File.exist?(config_path)
6
- # Parse config file
7
- config = YAML.load_file(config_path)
8
-
9
- # States
10
- deploy_target_path = File.expand_path(config['deploy_target_repository']['path'])
11
-
12
- # Add stages
13
- set :stage_dir, File.join(deploy_target_path, application, 'stages')
14
- load_paths << ""
15
- end
16
- end
@@ -1,16 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
- before "deploy:setup", "kuhsaft:setup"
3
- after "deploy:update_code", "kuhsaft:symlink"
4
-
5
- namespace :kuhsaft do
6
- desc "Create uploads directory in capistrano shared path"
7
- task :setup do
8
- run "mkdir -p #{shared_path}/uploads"
9
- end
10
-
11
- desc "Make symlink for shared uploads"
12
- task :symlink do
13
- run "ln -nfs #{shared_path}/uploads #{release_path}/public/uploads"
14
- end
15
- end
16
- end
@@ -1,15 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
- after "deploy:update_code", "new_relic:symlink"
3
-
4
- namespace :new_relic do
5
- desc "Creates newrelic configuration based on example"
6
- task :prepare_config do
7
- upload "config/newrelic.yml.example", "#{shared_path}/config/newrelic.yml", :via => :scp
8
- end
9
-
10
- desc "Make symlink for shared application yaml"
11
- task :symlink do
12
- run "ln -nfs #{shared_path}/config/newrelic.yml #{release_path}/config/newrelic.yml"
13
- end
14
- end
15
- end
@@ -1,10 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
- after "deploy:update_code", "restful_authentication:symlink"
3
-
4
- namespace :restful_authentication do
5
- desc "Make symlink for shared uploads"
6
- task :symlink do
7
- run "ln -nfs #{shared_path}/config/initializers/site_keys.rb #{release_path}/config/initializers/site_keys.rb"
8
- end
9
- end
10
- end
@@ -1,16 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
- before "db:symlink", "settings_logic:symlink"
3
-
4
- namespace :settings_logic do
5
- desc "Create application yaml in capistrano shared path"
6
- task :prepare_config do
7
- run "mkdir -p #{shared_path}/config"
8
- upload "config/application.yml.example", "#{shared_path}/config/application.yml", :via => :scp
9
- end
10
-
11
- desc "Make symlink for shared application yaml"
12
- task :symlink do
13
- run "ln -nfs #{shared_path}/config/application.yml #{release_path}/config/application.yml"
14
- end
15
- end
16
- end
@@ -1,24 +0,0 @@
1
- # Thinking Sphinx for Capistrano
2
- require 'thinking_sphinx/deploy/capistrano'
3
-
4
- Capistrano::Configuration.instance.load do
5
- before "thinking_sphinx:symlink", "thinking_sphinx:setup"
6
- after "deploy:finalize_update", "thinking_sphinx:symlink"
7
- before "deploy:restart", "thinking_sphinx:rebuild"
8
-
9
- namespace :thinking_sphinx do
10
- desc "Prepare for sphinx config"
11
- task :setup, :roles => :app do
12
- run "mkdir -p #{shared_path}/config/sphinx"
13
- run "mkdir -p #{shared_path}/db/sphinx"
14
- run "mkdir -p #{shared_path}/tmp/sockets"
15
- end
16
-
17
- desc "Make symlink for sphinx configs and data"
18
- task :symlink, :roles => :app do
19
- run "ln -nfs #{shared_path}/config/sphinx #{release_path}/config/sphinx"
20
- run "ln -nfs #{shared_path}/db/sphinx #{release_path}/db/sphinx"
21
- run "ln -nfs #{shared_path}/tmp/sockets #{release_path}/tmp/sockets"
22
- end
23
- end
24
- end