active_shard 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/active_shard/rails/database.rake +6 -5
- data/lib/active_shard/version.rb +2 -2
- data/lib/active_shard.rb +2 -2
- metadata +38 -45
@@ -71,12 +71,13 @@ namespace :shards do
|
|
71
71
|
namespace :migrate do
|
72
72
|
# desc 'Rollbacks the database one migration and re migrate up (options: STEP=x, VERSION=x).'
|
73
73
|
task :redo, [:shard_name] => :environment do |t, args|
|
74
|
+
shard_name = args[:shard_name]
|
74
75
|
if ENV["VERSION"]
|
75
|
-
Rake::Task["shards:migrate:down"].invoke(
|
76
|
-
Rake::Task["shards:migrate:up"].invoke(
|
76
|
+
Rake::Task["shards:migrate:down"].invoke( shard_name )
|
77
|
+
Rake::Task["shards:migrate:up"].invoke( shard_name )
|
77
78
|
else
|
78
|
-
Rake::Task["shards:rollback"].invoke(
|
79
|
-
Rake::Task["shards:migrate"].invoke(
|
79
|
+
Rake::Task["shards:rollback"].invoke( shard_name )
|
80
|
+
Rake::Task["shards:migrate"].invoke( shard_name )
|
80
81
|
end
|
81
82
|
end
|
82
83
|
|
@@ -326,4 +327,4 @@ def with_shard( args )
|
|
326
327
|
ActiveShard.with( shard_name ) do
|
327
328
|
yield( shard_name, schema )
|
328
329
|
end
|
329
|
-
end
|
330
|
+
end
|
data/lib/active_shard/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module ActiveShard
|
2
|
-
VERSION = '0.2.
|
3
|
-
end
|
2
|
+
VERSION = '0.2.4'
|
3
|
+
end
|
data/lib/active_shard.rb
CHANGED
@@ -171,7 +171,7 @@ module ActiveShard
|
|
171
171
|
end
|
172
172
|
|
173
173
|
def shards_by_schema( schema_name )
|
174
|
-
config.shards_by_schema( schema_name )
|
174
|
+
config.shards_by_schema( environment, schema_name )
|
175
175
|
end
|
176
176
|
|
177
177
|
def logger
|
@@ -190,4 +190,4 @@ module ActiveShard
|
|
190
190
|
end
|
191
191
|
end
|
192
192
|
|
193
|
-
ActiveSupport.run_load_hooks(:active_shard, ActiveShard) if defined?(ActiveSupport)
|
193
|
+
ActiveSupport.run_load_hooks(:active_shard, ActiveShard) if defined?(ActiveSupport)
|
metadata
CHANGED
@@ -1,85 +1,78 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_shard
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.4
|
4
5
|
prerelease:
|
5
|
-
version: 0.2.3
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Brasten Sager
|
9
9
|
- Matt Baker
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2011-12-28 00:00:00.000000000Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
17
16
|
name: activesupport
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
17
|
+
requirement: &85891990 !ruby/object:Gem::Requirement
|
20
18
|
none: false
|
21
|
-
requirements:
|
19
|
+
requirements:
|
22
20
|
- - ~>
|
23
|
-
- !ruby/object:Gem::Version
|
21
|
+
- !ruby/object:Gem::Version
|
24
22
|
version: 3.0.0
|
25
23
|
type: :runtime
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *85891990
|
26
|
+
description: ActiveShard is a library that implements flexible sharding in ActiveRecord
|
27
|
+
and Rails.
|
28
|
+
email:
|
29
29
|
- brasten@dashwire.com
|
30
30
|
- matt@dashwire.com
|
31
31
|
executables: []
|
32
|
-
|
33
32
|
extensions: []
|
34
|
-
|
35
33
|
extra_rdoc_files: []
|
36
|
-
|
37
|
-
files:
|
34
|
+
files:
|
38
35
|
- README.md
|
39
|
-
- lib/active_shard/
|
40
|
-
- lib/active_shard/
|
41
|
-
- lib/active_shard/active_record/connection_specification_adapter.rb
|
42
|
-
- lib/active_shard/active_record/schema_connection_proxy.rb
|
43
|
-
- lib/active_shard/active_record/shard_support.rb
|
44
|
-
- lib/active_shard/active_record/sharded_base.rb
|
36
|
+
- lib/active_shard/version.rb
|
37
|
+
- lib/active_shard/shard_definition.rb
|
45
38
|
- lib/active_shard/active_record.rb
|
46
|
-
- lib/active_shard/config.rb
|
47
|
-
- lib/active_shard/exceptions.rb
|
48
|
-
- lib/active_shard/rails/database.rake
|
49
39
|
- lib/active_shard/railtie.rb
|
50
|
-
- lib/active_shard/scope.rb
|
51
40
|
- lib/active_shard/scope_manager.rb
|
41
|
+
- lib/active_shard/config.rb
|
52
42
|
- lib/active_shard/shard_collection.rb
|
53
|
-
- lib/active_shard/
|
43
|
+
- lib/active_shard/rails/database.rake
|
44
|
+
- lib/active_shard/active_record/schema_connection_proxy.rb
|
45
|
+
- lib/active_shard/active_record/sharded_base.rb
|
46
|
+
- lib/active_shard/active_record/connection_specification_adapter.rb
|
47
|
+
- lib/active_shard/active_record/shard_support.rb
|
48
|
+
- lib/active_shard/active_record/connection_proxy_pool.rb
|
49
|
+
- lib/active_shard/active_record/connection_handler.rb
|
50
|
+
- lib/active_shard/exceptions.rb
|
51
|
+
- lib/active_shard/scope.rb
|
54
52
|
- lib/active_shard/shard_lookup_handler.rb
|
55
|
-
- lib/active_shard/version.rb
|
56
53
|
- lib/active_shard.rb
|
57
54
|
homepage: https://github.com/dashwire/active_shard
|
58
55
|
licenses: []
|
59
|
-
|
60
56
|
post_install_message:
|
61
57
|
rdoc_options: []
|
62
|
-
|
63
|
-
require_paths:
|
58
|
+
require_paths:
|
64
59
|
- lib
|
65
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
66
61
|
none: false
|
67
|
-
requirements:
|
68
|
-
- -
|
69
|
-
- !ruby/object:Gem::Version
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
70
65
|
version: 1.8.7
|
71
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
67
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
76
71
|
version: 1.3.6
|
77
72
|
requirements: []
|
78
|
-
|
79
73
|
rubyforge_project:
|
80
|
-
rubygems_version: 1.8.
|
74
|
+
rubygems_version: 1.8.10
|
81
75
|
signing_key:
|
82
76
|
specification_version: 3
|
83
77
|
summary: Sharding library for ActiveRecord
|
84
78
|
test_files: []
|
85
|
-
|