capones_recipes 0.8.0 → 0.9.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.
- data/Gemfile +1 -1
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/capones_recipes.gemspec +7 -5
- data/lib/recipes/database/sync.rb +4 -5
- data/lib/recipes/kuhsaft/setup.rb +16 -0
- data/lib/recipes/kuhsaft.rb +1 -0
- metadata +6 -4
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.0
|
data/capones_recipes.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{capones_recipes}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.9.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Roman Simecek"]
|
12
|
-
s.date = %q{2011-08-
|
12
|
+
s.date = %q{2011-08-17}
|
13
13
|
s.description = %q{just for fun}
|
14
14
|
s.email = %q{roman.simecek@cyt.ch}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -40,6 +40,8 @@ Gem::Specification.new do |s|
|
|
40
40
|
"lib/recipes/katalog.rb",
|
41
41
|
"lib/recipes/katalog/import.rb",
|
42
42
|
"lib/recipes/katalog/katalog.rb",
|
43
|
+
"lib/recipes/kuhsaft.rb",
|
44
|
+
"lib/recipes/kuhsaft/setup.rb",
|
43
45
|
"lib/recipes/new_relic.rb",
|
44
46
|
"lib/recipes/new_relic/new_relic.rb",
|
45
47
|
"lib/recipes/rails.rb",
|
@@ -68,7 +70,7 @@ Gem::Specification.new do |s|
|
|
68
70
|
s.add_runtime_dependency(%q<cap-recipes>, [">= 0"])
|
69
71
|
s.add_runtime_dependency(%q<capistrano-ext>, [">= 0"])
|
70
72
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
71
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.0
|
73
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
72
74
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.1"])
|
73
75
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
74
76
|
else
|
@@ -77,7 +79,7 @@ Gem::Specification.new do |s|
|
|
77
79
|
s.add_dependency(%q<cap-recipes>, [">= 0"])
|
78
80
|
s.add_dependency(%q<capistrano-ext>, [">= 0"])
|
79
81
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
80
|
-
s.add_dependency(%q<bundler>, ["~> 1.0
|
82
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
81
83
|
s.add_dependency(%q<jeweler>, ["~> 1.6.1"])
|
82
84
|
s.add_dependency(%q<rcov>, [">= 0"])
|
83
85
|
end
|
@@ -87,7 +89,7 @@ Gem::Specification.new do |s|
|
|
87
89
|
s.add_dependency(%q<cap-recipes>, [">= 0"])
|
88
90
|
s.add_dependency(%q<capistrano-ext>, [">= 0"])
|
89
91
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
90
|
-
s.add_dependency(%q<bundler>, ["~> 1.0
|
92
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
91
93
|
s.add_dependency(%q<jeweler>, ["~> 1.6.1"])
|
92
94
|
s.add_dependency(%q<rcov>, [">= 0"])
|
93
95
|
end
|
@@ -158,7 +158,7 @@ Capistrano::Configuration.instance.load do
|
|
158
158
|
# Use production on non-multistage
|
159
159
|
set :stage, 'production' unless exists?(:stage)
|
160
160
|
|
161
|
-
filename = "database.#{stage}.#{Time.now.strftime '%Y-%m-%d_%H:%M:%S'}.sql.bz2"
|
161
|
+
filename = "database.all.#{stage}.#{Time.now.strftime '%Y-%m-%d_%H:%M:%S'}.sql.bz2"
|
162
162
|
|
163
163
|
on_rollback do
|
164
164
|
delete "#{shared_path}/sync/#{filename}"
|
@@ -184,7 +184,7 @@ Capistrano::Configuration.instance.load do
|
|
184
184
|
username, password, database, host = remote_database_config(stage)
|
185
185
|
host_option = host ? "--host='#{host}'" : ""
|
186
186
|
run "bzip2 -d -c #{shared_path}/sync/#{filename} | mysql -u #{username} --password='#{password}' #{host_option} #{database}; rm -f #{shared_path}/sync/#{filename}"
|
187
|
-
purge_old_backups "database"
|
187
|
+
purge_old_backups "database.all"
|
188
188
|
|
189
189
|
logger.important "sync database from local to the stage '#{stage}' finished"
|
190
190
|
end
|
@@ -222,8 +222,7 @@ Capistrano::Configuration.instance.load do
|
|
222
222
|
|
223
223
|
desc <<-DESC
|
224
224
|
Syncs the database and declared directories from the local development environment
|
225
|
-
to the selected multi_stage environment. This task simply calls both the 'sync:up:kuhsaft:db'
|
226
|
-
'sync:up:kuhsaft:fs' tasks.
|
225
|
+
to the selected multi_stage environment. This task simply calls both the 'sync:up:kuhsaft:db' task.
|
227
226
|
DESC
|
228
227
|
task :default do
|
229
228
|
db
|
@@ -265,7 +264,7 @@ Capistrano::Configuration.instance.load do
|
|
265
264
|
username, password, database, host = remote_database_config(stage)
|
266
265
|
host_option = host ? "--host='#{host}'" : ""
|
267
266
|
run "bzip2 -d -c #{shared_path}/sync/#{filename} | mysql -u #{username} --password='#{password}' #{host_option} #{database}; rm -f #{shared_path}/sync/#{filename}"
|
268
|
-
purge_old_backups "database"
|
267
|
+
purge_old_backups "database.kuhsaft"
|
269
268
|
|
270
269
|
logger.important "sync database from local to the stage '#{stage}' finished"
|
271
270
|
end
|
@@ -0,0 +1,16 @@
|
|
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}/uploads"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Dir.glob(File.join(File.dirname(__FILE__), '/kuhsaft/*.rb')).sort.each { |f| load f }
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: capones_recipes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.9.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Roman Simecek
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-08-
|
13
|
+
date: 2011-08-17 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -75,7 +75,7 @@ dependencies:
|
|
75
75
|
requirements:
|
76
76
|
- - ~>
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version: 1.0
|
78
|
+
version: "1.0"
|
79
79
|
type: :development
|
80
80
|
prerelease: false
|
81
81
|
version_requirements: *id006
|
@@ -134,6 +134,8 @@ files:
|
|
134
134
|
- lib/recipes/katalog.rb
|
135
135
|
- lib/recipes/katalog/import.rb
|
136
136
|
- lib/recipes/katalog/katalog.rb
|
137
|
+
- lib/recipes/kuhsaft.rb
|
138
|
+
- lib/recipes/kuhsaft/setup.rb
|
137
139
|
- lib/recipes/new_relic.rb
|
138
140
|
- lib/recipes/new_relic/new_relic.rb
|
139
141
|
- lib/recipes/rails.rb
|
@@ -160,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
162
|
requirements:
|
161
163
|
- - ">="
|
162
164
|
- !ruby/object:Gem::Version
|
163
|
-
hash:
|
165
|
+
hash: 3653957723534139768
|
164
166
|
segments:
|
165
167
|
- 0
|
166
168
|
version: "0"
|