ar-octopus 0.3.3 → 0.3.4
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/Rakefile +1 -1
- data/ar-octopus.gemspec +1 -1
- data/lib/octopus/model.rb +1 -1
- data/spec/octopus/scope_proxy_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -6
- metadata +3 -3
data/Rakefile
CHANGED
|
@@ -37,7 +37,7 @@ begin
|
|
|
37
37
|
gem.add_development_dependency "jeweler", ">= 1.4"
|
|
38
38
|
gem.add_development_dependency "actionpack", ">= 2.3"
|
|
39
39
|
gem.add_dependency('activerecord', '>= 2.3')
|
|
40
|
-
gem.version = "0.3.
|
|
40
|
+
gem.version = "0.3.4"
|
|
41
41
|
end
|
|
42
42
|
Jeweler::GemcutterTasks.new
|
|
43
43
|
rescue LoadError
|
data/ar-octopus.gemspec
CHANGED
data/lib/octopus/model.rb
CHANGED
|
@@ -14,7 +14,7 @@ module Octopus::Model
|
|
|
14
14
|
return self if defined?(::Rails) && !Octopus.environments.include?(Rails.env.to_s)
|
|
15
15
|
|
|
16
16
|
clean_table_name()
|
|
17
|
-
hijack_initializer()
|
|
17
|
+
hijack_initializer() if !respond_to?(:set_current_shard)
|
|
18
18
|
|
|
19
19
|
self.connection_proxy.using_enabled = true
|
|
20
20
|
|
|
@@ -14,6 +14,6 @@ describe Octopus::ScopeProxy do
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
it "should raise a exception when trying to send a query to a shard that don't exists" do
|
|
17
|
-
lambda { User.
|
|
17
|
+
lambda { User.using(:dont_exists).all }.should raise_exception("Nonexistent Shard Name: dont_exists")
|
|
18
18
|
end
|
|
19
19
|
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
require "rubygems"
|
|
2
|
-
if ENV["VERSION"]
|
|
3
|
-
gem 'activerecord', ENV["VERSION"]
|
|
4
|
-
gem 'activesupport', ENV["VERSION"]
|
|
5
|
-
gem 'actionpack', ENV["VERSION"]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
2
|
require "bundler"
|
|
3
|
+
|
|
9
4
|
Bundler.setup()
|
|
5
|
+
|
|
10
6
|
require File.expand_path(File.dirname(__FILE__)) + "/database_connection"
|
|
11
7
|
require "octopus"
|
|
12
8
|
require "octopus_helper"
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ar-octopus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 27
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 3
|
|
9
|
-
-
|
|
10
|
-
version: 0.3.
|
|
9
|
+
- 4
|
|
10
|
+
version: 0.3.4
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Thiago Pradi
|