active_record_shards 2.0.0.beta2 → 2.0.0.beta5
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.
- data/README.md +98 -0
- data/lib/active_record_shards/configuration_parser.rb +1 -0
- data/lib/active_record_shards/connection_switcher.rb +45 -20
- data/lib/active_record_shards/shard_selection.rb +20 -13
- data/lib/active_record_shards/tasks.rb +52 -0
- data/test/configuration_parser_test.rb +40 -35
- data/test/connection_switching_test.rb +95 -1
- data/test/database.yml +18 -0
- data/test/helper.rb +1 -1
- data/test/test.log +43513 -0
- metadata +7 -6
- data/README.rdoc +0 -33
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_shards
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196457
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 2.0.0.
|
11
|
+
- 5
|
12
|
+
version: 2.0.0.beta5
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Mick Staugaard
|
@@ -18,7 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2011-
|
21
|
+
date: 2011-02-22 00:00:00 -08:00
|
22
22
|
default_executable:
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|
@@ -124,8 +124,9 @@ files:
|
|
124
124
|
- lib/active_record_shards/connection_switcher.rb
|
125
125
|
- lib/active_record_shards/model.rb
|
126
126
|
- lib/active_record_shards/shard_selection.rb
|
127
|
+
- lib/active_record_shards/tasks.rb
|
127
128
|
- lib/active_record_shards.rb
|
128
|
-
- README.
|
129
|
+
- README.md
|
129
130
|
- test/configuration_parser_test.rb
|
130
131
|
- test/connection_switching_test.rb
|
131
132
|
- test/database.yml
|
@@ -166,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
167
|
requirements: []
|
167
168
|
|
168
169
|
rubyforge_project:
|
169
|
-
rubygems_version: 1.
|
170
|
+
rubygems_version: 1.5.2
|
170
171
|
signing_key:
|
171
172
|
specification_version: 3
|
172
173
|
summary: Simple database switching for ActiveRecord.
|
data/README.rdoc
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
= active_record_shards
|
2
|
-
|
3
|
-
== Example
|
4
|
-
|
5
|
-
Ticket.on_slave do
|
6
|
-
Ticket.first(50)
|
7
|
-
end
|
8
|
-
|
9
|
-
== Install
|
10
|
-
|
11
|
-
gem install active_record_shards
|
12
|
-
|
13
|
-
Add the slave database to config/database.yml:
|
14
|
-
development_slave:
|
15
|
-
adapter: mysql
|
16
|
-
...
|
17
|
-
|
18
|
-
== Note on Patches/Pull Requests
|
19
|
-
|
20
|
-
* Fork the project.
|
21
|
-
* Make your feature addition or bug fix.
|
22
|
-
* Add tests for it. This is important so I don't break it in a
|
23
|
-
future version unintentionally.
|
24
|
-
* Commit, do not mess with rakefile, version, or history.
|
25
|
-
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
26
|
-
* Send me a pull request. Bonus points for topic branches.
|
27
|
-
|
28
|
-
== Copyright
|
29
|
-
|
30
|
-
Copyright (c) 2009 Zendesk. See LICENSE for details.
|
31
|
-
|
32
|
-
== Authors
|
33
|
-
Mick Staugaard
|