rare_map 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,10 +42,11 @@ module RareMap
42
42
  end
43
43
 
44
44
  def primary_key
45
+ return @primary_key if @primary_key
45
46
  return 'id' if @id
46
47
 
47
48
  candidates = @columns.find_all { |col| col.unique }.map { |col| col.name }
48
- return @primary_key if candidates.include? @primary_key
49
+ # return @primary_key if candidates.include? @primary_key
49
50
  return 'id' if candidates.include? 'id'
50
51
  candidates.find { |c| c =~ eval("/^#{@name}.*id$/") } ||
51
52
  candidates.find { |c| c =~ eval("/^#{singularize}.*id$/") } ||
@@ -2,7 +2,7 @@ class RareMap
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- PATCH = 1
5
+ PATCH = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rare_map
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -142,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  segments:
144
144
  - 0
145
- hash: -3825559018675521113
145
+ hash: 1396508381234435921
146
146
  required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  none: false
148
148
  requirements: