glebtv-carrierwave-mongoid 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/Gemfile.lock +62 -0
- data/glebtv-carrierwave-mongoid.gemspec +1 -1
- data/lib/carrierwave/mongoid/version.rb +1 -1
- data/spec/mongoid_spec.rb +3 -3
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbd60f05a7533ed96fddf1fc24e0159a79955335
|
4
|
+
data.tar.gz: a9041cb0e401390898142b87d002c65a421b0f2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31c9fc58cdd7907e262a4058f34b303b0940f4ce55696842776ced70a2ab6406e1d0fd3b5245204e505d79b36a18332971a7a6ac4543cdac3a6e305a49a3f681
|
7
|
+
data.tar.gz: 4070fe3b4352f0ee5347ccd3cc617ab25ea1844bf39107499ce2181cb2682440e0f1970356a211a0f9efb9b1b1cb1ad9192a7118bf5cc5e7d7e096b15898dd28
|
data/.gitignore
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
glebtv-carrierwave-mongoid (0.6.1)
|
5
|
+
carrierwave (~> 0.9.0)
|
6
|
+
mongoid (>= 3.0, < 5.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activemodel (3.2.13)
|
12
|
+
activesupport (= 3.2.13)
|
13
|
+
builder (~> 3.0.0)
|
14
|
+
activesupport (3.2.13)
|
15
|
+
i18n (= 0.6.1)
|
16
|
+
multi_json (~> 1.0)
|
17
|
+
builder (3.0.4)
|
18
|
+
carrierwave (0.9.0)
|
19
|
+
activemodel (>= 3.2.0)
|
20
|
+
activesupport (>= 3.2.0)
|
21
|
+
json (>= 1.7)
|
22
|
+
coderay (1.0.9)
|
23
|
+
diff-lcs (1.2.4)
|
24
|
+
i18n (0.6.1)
|
25
|
+
json (1.8.0)
|
26
|
+
method_source (0.8.1)
|
27
|
+
mini_magick (3.6.0)
|
28
|
+
subexec (~> 0.2.1)
|
29
|
+
mongoid (3.1.4)
|
30
|
+
activemodel (~> 3.2)
|
31
|
+
moped (~> 1.4)
|
32
|
+
origin (~> 1.0)
|
33
|
+
tzinfo (~> 0.3.22)
|
34
|
+
moped (1.5.0)
|
35
|
+
multi_json (1.7.7)
|
36
|
+
origin (1.1.0)
|
37
|
+
pry (0.9.12.2)
|
38
|
+
coderay (~> 1.0.5)
|
39
|
+
method_source (~> 0.8)
|
40
|
+
slop (~> 3.4)
|
41
|
+
rake (10.1.0)
|
42
|
+
rspec (2.14.0)
|
43
|
+
rspec-core (~> 2.14.0)
|
44
|
+
rspec-expectations (~> 2.14.0)
|
45
|
+
rspec-mocks (~> 2.14.0)
|
46
|
+
rspec-core (2.14.0)
|
47
|
+
rspec-expectations (2.14.0)
|
48
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
49
|
+
rspec-mocks (2.14.1)
|
50
|
+
slop (3.4.5)
|
51
|
+
subexec (0.2.3)
|
52
|
+
tzinfo (0.3.37)
|
53
|
+
|
54
|
+
PLATFORMS
|
55
|
+
ruby
|
56
|
+
|
57
|
+
DEPENDENCIES
|
58
|
+
glebtv-carrierwave-mongoid!
|
59
|
+
mini_magick
|
60
|
+
pry
|
61
|
+
rake (~> 10.0)
|
62
|
+
rspec (~> 2.6)
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
s.add_dependency "carrierwave", ["~> 0.
|
21
|
+
s.add_dependency "carrierwave", ["~> 0.9.0"]
|
22
22
|
s.add_dependency "mongoid", [">= 3.0", "< 5.0"]
|
23
23
|
s.add_development_dependency "rspec", ["~> 2.6"]
|
24
24
|
s.add_development_dependency "rake", ["~> 10.0"]
|
data/spec/mongoid_spec.rb
CHANGED
@@ -396,7 +396,7 @@ describe CarrierWave::Mongoid do
|
|
396
396
|
end
|
397
397
|
|
398
398
|
it "should not remove old file if old file had a different path but config is false" do
|
399
|
-
@uploader.stub
|
399
|
+
@uploader.stub(:remove_previously_stored_files_after_update).and_return(false)
|
400
400
|
@doc.image = stub_file('new.jpeg')
|
401
401
|
@doc.save.should be_true
|
402
402
|
File.exists?(public_path('uploads/new.jpeg')).should be_true
|
@@ -456,7 +456,7 @@ describe CarrierWave::Mongoid do
|
|
456
456
|
end
|
457
457
|
|
458
458
|
it "should not remove old file if old file had a different path but config is false" do
|
459
|
-
@embedded_doc.image.stub
|
459
|
+
@embedded_doc.image.stub(:remove_previously_stored_files_after_update).and_return(false)
|
460
460
|
@embedded_doc.image = stub_file('new.jpeg')
|
461
461
|
@embedded_doc.save.should be_true
|
462
462
|
File.exists?(public_path('uploads/new.jpeg')).should be_true
|
@@ -494,7 +494,7 @@ describe CarrierWave::Mongoid do
|
|
494
494
|
end
|
495
495
|
|
496
496
|
it "should not remove old file if old file had a different path but config is false" do
|
497
|
-
@double_embedded_doc.image.stub
|
497
|
+
@double_embedded_doc.image.stub(:remove_previously_stored_files_after_update).and_return(false)
|
498
498
|
@double_embedded_doc.image = stub_file('new.jpeg')
|
499
499
|
@double_embedded_doc.save.should be_true
|
500
500
|
File.exists?(public_path('uploads/new.jpeg')).should be_true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glebtv-carrierwave-mongoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GlebTv
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-07-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: carrierwave
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.9.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - ~>
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.9.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: mongoid
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,6 +113,7 @@ files:
|
|
113
113
|
- .ruby-gemset
|
114
114
|
- .travis.yml
|
115
115
|
- Gemfile
|
116
|
+
- Gemfile.lock
|
116
117
|
- LICENSE
|
117
118
|
- README.md
|
118
119
|
- Rakefile
|