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 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.3"
40
+ gem.version = "0.3.4"
41
41
  end
42
42
  Jeweler::GemcutterTasks.new
43
43
  rescue LoadError
data/ar-octopus.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ar-octopus}
8
- s.version = "0.3.3"
8
+ s.version = "0.3.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Thiago Pradi", "Mike Perham"]
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.where(:name => "Thiago").using(:dont_exists).all }.should raise_exception("Nonexistent Shard Name: dont_exists")
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: 21
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 3
10
- version: 0.3.3
9
+ - 4
10
+ version: 0.3.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Thiago Pradi