database_fork 0.0.5 → 0.0.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d818505a7ac098516ffcfa22212eda7b29511f0b
4
- data.tar.gz: 8c9664a4c650a9e32904f3067ce8096dcc55b47f
3
+ metadata.gz: f8543171bd7da48b3d7460d386e6da0835d82f91
4
+ data.tar.gz: 8d9260622294e19703d355b4bde7ce4bad59863f
5
5
  SHA512:
6
- metadata.gz: 02f28fd37538c2771f01e545823e50469465e7d1a22ce58f989771a8ecb99ba8abafefe97287bd99b2fb06e68869154b227910ae61c6a9acb1a8da2f8c968bad
7
- data.tar.gz: d8ea9235c8a94eeff72a49de21b4e8c9494ad5c9e38a8266fbe1c47732ab7b1c21bd463174d3b7a27c5f142a84e6f12c0a8b154985c8772a35d67dfe3bd2e15a
6
+ metadata.gz: 8663a7657e361f7ee8bc08c1596bae16653ee0e2ef168069cc7ca8bedd0cca1512e729dcb25f48123dbda7b5e0476016fa1e3676ae99ed7feb2f1f60fbb2ad42
7
+ data.tar.gz: f8f244b8d7698d0636bfcc2e654a9f142a2c94148c68693ea3232648ccf92a6280ab867c940b047b2e1a07ecf9a01df1ebd8e0c82dc218d56150243e0e8354d0
data/README.md CHANGED
@@ -6,7 +6,7 @@ Create a copy of your development and test databases when you switch git branche
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- gem 'database_fork', '>= 0.0.5'
9
+ gem 'database_fork', '>= 0.0.6'
10
10
 
11
11
  And then execute:
12
12
 
@@ -43,6 +43,26 @@ Rails: add this line at the end of your application.rb:
43
43
  'DatabaseFork not available'
44
44
  end
45
45
  end
46
+
47
+ To dynamically load the database clone, add this to each environment in your Rails database.yml:
48
+
49
+ development:
50
+ database: <%= ENV['DATABASE_FORK_DEVELOPMENT'] || 'my_app_development' %>
51
+
52
+ ## Limitations
53
+
54
+ - only tested with Rails
55
+ - currently only works with Mysql
56
+
57
+ ## TODO:
58
+
59
+ - add postgresql adapter
60
+ - improve specs (as usual ;) )
61
+
62
+ ## Help is welcome
63
+
64
+ If you want to contribute an adapter, write specs or refactor the gem, please feel free to send a pull request!
65
+
46
66
 
47
67
  ## Contributing
48
68
 
@@ -4,12 +4,12 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'database_fork'
7
- spec.version = '0.0.5'
7
+ spec.version = '0.0.6'
8
8
  spec.authors = ['the-architect']
9
9
  spec.email = ['marcel.scherf@epicteams.com']
10
10
  spec.summary = %q{Fork your database}
11
11
  spec.description = %q{Fork your database}
12
- spec.homepage = 'http://github.com/'
12
+ spec.homepage = 'http://github.com/the-architect/database_fork'
13
13
  spec.license = 'MIT'
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0")
data/lib/database_fork.rb CHANGED
@@ -43,6 +43,7 @@ class DatabaseFork
43
43
  log_info 'branch qualified for database forking'
44
44
 
45
45
  config['environments'].each do |env|
46
+ # TODO: chose adapter based on connection information (Rails database.yml "adapter")
46
47
  adapter = MysqlFork.new(@root_dir, app_connection[env], env, current_branch, @logger)
47
48
 
48
49
  if adapter.exists?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_fork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - the-architect
@@ -108,7 +108,7 @@ files:
108
108
  - spec/lib/database_fork/mysql_fork_spec.rb
109
109
  - spec/lib/database_fork_spec.rb
110
110
  - spec/spec_helper.rb
111
- homepage: http://github.com/
111
+ homepage: http://github.com/the-architect/database_fork
112
112
  licenses:
113
113
  - MIT
114
114
  metadata: {}