neofiles 2.0.0 → 2.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6c91e9f6a9903c58776d7c916f8adda41c2694d
4
- data.tar.gz: df2ede8d0562a3be9d2af8b3992eb4b662f9eb68
3
+ metadata.gz: 409b7204b33f2a76dbb8a5c2ef7e52fe987fca50
4
+ data.tar.gz: 80db2637a16da4c0ae92967d1487f3eb3fbb37d1
5
5
  SHA512:
6
- metadata.gz: 9fafa7bbe4b172169631d83597b46348b8726d6a4d411ca9091b59412ee5810d5e9c249cdd30c08c1296f86107bd3e4a6550647e74d740683072bfa143011246
7
- data.tar.gz: d34b9056fb7dad7faa2e1a1a94b0a90733718b4db25925b43fc9b85547ef0bc583c3ffd7a705e78f5fd7c02e9a1c76f50fb50162e49c8d1535c5aa938b09a920
6
+ metadata.gz: 6a8b3cf9a92296ce8605f69835773513143e9254621e7bdbc2d7910172820b251e0596177506c4d99daa666947c70aea37e5ad1373ce96911628627548cbadcf
7
+ data.tar.gz: e74fec00c9d375f2d4d737126db02a2cf745984bbf6aac7aede4fc8e4db2314c7b3884187589a1948992fbeb2e36c290db90f4193034452538947a5d25f84366
@@ -7,7 +7,9 @@ class Neofiles::FileChunk
7
7
 
8
8
  store_in collection: Rails.application.config.neofiles.mongo_chunks_collection, client: Rails.application.config.neofiles.mongo_client
9
9
 
10
- belongs_to :file, class_name: 'Neofiles::File'
10
+ # Mongoid bug: if you set `file_id` but not `file`, it still thinks the relation is missing and fails validation,
11
+ # so setting `optional: true` explicitly
12
+ belongs_to :file, class_name: 'Neofiles::File', optional: true
11
13
 
12
14
  field :n, type: Integer, default: 0 # что это за поле?
13
15
  field :data, type: BSON::Binary
@@ -1,3 +1,3 @@
1
1
  module Neofiles
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neofiles
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konanykhin Ilya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-20 00:00:00.000000000 Z
11
+ date: 2018-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails