ar-octopus 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +9 -9
  2. data/.rspec +1 -1
  3. data/.rubocop.yml +46 -0
  4. data/.rubocop_todo.yml +52 -0
  5. data/.ruby-version +1 -1
  6. data/.travis.yml +3 -9
  7. data/Appraisals +4 -0
  8. data/Rakefile +17 -16
  9. data/ar-octopus.gemspec +22 -16
  10. data/gemfiles/rails41.gemfile +7 -0
  11. data/init.rb +1 -1
  12. data/lib/ar-octopus.rb +1 -1
  13. data/lib/octopus.rb +38 -37
  14. data/lib/octopus/abstract_adapter.rb +0 -2
  15. data/lib/octopus/association.rb +8 -6
  16. data/lib/octopus/association_shard_tracking.rb +80 -81
  17. data/lib/octopus/collection_association.rb +7 -5
  18. data/lib/octopus/collection_proxy.rb +11 -9
  19. data/lib/octopus/has_and_belongs_to_many_association.rb +5 -3
  20. data/lib/octopus/load_balancing.rb +3 -2
  21. data/lib/octopus/load_balancing/round_robin.rb +12 -8
  22. data/lib/octopus/migration.rb +117 -108
  23. data/lib/octopus/model.rb +130 -134
  24. data/lib/octopus/persistence.rb +1 -1
  25. data/lib/octopus/proxy.rb +345 -339
  26. data/lib/octopus/railtie.rb +2 -2
  27. data/lib/octopus/relation_proxy.rb +6 -1
  28. data/lib/octopus/scope_proxy.rb +38 -36
  29. data/lib/octopus/shard_tracking.rb +36 -35
  30. data/lib/octopus/shard_tracking/attribute.rb +12 -14
  31. data/lib/octopus/shard_tracking/dynamic.rb +7 -3
  32. data/lib/octopus/singular_association.rb +5 -3
  33. data/lib/octopus/slave_group.rb +10 -8
  34. data/lib/octopus/version.rb +1 -1
  35. data/rails/init.rb +1 -1
  36. data/sample_app/autotest/discover.rb +2 -2
  37. data/sample_app/config/application.rb +1 -1
  38. data/sample_app/config/boot.rb +1 -1
  39. data/sample_app/config/environments/test.rb +1 -1
  40. data/sample_app/config/initializers/session_store.rb +1 -1
  41. data/sample_app/config/initializers/wrap_parameters.rb +1 -1
  42. data/sample_app/config/routes.rb +1 -1
  43. data/sample_app/db/migrate/20100720210335_create_sample_users.rb +2 -2
  44. data/sample_app/db/schema.rb +10 -10
  45. data/sample_app/db/seeds.rb +3 -3
  46. data/sample_app/features/step_definitions/seeds_steps.rb +4 -4
  47. data/sample_app/features/step_definitions/web_steps.rb +3 -4
  48. data/sample_app/features/support/env.rb +3 -4
  49. data/sample_app/features/support/paths.rb +4 -4
  50. data/sample_app/spec/spec_helper.rb +3 -3
  51. data/spec/migrations/10_create_users_using_replication.rb +3 -3
  52. data/spec/migrations/11_add_field_in_all_slaves.rb +3 -3
  53. data/spec/migrations/12_create_users_using_block.rb +7 -7
  54. data/spec/migrations/13_create_users_using_block_and_using.rb +4 -4
  55. data/spec/migrations/14_create_users_on_shards_of_a_group_with_versions.rb +2 -2
  56. data/spec/migrations/15_create_user_on_shards_of_default_group_with_versions.rb +2 -2
  57. data/spec/migrations/1_create_users_on_master.rb +3 -3
  58. data/spec/migrations/2_create_users_on_canada.rb +3 -3
  59. data/spec/migrations/3_create_users_on_both_shards.rb +3 -3
  60. data/spec/migrations/4_create_users_on_shards_of_a_group.rb +3 -3
  61. data/spec/migrations/5_create_users_on_multiples_groups.rb +2 -2
  62. data/spec/migrations/6_raise_exception_with_invalid_shard_name.rb +3 -3
  63. data/spec/migrations/7_raise_exception_with_invalid_multiple_shard_names.rb +3 -3
  64. data/spec/migrations/8_raise_exception_with_invalid_group_name.rb +3 -3
  65. data/spec/migrations/9_raise_exception_with_multiple_invalid_group_names.rb +4 -4
  66. data/spec/octopus/association_shard_tracking_spec.rb +413 -417
  67. data/spec/octopus/collection_proxy_spec.rb +6 -5
  68. data/spec/octopus/log_subscriber_spec.rb +4 -4
  69. data/spec/octopus/migration_spec.rb +48 -48
  70. data/spec/octopus/model_spec.rb +267 -292
  71. data/spec/octopus/octopus_spec.rb +40 -41
  72. data/spec/octopus/proxy_spec.rb +124 -124
  73. data/spec/octopus/relation_proxy_spec.rb +32 -32
  74. data/spec/octopus/replicated_slave_grouped_spec.rb +23 -23
  75. data/spec/octopus/replication_spec.rb +61 -66
  76. data/spec/octopus/scope_proxy_spec.rb +56 -10
  77. data/spec/octopus/sharded_replicated_slave_grouped_spec.rb +29 -29
  78. data/spec/octopus/sharded_spec.rb +10 -10
  79. data/spec/spec_helper.rb +6 -6
  80. data/spec/support/active_record/connection_adapters/modify_config_adapter.rb +1 -3
  81. data/spec/support/database_connection.rb +2 -2
  82. data/spec/support/database_models.rb +16 -17
  83. data/spec/support/octopus_helper.rb +19 -21
  84. data/spec/support/query_count.rb +1 -3
  85. data/spec/support/shared_contexts.rb +3 -3
  86. data/spec/tasks/octopus.rake_spec.rb +10 -10
  87. metadata +43 -26
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzBiMGIyMGY1ZGEyOWRlMGY0MjAyNjljYWQ4ZTI2NmFhZmE0NzIzZg==
4
+ YTI3ZTg3NmY0Y2UzMTRjMzRhMGU1MTFkMjk4MWViMjcyODYwMzE0Ng==
5
5
  data.tar.gz: !binary |-
