dbmanager 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.0.6
2
+
3
+ * handle mysql2 adapter
4
+
1
5
  ## v0.0.5
2
6
 
3
7
  * remove exception when dbmanager.yml is empty
data/lib/dbmanager.rb CHANGED
@@ -37,6 +37,6 @@ require 'active_support/ordered_hash'
37
37
  require 'active_support/core_ext/enumerable'
38
38
  require 'active_support/core_ext/object/blank'
39
39
 
40
- %w[yml_parser adapters/mysql runner importer dumper].each do |string|
40
+ %w[yml_parser adapters/mysql adapters/mysql2 runner importer dumper].each do |string|
41
41
  require File.expand_path "../dbmanager/#{string}", __FILE__
42
42
  end
@@ -0,0 +1,9 @@
1
+ # just the same as the mysql adapter, but ready for modifications
2
+
3
+ module Dbmanager
4
+ module Adapters
5
+ module Mysql2
6
+ include Mysql
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Dbmanager
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -40,7 +40,6 @@ shop:
40
40
  database: demo_shop
41
41
  username: demo_username
42
42
  password: asdasd
43
- adapter: mysql
44
43
  port: 3306
45
44
  host: 123.123.123.123
46
45
  encoding: utf8
@@ -46,6 +46,14 @@ module Dbmanager
46
46
  subject.set_adapter.should == Adapters::SomeAdapter
47
47
  end
48
48
  end
49
+
50
+ context 'when the adapter is mysql2' do
51
+ it 'returns the correct adapter class' do
52
+ envs = {:development => mock(:adapter => 'mysql2')}
53
+ subject.instance_variable_set '@environments', envs
54
+ subject.set_adapter.should == Adapters::Mysql2
55
+ end
56
+ end
49
57
  end
50
58
 
51
59
  describe '#set_source' do
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbmanager
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 19
4
5
  prerelease:
5
- version: 0.0.5
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 6
10
+ version: 0.0.6
6
11
  platform: ruby
7
12
  authors:
8
13
  - andrea longhi
@@ -10,7 +15,7 @@ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2012-04-07 00:00:00 Z
18
+ date: 2012-05-10 00:00:00 Z
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: activesupport
@@ -20,6 +25,9 @@ dependencies:
20
25
  requirements:
21
26
  - - ">="
22
27
  - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
23
31
  version: "0"
24
32
  type: :runtime
25
33
  version_requirements: *id001
@@ -31,6 +39,9 @@ dependencies:
31
39
  requirements:
32
40
  - - ">="
33
41
  - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
34
45
  version: "0"
35
46
  type: :development
36
47
  version_requirements: *id002
@@ -42,6 +53,9 @@ dependencies:
42
53
  requirements:
43
54
  - - ">="
44
55
  - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
45
59
  version: "0"
46
60
  type: :development
47
61
  version_requirements: *id003
@@ -64,6 +78,7 @@ files:
64
78
  - dbmanager.gemspec
65
79
  - lib/dbmanager.rb
66
80
  - lib/dbmanager/adapters/mysql.rb
81
+ - lib/dbmanager/adapters/mysql2.rb
67
82
  - lib/dbmanager/dumper.rb
68
83
  - lib/dbmanager/importer.rb
69
84
  - lib/dbmanager/runner.rb
@@ -96,17 +111,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
111
  requirements:
97
112
  - - ">="
98
113
  - !ruby/object:Gem::Version
114
+ hash: 3
115
+ segments:
116
+ - 0
99
117
  version: "0"
100
118
  required_rubygems_version: !ruby/object:Gem::Requirement
101
119
  none: false
102
120
  requirements:
103
121
  - - ">="
104
122
  - !ruby/object:Gem::Version
123
+ hash: 3
124
+ segments:
125
+ - 0
105
126
  version: "0"
106
127
  requirements: []
107
128
 
108
129
  rubyforge_project: dbmanager
109
- rubygems_version: 1.8.15
130
+ rubygems_version: 1.8.24
110
131
  signing_key:
111
132
  specification_version: 3
112
133
  summary: database manager