factorylabs-fdlcap 0.3.18 → 0.3.19
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/fdlcap.gemspec +3 -2
- data/lib/fdlcap/recipes/check_revision.rb +22 -0
- data/lib/fdlcap/recipes/slice.rb +0 -9
- data/lib/fdlcap/recipes/ssh.rb +2 -1
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.19
|
data/fdlcap.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{fdlcap}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.19"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Factory Design Labs"]
|
12
|
-
s.date = %q{2009-09-
|
12
|
+
s.date = %q{2009-09-09}
|
13
13
|
s.default_executable = %q{fdlcap}
|
14
14
|
s.email = %q{interactive@factorylabs.com}
|
15
15
|
s.executables = ["fdlcap"]
|
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
"lib/fdlcap/extensions/recipe_definition.rb",
|
35
35
|
"lib/fdlcap/recipes.rb",
|
36
36
|
"lib/fdlcap/recipes/autotagger.rb",
|
37
|
+
"lib/fdlcap/recipes/check_revision.rb",
|
37
38
|
"lib/fdlcap/recipes/craken.rb",
|
38
39
|
"lib/fdlcap/recipes/database.rb",
|
39
40
|
"lib/fdlcap/recipes/delayed_job.rb",
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
+
|
3
|
+
define_recipe :check_revision do
|
4
|
+
before "deploy:update_code", "deploy:check_revision"
|
5
|
+
|
6
|
+
namespace :deploy do
|
7
|
+
desc "Make sure there is something to deploy"
|
8
|
+
task :check_revision, :roles => [:web] do
|
9
|
+
unless `git rev-parse HEAD` == `git rev-parse origin/master`
|
10
|
+
puts ""
|
11
|
+
puts " \033[1;33m**************************************************\033[0m"
|
12
|
+
puts " \033[1;33m* WARNING: HEAD is not the same as origin/master *\033[0m"
|
13
|
+
puts " \033[1;33m**************************************************\033[0m"
|
14
|
+
puts ""
|
15
|
+
|
16
|
+
exit
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
data/lib/fdlcap/recipes/slice.rb
CHANGED
@@ -1,15 +1,6 @@
|
|
1
1
|
Capistrano::Configuration.instance(:must_exist).load do
|
2
2
|
|
3
3
|
namespace :slice do
|
4
|
-
|
5
|
-
desc "Tail the Rails import log for this environment"
|
6
|
-
task :tail_import_logs, :roles => :utility do
|
7
|
-
run "tail -f #{shared_path}/log/import-#{rails_env}.log" do |channel, stream, data|
|
8
|
-
puts # for an extra line break before the host name
|
9
|
-
puts "#{channel[:server]} -> #{data}"
|
10
|
-
break if stream == :err
|
11
|
-
end
|
12
|
-
end
|
13
4
|
|
14
5
|
desc "Tail the Rails log for this environment"
|
15
6
|
task :tail_logs, :roles => :app do
|
data/lib/fdlcap/recipes/ssh.rb
CHANGED
@@ -3,9 +3,10 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
3
3
|
role = (ENV['ROLE'] || :app).to_sym
|
4
4
|
servers = find_servers :roles => role
|
5
5
|
server = servers.first
|
6
|
+
ssh_cmd = (File.exists?('/usr/bin/ssh-forever') ? '/usr/bin/ssh-forever' : '/usr/bin/ssh')
|
6
7
|
if server
|
7
8
|
`echo '#{password}' | /usr/bin/pbcopy`
|
8
|
-
exec "
|
9
|
+
exec "#{ssh_cmd} #{user}@#{server.host} -p #{server.port || 22} "
|
9
10
|
end
|
10
11
|
end
|
11
12
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factorylabs-fdlcap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Factory Design Labs
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-09 00:00:00 -07:00
|
13
13
|
default_executable: fdlcap
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- lib/fdlcap/extensions/recipe_definition.rb
|
79
79
|
- lib/fdlcap/recipes.rb
|
80
80
|
- lib/fdlcap/recipes/autotagger.rb
|
81
|
+
- lib/fdlcap/recipes/check_revision.rb
|
81
82
|
- lib/fdlcap/recipes/craken.rb
|
82
83
|
- lib/fdlcap/recipes/database.rb
|
83
84
|
- lib/fdlcap/recipes/delayed_job.rb
|