protobuf-activerecord 3.1.0 → 3.1.1

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: 3c06e31b1d8222d399e5998b545adb73be1f0121
4
- data.tar.gz: e6ddb72fa12a53cafb4202e43507c7d99eb59222
3
+ metadata.gz: 976fc954c82761944381e6445e9b603cf2a38e4e
4
+ data.tar.gz: b5a1ae6b0afb8cc61075460b8ad24c2ee2fc0cb0
5
5
  SHA512:
6
- metadata.gz: f273e08d8288cdac6c5652896b882933d49c6876cd90c176de73530cb9e501a6219a2b2b6f94e9d3b5212e0883f25b42eca3a993616b948c2f92b8f4060bca71
7
- data.tar.gz: d9c0d0a110874c24b66b742e93177577ba1093d0dc4f5aea782ebf8647205d608337877acb21237975342de7bdf123439817fcb33a5b362b2021ea20c1547b1f
6
+ metadata.gz: 8d8219bf86dafaa0c0046811b2d729b079175213320ba376f5aae07efae283312097019ce5492119b0c50e83cdcce0bc0f66b43a068e94bc472f860619a818e8
7
+ data.tar.gz: 6dc72951231be8f28e1f520f996896ee6e6677a4b3f008c33c893509ec5c8e91a8da53a0d831bcec7b6a4d3e28aab56e08e1f8c88157bdbbff0db33f385bb5be
data/.gitignore CHANGED
@@ -5,6 +5,7 @@
5
5
  .config
6
6
  .rvmrc
7
7
  .yardoc
8
+ .ruby-*
8
9
  Gemfile.lock
9
10
  coverage
10
11
  pkg/*
data/README.md CHANGED
@@ -113,7 +113,7 @@ This does pretty much the same thing, but from a different perspective.
113
113
 
114
114
  ```Ruby
115
115
  user.to_proto(:only => :email) # Only the email
116
- user.to_proto(:except => :email) # Everthing except the email
116
+ user.to_proto(:except => :email) # Everything except the email
117
117
  user.to_proto(:include => :email) # Start with the class-level settings, but add email
118
118
  ```
119
119
 
@@ -39,20 +39,22 @@ module Protobuf
39
39
  # Map out the columns for future reference on type conversion
40
40
  # :nodoc:
41
41
  def _protobuf_map_columns(force = false)
42
- return unless table_exists?
42
+ ::Thread.exclusive do
43
+ @_protobuf_mapped_columns = false if force
43
44
 
44
- @_protobuf_mapped_columns = false if force
45
- return if _protobuf_mapped_columns?
45
+ return unless table_exists?
46
+ return if _protobuf_mapped_columns?
46
47
 
47
- @_protobuf_columns = {}
48
- @_protobuf_column_types = Hash.new { |h,k| h[k] = [] }
48
+ @_protobuf_columns = {}
49
+ @_protobuf_column_types = Hash.new { |h,k| h[k] = [] }
49
50
 
50
- columns.map do |column|
51
- @_protobuf_columns[column.name.to_sym] = column
52
- @_protobuf_column_types[column.type.to_sym] << column.name.to_sym
53
- end
51
+ columns.map do |column|
52
+ @_protobuf_columns[column.name.to_sym] = column
53
+ @_protobuf_column_types[column.type.to_sym] << column.name.to_sym
54
+ end
54
55
 
55
- @_protobuf_mapped_columns = true
56
+ @_protobuf_mapped_columns = true
57
+ end
56
58
  end
57
59
 
58
60
  def _protobuf_mapped_columns?
@@ -1,5 +1,5 @@
1
1
  module Protobuf
2
2
  module ActiveRecord
3
- VERSION = "3.1.0"
3
+ VERSION = "3.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Hutchison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-26 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
231
  version: '0'
232
232
  requirements: []
233
233
  rubyforge_project:
234
- rubygems_version: 2.2.1
234
+ rubygems_version: 2.4.5
235
235
  signing_key:
236
236
  specification_version: 4
237
237
  summary: Google Protocol Buffers integration for Active Record