thunder_punch 0.1.0 → 0.1.1
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/VERSION +1 -1
- data/lib/thunder_punch/recipes/apache.rb +10 -0
- data/lib/thunder_punch/recipes/deployment/git_based.rb +27 -0
- data/lib/thunder_punch/recipes/deployment/migration.rb +1 -21
- data/lib/thunder_punch/recipes/deployment.rb +8 -3
- data/lib/thunder_punch/recipes/honeybadger.rb +9 -0
- data/lib/thunder_punch/recipes/thinking_sphinx.rb +0 -8
- data/thunder_punch.gemspec +1 -1
- metadata +49 -61
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -0,0 +1,27 @@
|
|
1
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
+
ssh_options[:paranoid] = false
|
3
|
+
default_run_options[:pty] = true
|
4
|
+
|
5
|
+
# In a git based deployment scheme set everything to be current path
|
6
|
+
set(:latest_release) { fetch(:current_path) }
|
7
|
+
set(:release_path) { fetch(:current_path) }
|
8
|
+
set(:current_release) { fetch(:current_path) }
|
9
|
+
|
10
|
+
set(:current_revision) { capture("cd #{current_path}; git rev-parse --short HEAD").strip }
|
11
|
+
set(:latest_revision) { capture("cd #{current_path}; git rev-parse --short HEAD").strip }
|
12
|
+
set(:previous_revision) { capture("cd #{current_path}; git rev-parse --short HEAD@{1}").strip }
|
13
|
+
|
14
|
+
set :migrate_target, :current
|
15
|
+
|
16
|
+
# defaults but you can override if needed
|
17
|
+
_cset :use_sudo, true
|
18
|
+
|
19
|
+
# This will execute the Git revision parsing on the *remote* server rather than locally
|
20
|
+
_cset :real_revision, lambda { source.query_revision(revision) { |cmd| capture(cmd) } }
|
21
|
+
_cset :git_enable_submodules, false
|
22
|
+
|
23
|
+
|
24
|
+
# don't need these with asset pipeline, etc
|
25
|
+
_cset :finalize_deploy, false
|
26
|
+
_cset :normalize_asset_timestamps, false
|
27
|
+
end
|
@@ -2,34 +2,14 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
2
2
|
_cset :db_migration_roles, [:db]
|
3
3
|
|
4
4
|
namespace :deploy do
|
5
|
-
desc <<-DESC
|
6
|
-
Run the migrate rake task. By default, it runs this in most recently
|
7
|
-
deployed version of the app. However, you can specify a different release
|
8
|
-
via the migrate_target variable, which must be one of :latest (for the
|
9
|
-
default behavior), or :current (for the release indicated by the
|
10
|
-
`current' symlink). Strings will work for those values instead of symbols,
|
11
|
-
too. You can also specify additional environment variables to pass to rake
|
12
|
-
via the migrate_env variable. Finally, you can specify the full path to the
|
13
|
-
rake executable by setting the rake variable. The defaults are:
|
14
|
-
|
15
|
-
set :rake, "bundle exec rake"
|
16
|
-
set :rails_env, "production"
|
17
|
-
set :migrate_env, ""
|
18
|
-
set :migrate_target, :latest
|
19
|
-
DESC
|
20
5
|
task :migrate, :roles => db_migration_roles, :only => { :primary => true } do
|
21
|
-
rake = fetch(:rake, "bundle exec rake")
|
22
|
-
rails_env = fetch(:rails_env, "production")
|
23
|
-
migrate_env = fetch(:migrate_env, "")
|
24
|
-
migrate_target = fetch(:migrate_target, :latest)
|
25
|
-
|
26
6
|
directory = case migrate_target.to_sym
|
27
7
|
when :current then current_path
|
28
8
|
when :latest then current_release
|
29
9
|
else raise ArgumentError, "unknown migration target #{migrate_target.inspect}"
|
30
10
|
end
|
31
11
|
|
32
|
-
run "cd #{directory}; #{rake} RAILS_ENV=#{rails_env}
|
12
|
+
run "cd #{directory}; #{rake} RAILS_ENV=#{rails_env} db:migrate"
|
33
13
|
end
|
34
14
|
end #namespace
|
35
15
|
end
|
@@ -1,3 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
# load in a particular order here
|
2
|
+
deployment_recipes = %w(git_based deployment symlinks migration)
|
3
|
+
|
4
|
+
deployment_recipes.each do |recipe|
|
5
|
+
Capistrano::Configuration.instance.load {
|
6
|
+
load("#{File.dirname(__FILE__)}/deployment/#{recipe}.rb")
|
7
|
+
}
|
8
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
+
_cset :honeybadger_roles, [:app]
|
3
|
+
|
4
|
+
namespace :honeybadger do
|
5
|
+
task :notify_deploy, :roles => honeybadger_roles do
|
6
|
+
run "cd #{current_path} && #{rake} honeybadger:deploy RAILS_ENV=#{rails_env} TO=#{branch} USER=#{honeybadger_user} REVISION=#{real_revision} REPO=#{repository}"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
@@ -47,13 +47,5 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
47
47
|
task :create_shared_sphinx_folder, :roles => thinking_sphinx_roles do
|
48
48
|
run "mkdir -p #{shared_path}/db/sphinx/production"
|
49
49
|
end
|
50
|
-
|
51
|
-
def rake(*tasks)
|
52
|
-
rails_env = fetch(:rails_env, "production")
|
53
|
-
rake = fetch(:rake, "bundle exec rake")
|
54
|
-
tasks.each do |t|
|
55
|
-
run "if [ -d #{release_path} ]; then cd #{release_path}; else cd #{current_path}; fi; #{rake} RAILS_ENV=#{rails_env} #{t}"
|
56
|
-
end
|
57
|
-
end
|
58
50
|
end
|
59
51
|
end
|
data/thunder_punch.gemspec
CHANGED
metadata
CHANGED
@@ -1,61 +1,55 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: thunder_punch
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 0
|
10
|
-
version: 0.1.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Bob Burbach
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: thoughtbot-shoulda
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
32
22
|
type: :development
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: capistrano
|
36
23
|
prerelease: false
|
37
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: capistrano
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
38
33
|
none: false
|
39
|
-
requirements:
|
40
|
-
- -
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
hash: 17
|
43
|
-
segments:
|
44
|
-
- 2
|
45
|
-
- 5
|
46
|
-
- 5
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
47
37
|
version: 2.5.5
|
48
38
|
type: :runtime
|
49
|
-
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.5.5
|
50
46
|
description: Collection of capistano recipes for deployment and server tasks
|
51
47
|
email: info@criticaljuncture.org
|
52
48
|
executables: []
|
53
|
-
|
54
49
|
extensions: []
|
55
|
-
|
56
|
-
extra_rdoc_files:
|
50
|
+
extra_rdoc_files:
|
57
51
|
- README.mdown
|
58
|
-
files:
|
52
|
+
files:
|
59
53
|
- .document
|
60
54
|
- .gitignore
|
61
55
|
- CHANGELOG.mdown
|
@@ -69,12 +63,15 @@ files:
|
|
69
63
|
- files/app/maintenance.html.erb
|
70
64
|
- lib/thunder_punch.rb
|
71
65
|
- lib/thunder_punch/recipes.rb
|
66
|
+
- lib/thunder_punch/recipes/apache.rb
|
72
67
|
- lib/thunder_punch/recipes/bundler.rb
|
73
68
|
- lib/thunder_punch/recipes/database.rb
|
74
69
|
- lib/thunder_punch/recipes/deployment.rb
|
75
70
|
- lib/thunder_punch/recipes/deployment/deployment.rb
|
71
|
+
- lib/thunder_punch/recipes/deployment/git_based.rb
|
76
72
|
- lib/thunder_punch/recipes/deployment/migration.rb
|
77
73
|
- lib/thunder_punch/recipes/deployment/symlinks.rb
|
74
|
+
- lib/thunder_punch/recipes/honeybadger.rb
|
78
75
|
- lib/thunder_punch/recipes/jekyll/jekyll.rb
|
79
76
|
- lib/thunder_punch/recipes/passenger.rb
|
80
77
|
- lib/thunder_punch/recipes/sass.rb
|
@@ -89,37 +86,28 @@ files:
|
|
89
86
|
- thunder_punch.gemspec
|
90
87
|
homepage: http://github.com/critical/thunder_punch
|
91
88
|
licenses: []
|
92
|
-
|
93
89
|
post_install_message:
|
94
90
|
rdoc_options: []
|
95
|
-
|
96
|
-
require_paths:
|
91
|
+
require_paths:
|
97
92
|
- lib
|
98
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
99
94
|
none: false
|
100
|
-
requirements:
|
101
|
-
- -
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
|
104
|
-
|
105
|
-
- 0
|
106
|
-
version: "0"
|
107
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
100
|
none: false
|
109
|
-
requirements:
|
110
|
-
- -
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
|
113
|
-
segments:
|
114
|
-
- 0
|
115
|
-
version: "0"
|
101
|
+
requirements:
|
102
|
+
- - ! '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
116
105
|
requirements: []
|
117
|
-
|
118
106
|
rubyforge_project:
|
119
|
-
rubygems_version: 1.8.
|
107
|
+
rubygems_version: 1.8.25
|
120
108
|
signing_key:
|
121
109
|
specification_version: 3
|
122
110
|
summary: Collection of capistano recipes for deployment and server tasks
|
123
|
-
test_files:
|
111
|
+
test_files:
|
124
112
|
- test/helper.rb
|
125
113
|
- test/test_thunder_punch.rb
|