6
- MDM0Yzg3ODhlMjNjODEzYjcyYTFmOTFmYmFhNmNjOTk2NmI0Y2YwZg==
7
- !binary "U0hBNTEy":
6
+ NjhiZjAwMTc2ZDZjZGQxNjZlYzBlODJiZjcwN2NlOWNkNmU1Y2E0Yg==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjFlODczZWIwYTM3MWNiZWE3ZjYwMTRiZTRhOTlhODMwZmVkZmU5ZWM1MTMy
10
- ODRlNzllMjgwY2Q4NzY3NjhiMzBhNTk4ZGRhNDNiYWRmZWE0NDBlM2UxZDE3
11
- ZTYyNjYyZmM1MTIwNTdmODkwNzM1MmMwYzU2NTY0MDI2Mzg5NzU=
9
+ YTI4YTk2ODU0NWI4ZjZiZWRmOGRlOGZjZmQ5YzQwNTZjMWY3YjI5OGRmNDA4
10
+ NTRhZDNkNGUzZDM4NWU2NTUzOTNlZTA3YjU0NTRiNmE2MDViMTQyODkwZjdm
11
+ ZTIzMWQxY2E1ZWYzZTRkMjQyNzVmZTA2ZDIxZmJlYzJkM2JmNjk=
12
12
  data.tar.gz: !binary |-
13
- MmM5NGFiZWE5MGE3ZWM2N2M0OGFkOGNjOWJiZmZlOWVhOTA5YjYzNmQ1Yzlh
14
- ZDlkMWNiNDMwYjQ3ZWEzYzY5MDFkOTAxOTNhZTk0NTk0YTkyYjc4NGQzYTM4
15
- ZjE2Yjg5ZmEzYmMxOTRjODgxMDc4YjA3Y2VjNDE1NjZhNTEwODE=
13
+ YTFhZjg1ZWEwMGE0YzYyNDIzOWI5ZTU1ZTkwNTQ1OGJmYTg3Mjc0Y2I1MWY2
14
+ Y2QxNTMxZTBiMzgzNzYwOTZjYTY4MmFkYjg1ZTg2YzMxMTU0ZjkyZDRlMjk0
15
+ YzZmYzU0NjkzOGYxYTU5Yzk4ZDc4ZWRkMjhhMTY2ZjQ1OTUyOWU=
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
1
  --color
2
- --format=documentation
2
+ --format=documentation
data/.rubocop.yml ADDED
@@ -0,0 +1,46 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ ActionFilter:
4
+ EnforcedStyle: filter
5
+
6
+ CaseIndentation:
7
+ IndentWhenRelativeTo: end
8
+
9
+ CollectionMethods:
10
+ PreferredMethods:
11
+ find: detect
12
+
13
+ EmptyLineBetweenDefs:
14
+ AllowAdjacentOneLineDefs: true
15
+
16
+ Encoding:
17
+ Enabled: false
18
+
19
+ EndAlignment:
20
+ AlignWith: variable
21
+
22
+ HashSyntax:
23
+ EnforcedStyle: hash_rockets
24
+
25
+ Style/IndentHash:
26
+ EnforcedStyle: consistent
27
+
28
+ Loop:
29
+ Enabled: false
30
+
31
+ PredicateName:
32
+ Enabled: false
33
+
34
+ RegexpLiteral:
35
+ Enabled: false
36
+
37
+ Semicolon:
38
+ AllowAsExpressionSeparator: true
39
+
40
+ Style/TrailingComma:
41
+ EnforcedStyleForMultiline: comma
42
+
43
+ Style/TrivialAccessors:
44
+ AllowDSLWriters: true
45
+ AllowPredicates: true
46
+ ExactNameMatch: true
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,52 @@
1
+ # This configuration was generated by `rubocop --auto-gen-config`
2
+ # on 2014-07-23 21:41:36 -0700 using RuboCop version 0.24.1.
3
+ # The point is for the user to remove these configuration records
4
+ # one by one as the offenses are removed from the code base.
5
+ # Note that changes in the inspected code, or installation of new
6
+ # versions of RuboCop, may require this file to be generated again.
7
+
8
+ # Offense count: 27
9
+ Lint/AmbiguousRegexpLiteral:
10
+ Enabled: false
11
+
12
+ # Offense count: 1
13
+ Lint/HandleExceptions:
14
+ Enabled: false
15
+
16
+ # Offense count: 1
17
+ # Configuration parameters: CountComments.
18
+ Style/ClassLength:
19
+ Max: 324
20
+
21
+ # Offense count: 3
22
+ Style/CyclomaticComplexity:
23
+ Max: 14
24
+
25
+ # Offense count: 81
26
+ Style/Documentation:
27
+ Enabled: false
28
+
29
+ # Offense count: 1
30
+ # Configuration parameters: Exclude.
31
+ Style/FileName:
32
+ Enabled: false
33
+
34
+ # Offense count: 1
35
+ # Configuration parameters: MinBodyLength.
36
+ Style/GuardClause:
37
+ Enabled: false
38
+
39
+ # Offense count: 273
40
+ # Configuration parameters: AllowURI.
41
+ Style/LineLength:
42
+ Max: 180
43
+
44
+ # Offense count: 10
45
+ # Configuration parameters: CountComments.
46
+ Style/MethodLength:
47
+ Max: 52
48
+
49
+ # Offense count: 2
50
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
51
+ Style/Next:
52
+ Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 1.9.3
1
+ 2.1.1
data/.travis.yml CHANGED
@@ -5,19 +5,13 @@ before_script:
5
5
  - "bundle exec rake db:prepare"
6
6
  rvm:
7
7
  - 1.9.3
8
-
8
+ - 2.0.0
9
+ - 2.1.1
9
10
  gemfile:
10
11
  - gemfiles/rails32.gemfile
11
12
  - gemfiles/rails4.gemfile
12
-
13
+ - gemfiles/rails41.gemfile
13
14
  notifications:
14
15
  recipients:
15
16
  - gabriel.sobrinho@gmail.com
16
17
  - thiago.pradi@gmail.com
17
-
18
- matrix:
19
- include:
20
- - rvm: 2.0.0
21
- gemfile: gemfiles/rails32.gemfile
22
- - rvm: 2.0.0
23
- gemfile: gemfiles/rails4.gemfile
data/Appraisals CHANGED
@@ -6,4 +6,8 @@ appraise "rails4" do
6
6
  gem "activerecord", "~> 4.0.0"
7
7
  end
8
8
 
9
+ appraise "rails41" do
10
+ gem "activerecord", "~> 4.1.0"
11
+ end
12
+
9
13
  # vim: ft=ruby
data/Rakefile CHANGED
@@ -1,11 +1,12 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'rspec/core/rake_task'
3
+ require 'rubocop/rake_task'
3
4
  require 'appraisal'
4
5
 
5
- task :default => :spec
6
+ RSpec::Core::RakeTask.new
7
+ RuboCop::RakeTask.new
6
8
 
7
- RSpec::Core::RakeTask.new(:spec) do |spec|
8
- end
9
+ task :default => [:spec]
9
10
 
10
11
  namespace :db do
11
12
  desc 'Build the databases for tests'
@@ -13,20 +14,20 @@ namespace :db do
13
14
  pg_spec = {
14
15
  :adapter => 'postgresql',
15
16
  :host => 'localhost',
16
- :username => (ENV['POSTGRES_USER'] || "postgres"),
17
- :encoding => 'utf8'
17
+ :username => (ENV['POSTGRES_USER'] || 'postgres'),
18
+ :encoding => 'utf8',
18
19
  }
19
20
 
20
21
  mysql_spec = {
21
22
  :adapter => 'mysql2',
22
23
  :host => 'localhost',
23
- :username => (ENV['MYSQL_USER'] || "root"),
24
- :encoding => 'utf8'
24
+ :username => (ENV['MYSQL_USER'] || 'root'),
25
+ :encoding => 'utf8',
25
26
  }
26
27
 
27
- %x( rm -f /tmp/database.sqlite3 )
28
+ ` rm -f /tmp/database.sqlite3 `
28
29
 
29
- require "active_record"
30
+ require 'active_record'
30
31
 
31
32
  # Connects to PostgreSQL
32
33
  ActiveRecord::Base.establish_connection(pg_spec.merge('database' => 'postgres', 'schema_search_path' => 'public'))
@@ -49,9 +50,9 @@ namespace :db do
49
50
 
50
51
  desc 'Create tables on tests databases'
51
52
  task :create_tables do
52
- require "octopus"
53
+ require 'octopus'
53
54
  # Set the octopus variable directory to spec dir, in order to load the config/shards.yml file.
54
- Octopus.instance_variable_set(:@directory, "#{File.dirname(__FILE__)}/spec/" )
55
+ Octopus.instance_variable_set(:@directory, "#{File.dirname(__FILE__)}/spec/")
55
56
 
56
57
  # Require the database connection
57
58
  require "#{File.dirname(__FILE__)}/spec/support/database_connection"
@@ -61,9 +62,9 @@ namespace :db do
61
62
  shard_symbols.each do |shard_symbol|
62
63
  # Rails 3.1 needs to do some introspection around the base class, which requires
63
64
  # the model be a descendent of ActiveRecord::Base.
64
- class BlankModel < ActiveRecord::Base; end;
65
+ class BlankModel < ActiveRecord::Base; end
65
66
 
66
- BlankModel.using(shard_symbol).connection.initialize_schema_migrations_table()
67
+ BlankModel.using(shard_symbol).connection.initialize_schema_migrations_table
67
68
 
68
69
  BlankModel.using(shard_symbol).connection.create_table(:users) do |u|
69
70
  u.string :name
@@ -148,14 +149,14 @@ namespace :db do
148
149
 
149
150
  BlankModel.using(shard_symbol).connection.create_table(:weapons) do |u|
150
151
  u.integer :mmorpg_player_id
151
- u.string :name
152
- u.string :hand
152
+ u.string :name
153
+ u.string :hand
153
154
  end
154
155
 
155
156
  BlankModel.using(shard_symbol).connection.create_table(:skills) do |u|
156
157
  u.integer :mmorpg_player_id
157
158
  u.integer :weapon_id
158
- u.string :name
159
+ u.string :name
159
160
  end
160
161
  end
161
162
  end
data/ar-octopus.gemspec CHANGED
@@ -1,36 +1,42 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "octopus/version"
2
+ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
3
+ require 'octopus/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = "ar-octopus"
6
+ s.name = 'ar-octopus'
7
7
  s.version = Octopus::VERSION
8
- s.authors = ["Thiago Pradi", "Mike Perham", "Gabriel Sobrinho"]
9
- s.email = ["tchandy@gmail.com", "mperham@gmail.com", "gabriel.sobrinho@gmail.com"]
10
- s.homepage = "https://github.com/tchandy/octopus"
11
- s.summary = %q{Easy Database Sharding for ActiveRecord}
12
- s.description = %q{This gem allows you to use sharded databases with ActiveRecord. This also provides a interface for replication and for running migrations with multiples shards.}
8
+ s.authors = ['Thiago Pradi', 'Mike Perham', 'Gabriel Sobrinho']
9
+ s.email = ['tchandy@gmail.com', 'mperham@gmail.com', 'gabriel.sobrinho@gmail.com']
10
+ s.homepage = 'https://github.com/tchandy/octopus'
11
+ s.summary = 'Easy Database Sharding for ActiveRecord'
12
+ s.description = 'This gem allows you to use sharded databases with ActiveRecord. This also provides a interface for replication and for running migrations with multiples shards.'
13
13
 
14
14
  s.files = `git ls-files`.split("\n")
15
15
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
- s.require_paths = ["lib"]
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
17
+ s.require_paths = ['lib']
18
18
 
19
19
  s.post_install_message = "Important: If you are upgrading from < Octopus 0.5.0 you need to run:\n" \
20
20
  "$ rake octopus:copy_schema_versions\n\n" \
21
- "Octopus now stores schema version information in each shard and migrations will not " \
22
- "work properly unless this task is invoked."
21
+ 'Octopus now stores schema version information in each shard and migrations will not ' \
22
+ 'work properly unless this task is invoked.'
23
23
 
24
24
  s.add_dependency 'activerecord', '>= 3.2.0'
25
25
  s.add_dependency 'activesupport', '>= 3.2.0'
26
26
 
27
- s.add_development_dependency 'rake', '>= 0.8.7'
28
- s.add_development_dependency 'rspec', '>= 2.0.0'
27
+ s.add_development_dependency 'appraisal', '>= 0.3.8'
29
28
  s.add_development_dependency 'mysql2', '> 0.3'
30
29
  s.add_development_dependency 'pg', '>= 0.11.0'
30
+ s.add_development_dependency 'rake', '>= 0.8.7'
31
+ s.add_development_dependency 'rspec', '>= 3'
32
+ s.add_development_dependency 'rubocop'
31
33
  s.add_development_dependency 'sqlite3', '>= 1.3.4'
32
- s.add_development_dependency 'pry-debugger'
33
- s.add_development_dependency 'appraisal', '>= 0.3.8'
34
+
35
+ if RUBY_VERSION < '2.0.0'
36
+ s.add_development_dependency 'pry-debugger'
37
+ else
38
+ s.add_development_dependency 'pry-byebug'
39
+ end
34
40
 
35
41
  s.license = 'MIT'
36
42
  end
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 4.1.0"
6
+
7
+ gemspec :path=>"../"
data/init.rb CHANGED
@@ -1 +1 @@
1
- require File.join(File.dirname(__FILE__), 'rails', 'init')
1
+ require File.join(File.dirname(__FILE__), 'rails', 'init')
data/lib/ar-octopus.rb CHANGED
@@ -1 +1 @@
1
- require "octopus"
1
+ require 'octopus'
data/lib/octopus.rb CHANGED
@@ -2,24 +2,24 @@ require 'active_record'
2
2
  require 'active_support/version'
3
3
  require 'active_support/core_ext/class'
4
4
 
5
- require "yaml"
6
- require "erb"
5
+ require 'yaml'
6
+ require 'erb'
7
7
 
8
8
  module Octopus
9
- def self.env()
9
+ def self.env
10
10
  @env ||= 'octopus'
11
11
  end
12
12
 
13
- def self.rails_env()
13
+ def self.rails_env
14
14
  @rails_env ||= self.rails? ? Rails.env.to_s : 'shards'
15
15
  end
16
16
 
17
17
  def self.config
18
18
  @config ||= begin
19
- file_name = Octopus.directory() + "/config/shards.yml"
19
+ file_name = Octopus.directory + '/config/shards.yml'
20
20
 
21
- if File.exists?(file_name) || File.symlink?(file_name)
22
- config ||= HashWithIndifferentAccess.new(YAML.load(ERB.new(File.read(file_name)).result))[Octopus.env()]
21
+ if File.exist?(file_name) || File.symlink?(file_name)
22
+ config ||= HashWithIndifferentAccess.new(YAML.load(ERB.new(File.read(file_name)).result))[Octopus.env]
23
23
  else
24
24
  config ||= HashWithIndifferentAccess.new
25
25
  end
@@ -45,7 +45,7 @@ module Octopus
45
45
 
46
46
  # Returns the Rails.root_to_s when you are using rails
47
47
  # Running the current directory in a generic Ruby process
48
- def self.directory()
48
+ def self.directory
49
49
  @directory ||= defined?(Rails) ? Rails.root.to_s : Dir.pwd
50
50
  end
51
51
 
@@ -72,12 +72,16 @@ module Octopus
72
72
  ActiveRecord::VERSION::MAJOR >= 4
73
73
  end
74
74
 
75
+ def self.rails41?
76
+ rails4? && ActiveRecord::VERSION::MINOR >= 1
77
+ end
78
+
75
79
  def self.rails?
76
80
  defined?(Rails)
77
81
  end
78
82
 
79
83
  def self.shards=(shards)
80
- config[rails_env()] = HashWithIndifferentAccess.new(shards)
84
+ config[rails_env] = HashWithIndifferentAccess.new(shards)
81
85
  ActiveRecord::Base.connection.initialize_shards(@config)
82
86
  end
83
87
 
@@ -91,36 +95,33 @@ module Octopus
91
95
  end
92
96
  end
93
97
 
94
- def self.fully_replicated(&block)
95
- old_fully_replicated = Thread.current["octopus.fully_replicated"]
96
- Thread.current["octopus.fully_replicated"] = true
98
+ def self.fully_replicated(&_block)
99
+ old_fully_replicated = Thread.current['octopus.fully_replicated']
100
+ Thread.current['octopus.fully_replicated'] = true
97
101
  yield
98
102
  ensure
99
- Thread.current["octopus.fully_replicated"] = old_fully_replicated
103
+ Thread.current['octopus.fully_replicated'] = old_fully_replicated
100
104
  end
101
105
  end
102
106
 
103
- require "octopus/shard_tracking"
104
- require "octopus/shard_tracking/attribute"
105
- require "octopus/shard_tracking/dynamic"
106
-
107
- require "octopus/model"
108
- require "octopus/migration"
109
- require "octopus/association"
110
- require "octopus/collection_association"
111
- require "octopus/has_and_belongs_to_many_association"
112
- require "octopus/association_shard_tracking"
113
- require "octopus/persistence"
114
- require "octopus/log_subscriber"
115
- require "octopus/abstract_adapter"
116
- require "octopus/singular_association"
117
-
118
- if defined?(::Rails)
119
- require "octopus/railtie"
120
- end
121
-
122
-
123
- require "octopus/proxy"
124
- require "octopus/collection_proxy"
125
- require "octopus/relation_proxy"
126
- require "octopus/scope_proxy"
107
+ require 'octopus/shard_tracking'
108
+ require 'octopus/shard_tracking/attribute'
109
+ require 'octopus/shard_tracking/dynamic'
110
+
111
+ require 'octopus/model'
112
+ require 'octopus/migration'
113
+ require 'octopus/association'
114
+ require 'octopus/collection_association'
115
+ require 'octopus/has_and_belongs_to_many_association' unless Octopus.rails41?
116
+ require 'octopus/association_shard_tracking'
117
+ require 'octopus/persistence'
118
+ require 'octopus/log_subscriber'
119
+ require 'octopus/abstract_adapter'
120
+ require 'octopus/singular_association'
121
+
122
+ require 'octopus/railtie' if defined?(::Rails)
123
+
124
+ require 'octopus/proxy'
125
+ require 'octopus/collection_proxy'
126
+ require 'octopus/relation_proxy'
127
+ require 'octopus/scope_proxy'