shrine-mongoid 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shrine/plugins/mongoid.rb +0 -8
- data/shrine-mongoid.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb9eace795910cfeb6f228ed000a2179b9099c6f
|
4
|
+
data.tar.gz: a276da5a7410745fedc9e357a3c3614863b1dbff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5357e2df11cf21318d440c1470743b4b8bb3d534c7e2878825265149bc6a1c158dd74780a12d75d006682b2b6013eccd756f164544bf42012c29d39de77d0b5a
|
7
|
+
data.tar.gz: 38eb05b9b1fbb2d2ef29e9414f94a024d8f092e7baec1ccc9ac61cab88cfd590246f95facb606f474e96c724d9e773a91b4c072f41124db9b7ed9c7ba297884c
|
@@ -50,14 +50,6 @@ class Shrine
|
|
50
50
|
end
|
51
51
|
|
52
52
|
module AttacherMethods
|
53
|
-
# Updates the current attachment with the new one, unless the current
|
54
|
-
# attachment has changed.
|
55
|
-
def swap(uploaded_file)
|
56
|
-
return if record.send(:"#{name}_data") != record.reload.send(:"#{name}_data")
|
57
|
-
super
|
58
|
-
rescue ::Mongoid::Errors::DocumentNotFound
|
59
|
-
end
|
60
|
-
|
61
53
|
private
|
62
54
|
|
63
55
|
# We save the record after updating, raising any validation errors.
|
data/shrine-mongoid.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = "shrine-mongoid"
|
3
|
-
gem.version = "0.2.
|
3
|
+
gem.version = "0.2.3"
|
4
4
|
|
5
5
|
gem.required_ruby_version = ">= 2.1"
|
6
6
|
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.files = Dir["README.md", "LICENSE.txt", "lib/**/*.rb", "*.gemspec"]
|
14
14
|
gem.require_path = "lib"
|
15
15
|
|
16
|
-
gem.add_dependency "shrine", "~> 2.
|
16
|
+
gem.add_dependency "shrine", "~> 2.3"
|
17
17
|
gem.add_dependency "mongoid", ">= 5.0"
|
18
18
|
|
19
19
|
gem.add_development_dependency "shrine-memory"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shrine-mongoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shrine
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mongoid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|