captools 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ == 0.0.3 / 2007-01-29
2
+
3
+ * Dont rely on Active record to get current migration version
4
+
1
5
  == 0.0.1 / 2007-01-29
2
6
 
3
7
  * Captools is born
data/Rakefile CHANGED
@@ -5,12 +5,11 @@ require 'hoe'
5
5
  require './lib/captools.rb'
6
6
 
7
7
  Hoe.new('captools', Captools::VERSION) do |p|
8
- p.rubyforge_name = 'captools'
8
+ p.rubyforge_name = 'nycrb'
9
9
  p.summary = 'some sweet capistrano tools'
10
10
  p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
11
11
  p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
12
12
  p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
13
- #p.extra_deps
<<
['mysql']
14
13
  end
15
14
 
16
15
  # vim: syntax=Ruby
@@ -1,3 +1,3 @@
1
1
  class Captools
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -51,13 +51,15 @@ Capistrano.configuration(:must_exist).load do
51
51
 
52
52
  set :environment_database_password, proc { Capistrano::CLI.password_prompt("#{rails_env} database remote Password : ") }
53
53
  @buffer = YAML::load_file('config/database.yml')
54
-
54
+ set :db_password, proc { Capistrano::CLI.password_prompt("Remote Database Password : ") }
55
55
  #get remote version
56
- run("#{current_path}/script/runner -e production 'puts ActiveRecord::Migrator.current_version'") { |c, s, data| @remote_version = data.to_i}
56
+ run("mysql -u #{@buffer["production"]["username"]} -p #{@buffer["production"]["database"]} --batch --skip-column-names -e 'select version from schema_info;'") do |ch, stream, data|
57
+ ch.send_data "#{db_password}\n" if data =~ /^Enter password:/
58
+ @remote_version = data.to_i
59
+ end
57
60
 
58
61
  if @remote_version == local_version
59
62
  puts "Your Database Structure is in sync with the remote server..."
60
- set :db_password, proc { Capistrano::CLI.password_prompt("Remote Database Password : ") }
61
63
  tmp_file = File.new("tmp/dump.sql", "w+")
62
64
  run "mysqldump -u #{@buffer["production"]["username"]} -p #{@buffer["production"]["database"]}" do |ch, stream, out|
63
65
  ch.send_data "#{db_password}\n" if out =~ /^Enter password:/
metadata CHANGED
@@ -3,14 +3,14 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: captools
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.1
7
- date: 2007-01-29 00:00:00 -05:00
6
+ version: 0.0.3
7
+ date: 2007-01-30 00:00:00 -05:00
8
8
  summary: some sweet capistrano tools
9
9
  require_paths:
10
10
  - lib
11
11
  email: ryand-ruby@zenspider.com
12
12
  homepage: " by Jake Howerton, Evan Short"
13
- rubyforge_project: captools
13
+ rubyforge_project: nycrb
14
14
  description: "== FEATURES/PROBLEMS: * There are only two tasks * +pull_assets+ can help you download assets( like images) from a staging or production server to your local environment * +pull_database+ will grab all your production data for you and stick it in your development database ( this could possibly be dangerous if you dont think about it first) * The tasks are currently highly dependent on my environment... lets generalize them == SYNOPSIS: Capistrano task repository == REQUIREMENTS:"
15
15
  autorequire:
16
16
  default_executable: