lol_dba 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 127607540ae57344883d9c76e7e1e10c5836dbf3
4
- data.tar.gz: a631d43dda31a21ff819c3208d5dcdca73150688
3
+ metadata.gz: 64685193735493e0cb8bc2e92a1dd9a81dfb6686
4
+ data.tar.gz: 02c3646cf50ca778443eeb2d5b8e64f0d5dfe42f
5
5
  SHA512:
6
- metadata.gz: 2bd6d5626b9678f4cfb927c596d9534f8d689efad7a617d9b8dbf23f1c7ed39043ab0d07c28245c70a05f2184c35191748d5a9869d2a4e2965c46b5e1f01a825
7
- data.tar.gz: dd27d0ec2de737b8c3d718a7304a0643715d43f2a59d361d2b2a450de16f68d71edf5eaf4f8f8589ff32abcd4199eaf4bbf0840b0532e113193e65ca38616e41
6
+ metadata.gz: 1b01e27d6e9491c57246b0f99befef726c49815a57150503a6b83609f6c60208fb28f801826403dfc4ab34e1cbbc5f1d29b19906d0b658aa27fdc257699cfeb1
7
+ data.tar.gz: 21091f4b541976c2f8f5c3db9fd862a9a3ffc22218119907bde3bf95c8533570135c3e94b92f4d069a0ea31ab7543e774f5f0f1cf5c1f8753d72038a784a27ef
data/.travis.yml CHANGED
@@ -6,6 +6,7 @@ rvm:
6
6
  - 2.0
7
7
  - 2.1
8
8
  - 2.2
9
+ - 2.3
9
10
  - ruby-head
10
11
  gemfile:
11
12
  - gemfiles/rails_3_2.gemfile
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lol_dba (2.0.1)
4
+ lol_dba (2.0.3)
5
5
  actionpack (>= 3.0, < 5.0)
6
6
  activerecord (>= 3.0, < 5.0)
7
7
  railties (>= 3.0, < 5.0)
@@ -137,4 +137,4 @@ DEPENDENCIES
137
137
  test-unit
138
138
 
139
139
  BUNDLED WITH
140
- 1.10.6
140
+ 1.11.2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- lol_dba (2.0.1)
4
+ lol_dba (2.0.3)
5
5
  actionpack (>= 3.0, < 5.0)
6
6
  activerecord (>= 3.0, < 5.0)
7
7
  railties (>= 3.0, < 5.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- lol_dba (2.0.1)
4
+ lol_dba (2.0.3)
5
5
  actionpack (>= 3.0, < 5.0)
6
6
  activerecord (>= 3.0, < 5.0)
7
7
  railties (>= 3.0, < 5.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- lol_dba (2.0.1)
4
+ lol_dba (2.0.3)
5
5
  actionpack (>= 3.0, < 5.0)
6
6
  activerecord (>= 3.0, < 5.0)
7
7
  railties (>= 3.0, < 5.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- lol_dba (2.0.1)
4
+ lol_dba (2.0.3)
5
5
  actionpack (>= 3.0, < 5.0)
6
6
  activerecord (>= 3.0, < 5.0)
7
7
  railties (>= 3.0, < 5.0)
data/lib/lol_dba.rb CHANGED
@@ -112,7 +112,7 @@ EOM
112
112
 
113
113
  foreign_key = get_through_foreign_key(class_name, reflection_options)
114
114
 
115
- index_name = [association_foreign_key, foreign_key].sort
115
+ index_name = [association_foreign_key, foreign_key].map(&:to_s).sort
116
116
  when :has_many
117
117
  # has_many tables are threaten by the other side of the relation
118
118
  next unless reflection_options.options[:through] && reflections[reflection_options.options[:through].to_s]
@@ -131,7 +131,7 @@ EOM
131
131
 
132
132
  #FIXME currently we don't support :through => :another_regular_has_many_and_non_through_relation
133
133
  next if association_foreign_key.nil?
134
- index_name = [association_foreign_key.to_s, foreign_key.to_s].sort
134
+ index_name = [association_foreign_key, foreign_key].map(&:to_s).sort
135
135
  end
136
136
 
137
137
  unless index_name == "" || reflection_options.options.include?(:class)
@@ -1,3 +1,3 @@
1
1
  module LolDba
2
- VERSION = "2.0.2" unless defined? LolDba::VERSION
2
+ VERSION = "2.0.3" unless defined? LolDba::VERSION
3
3
  end
@@ -1,6 +1,6 @@
1
1
  class Gift < ActiveRecord::Base
2
2
 
3
3
  self.primary_key = :custom_primary_key
4
- has_and_belongs_to_many :users, :join_table => "purchases", :association_foreign_key => 'buyer_id', :foreign_key => 'present_id'
4
+ has_and_belongs_to_many :users, :join_table => "purchases", :association_foreign_key => :buyer_id, :foreign_key => 'present_id'
5
5
 
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lol_dba
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Plentz