eedb 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.markdown +49 -1
  2. data/VERSION +1 -1
  3. data/bin/eedb +5 -0
  4. data/eedb.gemspec +1 -1
  5. metadata +2 -2
data/README.markdown CHANGED
@@ -1 +1,49 @@
1
- ...
1
+ What is this for?
2
+ =================
3
+
4
+ Here's the problem:
5
+
6
+ You want to create a new weblog locally (maybe using MAMP or something), create the templates, and then push all those changes up to the server. Well, you can't do that easily. There are tons of paths and such that are different between your computer and the server.
7
+
8
+ This command line program attempts to solve this.
9
+
10
+ How to use this thing?
11
+ ======================
12
+
13
+ cd to your EE project folder in the Terminal and type: eedb
14
+
15
+ If you don't already have a eedb.yml file, it will create one for you. That file needs to have all your database settings correct and you can specify any number of things to find and replace in the database during the transfer (like urls or folder paths).
16
+
17
+ There are four things eedb can do:
18
+
19
+ * export - Dump the local database on your computer and optionally push that to the remote server
20
+ * import - Dump the remote database from the server and optionally pull that into your local database
21
+ * rollback (local or remote) - use the newest .backup file for that database to restore
22
+ * init - create the yml file for you
23
+
24
+ How should I get started?
25
+ =========================
26
+
27
+ A good thing to try is to pull your server database down to your computer. To do this, you simply do:
28
+
29
+ eedb import
30
+
31
+ As long as your eedb.yml file has the correct information, that will dump a copy of your server's database, ask if you want to import it (you can answer Y), ask if you want to backup your local database (probably should answer Y as well), then it will import it (since you typed Y the first time).
32
+
33
+ Everything eedb does is saved into the tmp folder. You can look there for sql dumps, backups, and even .cleaned files which are the results of the find and replaces.
34
+
35
+ What does this not do?
36
+ ======================
37
+
38
+ Syncing.
39
+
40
+ It will overwrite one database with the contents of another. But it will not merge the differences or anything like that.
41
+
42
+ So only use this if you are sure there have been no changes on the side you are overwriting (or that you don't care about those changes).
43
+
44
+ Anything else?
45
+ ==============
46
+
47
+ This program expects `mysql` and `mysqldump` to be in your path. So if your using MAMP, take note of that.
48
+
49
+ Also, I only tested this on my mac laptop running Snow Leopard. So be sure you have a backup of any database that this thing touches. You _should_ do that all the time anyway.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/bin/eedb CHANGED
@@ -1,6 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "eedb"
4
+ require "fileutils"
5
+
6
+ if !File.exists?("tmp")
7
+ FileUtils.mkdir_p("tmp")
8
+ end
4
9
 
5
10
  existing_yaml_file = File.exists?("eedb.yml")
6
11
 
data/eedb.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{eedb}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nathan Herald"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nathan Herald