capones_recipes 0.2.5 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +0 -2
- data/Gemfile.lock +1 -1
- data/README.rdoc +25 -8
- data/VERSION +1 -1
- data/capones_recipes.gemspec +6 -8
- data/config/deploy.rb +8 -14
- data/config/deploy/production.rb +7 -0
- data/config/deploy/staging.rb +7 -0
- data/lib/cookbook/rails.rb +3 -1
- data/lib/cookbook/rails31.rb +8 -0
- data/lib/recipes/rails/bundler.rb +5 -0
- metadata +17 -35
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
@@ -1,16 +1,33 @@
|
|
1
1
|
= capones-recipes
|
2
2
|
|
3
|
-
|
3
|
+
Capones recipe is a capistrano cook book with usefull recipes.
|
4
|
+
It handels all the dependencies for the deployment with capistrano.
|
5
|
+
So that it's only neccessary to integrate this gem in the rails app.
|
6
|
+
|
7
|
+
== Installation
|
8
|
+
|
9
|
+
* Capify your project
|
10
|
+
* In your config/deploy.rb require the needed cook book.
|
11
|
+
|
12
|
+
=== Advice
|
13
|
+
|
14
|
+
Maybe capistrano must be executed by the bundler, see example:
|
15
|
+
|
16
|
+
bundler exec cap -T # Shows the avaible cap tasks.
|
17
|
+
|
18
|
+
== Avaible Recipes
|
19
|
+
|
20
|
+
* capones_recipes
|
21
|
+
** Loads all recipes from the gem.
|
22
|
+
* cookbook/rails
|
23
|
+
** A recipe for standard rails applications.
|
24
|
+
* cookbook/rails31
|
25
|
+
** A recipe that was extended for rails 3.1 applications.
|
4
26
|
|
5
27
|
== Contributing to capones-recipes
|
6
28
|
|
7
|
-
*
|
8
|
-
*
|
9
|
-
* Fork the project
|
10
|
-
* Start a feature/bugfix branch
|
11
|
-
* Commit and push until you are happy with your contribution
|
12
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
29
|
+
* Roman Simecek roman.simecek@cyt.ch
|
30
|
+
* CyT GmbH http://www.cyt.ch
|
14
31
|
|
15
32
|
== Copyright
|
16
33
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.3
|
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.3.3"
|
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-08}
|
13
13
|
s.description = %q{just for fun}
|
14
14
|
s.email = %q{roman.simecek@cyt.ch}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -27,8 +27,11 @@ Gem::Specification.new do |s|
|
|
27
27
|
"VERSION",
|
28
28
|
"capones_recipes.gemspec",
|
29
29
|
"config/deploy.rb",
|
30
|
+
"config/deploy/production.rb",
|
31
|
+
"config/deploy/staging.rb",
|
30
32
|
"lib/capones_recipes.rb",
|
31
33
|
"lib/cookbook/rails.rb",
|
34
|
+
"lib/cookbook/rails31.rb",
|
32
35
|
"lib/recipes/database.rb",
|
33
36
|
"lib/recipes/database/mysql.rb",
|
34
37
|
"lib/recipes/database/sqlite.rb",
|
@@ -39,6 +42,7 @@ Gem::Specification.new do |s|
|
|
39
42
|
"lib/recipes/new_relic.rb",
|
40
43
|
"lib/recipes/new_relic/new_relic.rb",
|
41
44
|
"lib/recipes/rails.rb",
|
45
|
+
"lib/recipes/rails/bundler.rb",
|
42
46
|
"lib/recipes/rails/database_yml.rb",
|
43
47
|
"lib/recipes/rails/mod_rails.rb",
|
44
48
|
"lib/recipes/rails31.rb",
|
@@ -58,8 +62,6 @@ Gem::Specification.new do |s|
|
|
58
62
|
s.specification_version = 3
|
59
63
|
|
60
64
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
61
|
-
s.add_runtime_dependency(%q<capistrano>, [">= 0"])
|
62
|
-
s.add_runtime_dependency(%q<cap-recipes>, [">= 0"])
|
63
65
|
s.add_runtime_dependency(%q<capistrano>, [">= 0"])
|
64
66
|
s.add_runtime_dependency(%q<capistrano_colors>, [">= 0"])
|
65
67
|
s.add_runtime_dependency(%q<cap-recipes>, [">= 0"])
|
@@ -68,8 +70,6 @@ Gem::Specification.new do |s|
|
|
68
70
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.1"])
|
69
71
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
70
72
|
else
|
71
|
-
s.add_dependency(%q<capistrano>, [">= 0"])
|
72
|
-
s.add_dependency(%q<cap-recipes>, [">= 0"])
|
73
73
|
s.add_dependency(%q<capistrano>, [">= 0"])
|
74
74
|
s.add_dependency(%q<capistrano_colors>, [">= 0"])
|
75
75
|
s.add_dependency(%q<cap-recipes>, [">= 0"])
|
@@ -79,8 +79,6 @@ Gem::Specification.new do |s|
|
|
79
79
|
s.add_dependency(%q<rcov>, [">= 0"])
|
80
80
|
end
|
81
81
|
else
|
82
|
-
s.add_dependency(%q<capistrano>, [">= 0"])
|
83
|
-
s.add_dependency(%q<cap-recipes>, [">= 0"])
|
84
82
|
s.add_dependency(%q<capistrano>, [">= 0"])
|
85
83
|
s.add_dependency(%q<capistrano_colors>, [">= 0"])
|
86
84
|
s.add_dependency(%q<cap-recipes>, [">= 0"])
|
data/config/deploy.rb
CHANGED
@@ -1,22 +1,16 @@
|
|
1
1
|
set :application, "set your application name here"
|
2
2
|
set :repository, "set your repository location here"
|
3
|
-
|
4
|
-
set :scm, :subversion
|
5
|
-
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
|
3
|
+
set :web_root, "/srv/cyt.ch/"
|
6
4
|
|
7
5
|
role :web, "your web-server here" # Your HTTP server, Apache/etc
|
8
6
|
role :app, "your app-server here" # This may be the same as your `Web` server
|
9
7
|
role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run
|
10
8
|
role :db, "your slave db-server here"
|
11
9
|
|
12
|
-
#
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
# task :restart, :roles => :app, :except => { :no_release => true } do
|
20
|
-
# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
|
21
|
-
# end
|
22
|
-
# end
|
10
|
+
# Configuration
|
11
|
+
set :scm, :git
|
12
|
+
ssh_options[:forward_agent] = true
|
13
|
+
set :use_sudo, false
|
14
|
+
set :deploy_via, :remote_cache
|
15
|
+
set :git_enable_submodules, 1
|
16
|
+
set :copy_exclude, [".git", "spec"]
|
@@ -0,0 +1,7 @@
|
|
1
|
+
set :rails_env, 'production'
|
2
|
+
set :branch, "stable"
|
3
|
+
|
4
|
+
set :deploy_to, "#{web_root}#{application}"
|
5
|
+
role :web, "web01.#{application}" # Your HTTP server, Apache/etc
|
6
|
+
role :app, "web01.#{application}" # This may be the same as your `Web` server
|
7
|
+
role :db, "web01.#{application}", :primary => true # This is where Rails migrations will run
|
@@ -0,0 +1,7 @@
|
|
1
|
+
set :rails_env, 'staging'
|
2
|
+
set :branch, "master"
|
3
|
+
|
4
|
+
set :deploy_to, "#{web_root}#{application}"
|
5
|
+
role :web, "test.#{application}" # Your HTTP server, Apache/etc
|
6
|
+
role :app, "test.#{application}" # This may be the same as your `Web` server
|
7
|
+
role :db, "test.#{application}", :primary => true # This is where Rails migrations will run
|
data/lib/cookbook/rails.rb
CHANGED
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.3.3
|
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-08 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: *id001
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: capistrano_colors
|
29
29
|
requirement: &id002 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
@@ -36,7 +36,7 @@ dependencies:
|
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
39
|
+
name: cap-recipes
|
40
40
|
requirement: &id003 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
@@ -46,31 +46,9 @@ dependencies:
|
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: *id003
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: capistrano_colors
|
51
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
|
-
requirements:
|
54
|
-
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: "0"
|
57
|
-
type: :runtime
|
58
|
-
prerelease: false
|
59
|
-
version_requirements: *id004
|
60
|
-
- !ruby/object:Gem::Dependency
|
61
|
-
name: cap-recipes
|
62
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
63
|
-
none: false
|
64
|
-
requirements:
|
65
|
-
- - ">="
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: "0"
|
68
|
-
type: :runtime
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: *id005
|
71
49
|
- !ruby/object:Gem::Dependency
|
72
50
|
name: shoulda
|
73
|
-
requirement: &
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
74
52
|
none: false
|
75
53
|
requirements:
|
76
54
|
- - ">="
|
@@ -78,10 +56,10 @@ dependencies:
|
|
78
56
|
version: "0"
|
79
57
|
type: :development
|
80
58
|
prerelease: false
|
81
|
-
version_requirements: *
|
59
|
+
version_requirements: *id004
|
82
60
|
- !ruby/object:Gem::Dependency
|
83
61
|
name: bundler
|
84
|
-
requirement: &
|
62
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
85
63
|
none: false
|
86
64
|
requirements:
|
87
65
|
- - ~>
|
@@ -89,10 +67,10 @@ dependencies:
|
|
89
67
|
version: 1.0.0
|
90
68
|
type: :development
|
91
69
|
prerelease: false
|
92
|
-
version_requirements: *
|
70
|
+
version_requirements: *id005
|
93
71
|
- !ruby/object:Gem::Dependency
|
94
72
|
name: jeweler
|
95
|
-
requirement: &
|
73
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
96
74
|
none: false
|
97
75
|
requirements:
|
98
76
|
- - ~>
|
@@ -100,10 +78,10 @@ dependencies:
|
|
100
78
|
version: 1.6.1
|
101
79
|
type: :development
|
102
80
|
prerelease: false
|
103
|
-
version_requirements: *
|
81
|
+
version_requirements: *id006
|
104
82
|
- !ruby/object:Gem::Dependency
|
105
83
|
name: rcov
|
106
|
-
requirement: &
|
84
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
107
85
|
none: false
|
108
86
|
requirements:
|
109
87
|
- - ">="
|
@@ -111,7 +89,7 @@ dependencies:
|
|
111
89
|
version: "0"
|
112
90
|
type: :development
|
113
91
|
prerelease: false
|
114
|
-
version_requirements: *
|
92
|
+
version_requirements: *id007
|
115
93
|
description: just for fun
|
116
94
|
email: roman.simecek@cyt.ch
|
117
95
|
executables: []
|
@@ -132,8 +110,11 @@ files:
|
|
132
110
|
- VERSION
|
133
111
|
- capones_recipes.gemspec
|
134
112
|
- config/deploy.rb
|
113
|
+
- config/deploy/production.rb
|
114
|
+
- config/deploy/staging.rb
|
135
115
|
- lib/capones_recipes.rb
|
136
116
|
- lib/cookbook/rails.rb
|
117
|
+
- lib/cookbook/rails31.rb
|
137
118
|
- lib/recipes/database.rb
|
138
119
|
- lib/recipes/database/mysql.rb
|
139
120
|
- lib/recipes/database/sqlite.rb
|
@@ -144,6 +125,7 @@ files:
|
|
144
125
|
- lib/recipes/new_relic.rb
|
145
126
|
- lib/recipes/new_relic/new_relic.rb
|
146
127
|
- lib/recipes/rails.rb
|
128
|
+
- lib/recipes/rails/bundler.rb
|
147
129
|
- lib/recipes/rails/database_yml.rb
|
148
130
|
- lib/recipes/rails/mod_rails.rb
|
149
131
|
- lib/recipes/rails31.rb
|
@@ -166,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
148
|
requirements:
|
167
149
|
- - ">="
|
168
150
|
- !ruby/object:Gem::Version
|
169
|
-
hash: -
|
151
|
+
hash: -772139204711340887
|
170
152
|
segments:
|
171
153
|
- 0
|
172
154
|
version: "0"
|