pave 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7b913d65cca08e6ccdef3280bea1a2189e7be14
4
- data.tar.gz: 6066f4e6a7b53448d9c3592659aecf2ce925e354
3
+ metadata.gz: 0cc3ce562a85f80a29df6d8359eca010a44ace1a
4
+ data.tar.gz: b9f6ac25a2b4c927616b8acb3ebfc62b8a63e3be
5
5
  SHA512:
6
- metadata.gz: d25936c38deeb4e435975b4e158d5408aeafdc7cb8b8c0e83804d240854837e48639636ea788cae6fb20c1d69ef46b9e2da5d7caf9f71730c0181b706ae2211a
7
- data.tar.gz: dbfae2536ed7f62cecf071407760d5054466cf8fa2a5700fe39d870a3af0e36d394817466ebc2556d98aa3631f74d424bff61030ce6576209f01019b8c9eddfe
6
+ metadata.gz: 5488fc7ddf18e1033e34e4eaa4d1f346bc4d8edbba15945f3ac6c7cb0232738b1987abc029249e9ac16ab18f7570753c08df41b007900b271afcbaa8f9315cd1
7
+ data.tar.gz: 795986496c1b2f1e2a95549379f98b1dec48bfb5acfc95802832f7c1795da6fd0b86c1f83d6f6ef791f38be0cf084c5cd06d9c975cb4627260bd76aa5d133a18
data/bin/pave CHANGED
@@ -122,6 +122,15 @@ command :"db:create" do |c|
122
122
  end
123
123
  end
124
124
 
125
+ command :"db:drop" do |c|
126
+ c.syntax = "pave db:drop DATABASE"
127
+ c.description = "Destroy the Concrete5 project's database."
128
+ c.action do |args|
129
+ name = args.first || "#{File.basename(Dir.pwd)}"
130
+ Pave::Database.new(name).drop
131
+ end
132
+ end
133
+
125
134
  command :"db:dump" do |c|
126
135
  c.syntax = "pave db:dump DATABASE"
127
136
  c.description = "Create SQL dump of the project's database."
@@ -19,6 +19,11 @@ module Pave
19
19
  sh "mysql -uroot -e 'CREATE DATABASE #{name}'"
20
20
  end
21
21
 
22
+ def drop
23
+ destroy = agree("Are you sure you want to drop #{name}? All data will be lost.")
24
+ sh "mysql -uroot -e 'DROP DATABASE #{name}'" if destroy
25
+ end
26
+
22
27
  def remote_db
23
28
  require 'json'
24
29
  live_domain = shell("php -r \"error_reporting(0);require('./config/site.php');echo LIVE_DOMAIN;\"").output
@@ -68,6 +73,7 @@ module Pave
68
73
  def execute_remote(remote="live")
69
74
  server = Pave::Remote.server(remote)
70
75
  directory = Pave::Remote.directory(remote)
76
+ db = remote_db
71
77
  say "Remotely executing #{dump_file} on live #{db['name']}"
72
78
  sh "ssh #{server} \"cd #{directory}/db; gzip -dc #{dump_file} | mysql -u#{db['user']} -p#{db['pass']} #{db['name']}\""
73
79
  end
@@ -1,3 +1,3 @@
1
1
  module Pave
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pave
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamon Holmgren
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-18 00:00:00.000000000 Z
12
+ date: 2013-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler