carrierwave-mongoid 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.md +41 -18
- data/carrierwave-mongoid.gemspec +5 -4
- data/lib/carrierwave/mongoid.rb +5 -15
- data/lib/carrierwave/mongoid/version.rb +1 -1
- data/lib/carrierwave/storage/grid_fs.rb +28 -48
- data/spec/mongoid_spec.rb +16 -29
- data/spec/spec_helper.rb +11 -4
- data/spec/storage/grid_fs_spec.rb +14 -32
- metadata +45 -29
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,35 +1,45 @@
|
|
1
1
|
# CarrierWave for Mongoid
|
2
2
|
|
3
|
-
This gem adds support for Mongoid and MongoDB's GridFS to
|
3
|
+
This gem adds support for Mongoid and MongoDB's GridFS to
|
4
|
+
[CarrierWave](https://github.com/jnicklas/carrierwave/)
|
4
5
|
|
5
|
-
This functionality used to be part of CarrierWave but has since been extracted
|
6
|
+
This functionality used to be part of CarrierWave but has since been extracted
|
7
|
+
into this gem.
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
11
|
+
Install the latest release:
|
12
|
+
|
9
13
|
gem install carrierwave-mongoid
|
10
14
|
|
11
|
-
|
15
|
+
Require it in your code:
|
12
16
|
|
13
17
|
require 'carrierwave/mongoid'
|
14
18
|
|
15
|
-
|
19
|
+
Or, in Rails you can add it to your Gemfile:
|
16
20
|
|
17
21
|
gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'
|
18
22
|
|
19
|
-
##
|
23
|
+
## Getting Started
|
20
24
|
|
21
|
-
|
25
|
+
Follow the "Getting Started" directions in the main
|
26
|
+
[Carrierwave repository](https://raw.github.com/jnicklas/carrierwave/).
|
22
27
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
28
|
+
[Suggested] Add the field to your attr_accessor list for mass assignment
|
29
|
+
protection:
|
30
|
+
|
31
|
+
attr_accessible :avatar, :avatar_cache
|
32
|
+
|
33
|
+
Now you can cache files by assigning them to the attribute; they will
|
34
|
+
automatically be stored when the record is saved. Ex:
|
29
35
|
|
30
|
-
|
36
|
+
u = User.new
|
37
|
+
u.avatar = File.open('somewhere')
|
38
|
+
u.save!
|
31
39
|
|
32
|
-
|
40
|
+
## Using MongoDB's GridFS store
|
41
|
+
|
42
|
+
In your uploader, set the storage to `:grid_fs`:
|
33
43
|
|
34
44
|
```ruby
|
35
45
|
class AvatarUploader < CarrierWave::Uploader::Base
|
@@ -39,18 +49,31 @@ end
|
|
39
49
|
|
40
50
|
Since GridFS doesn't make the files available via HTTP, you'll need to stream
|
41
51
|
them yourself. In Rails for example, you could use the `send_data` method. You
|
42
|
-
can tell CarrierWave the URL you will serve your images from,
|
43
|
-
generate the correct URL, by setting eg:
|
52
|
+
can optionally tell CarrierWave the URL you will serve your images from,
|
53
|
+
allowing it to generate the correct URL, by setting eg:
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
CarrierWave.configure do |config|
|
57
|
+
config.grid_fs_access_url = "/systems/uploads"
|
58
|
+
end
|
59
|
+
```
|
60
|
+
|
61
|
+
Bringing it all together, you can also configure Carrierwave to use Mongoid's
|
62
|
+
database connection and default all storage to GridFS. That might look something
|
63
|
+
like this:
|
44
64
|
|
45
65
|
```ruby
|
46
66
|
CarrierWave.configure do |config|
|
47
|
-
config.
|
67
|
+
config.grid_fs_connection = Mongoid.database
|
68
|
+
config.storage = :grid_fs
|
69
|
+
config.root = Rails.root.join('tmp')
|
70
|
+
config.cache_dir = "uploads"
|
48
71
|
end
|
49
72
|
```
|
50
73
|
|
51
74
|
## Version differences
|
52
75
|
|
53
|
-
### 0.2.
|
76
|
+
### 0.2.x
|
54
77
|
|
55
78
|
carrierwave-mongoid ~> 0.2.0 is only compatible with Rails 3.2 or higher.
|
56
79
|
|
data/carrierwave-mongoid.gemspec
CHANGED
@@ -19,10 +19,11 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.add_dependency "carrierwave", ["~> 0.
|
23
|
-
s.add_dependency "mongoid", ["~>
|
22
|
+
s.add_dependency "carrierwave", ["~> 0.7.1"]
|
23
|
+
s.add_dependency "mongoid", ["~> 3.0"]
|
24
|
+
s.add_dependency "mongoid-grid_fs", ["~> 1.3"]
|
24
25
|
s.add_development_dependency "rspec", ["~> 2.6"]
|
25
|
-
s.add_development_dependency "
|
26
|
-
s.add_development_dependency "rake", ["~> 0.9"]
|
26
|
+
s.add_development_dependency "rake", ["~> 10.0"]
|
27
27
|
s.add_development_dependency "mini_magick"
|
28
|
+
s.add_development_dependency "pry"
|
28
29
|
end
|
data/lib/carrierwave/mongoid.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
require 'mongoid'
|
4
|
+
require 'mongoid-grid_fs'
|
4
5
|
require 'carrierwave'
|
5
6
|
require 'carrierwave/validations/active_model'
|
6
7
|
|
@@ -38,10 +39,6 @@ module CarrierWave
|
|
38
39
|
super
|
39
40
|
end
|
40
41
|
|
41
|
-
def remove_#{column}!
|
42
|
-
super unless paranoid? && flagged_for_destroy?
|
43
|
-
end
|
44
|
-
|
45
42
|
# Overrides Mongoid's default dirty behavior to instead work more like
|
46
43
|
# ActiveRecord's. Mongoid doesn't deem an attribute as changed unless
|
47
44
|
# the new value is different than the original. Given that CarrierWave
|
@@ -60,14 +57,16 @@ module CarrierWave
|
|
60
57
|
association = ancestors.inject(reloaded_parent) { |parent,(key,ancestor)| (parent.is_a?(Array) ? parent.find(ancestor.to_key.first) : parent).send(key) }
|
61
58
|
association.is_a?(Array) ? association.find(to_key.first) : association
|
62
59
|
else
|
63
|
-
self.class.unscoped.
|
60
|
+
self.class.unscoped.for_ids(to_key).first
|
64
61
|
end
|
65
62
|
end
|
66
63
|
|
67
64
|
def serializable_hash(options=nil)
|
68
65
|
hash = {}
|
69
66
|
self.class.uploaders.each do |column, uploader|
|
70
|
-
|
67
|
+
if (!options[:only] && !options[:except]) || (options[:only] && options[:only].include?(column)) || (options[:except] && !options[:except].include?(column))
|
68
|
+
hash[column.to_s] = _mounter(:#{column}).uploader.serializable_hash
|
69
|
+
end
|
71
70
|
end
|
72
71
|
super(options).merge(hash)
|
73
72
|
end
|
@@ -79,19 +78,10 @@ end # CarrierWave
|
|
79
78
|
CarrierWave::Storage.autoload :GridFS, 'carrierwave/storage/grid_fs'
|
80
79
|
|
81
80
|
class CarrierWave::Uploader::Base
|
82
|
-
add_config :grid_fs_connection
|
83
|
-
add_config :grid_fs_database
|
84
|
-
add_config :grid_fs_host
|
85
|
-
add_config :grid_fs_port
|
86
|
-
add_config :grid_fs_username
|
87
|
-
add_config :grid_fs_password
|
88
81
|
add_config :grid_fs_access_url
|
89
82
|
|
90
83
|
configure do |config|
|
91
84
|
config.storage_engines[:grid_fs] = "CarrierWave::Storage::GridFS"
|
92
|
-
config.grid_fs_database = "carrierwave"
|
93
|
-
config.grid_fs_host = "localhost"
|
94
|
-
config.grid_fs_port = 27017
|
95
85
|
end
|
96
86
|
end
|
97
87
|
|
@@ -1,5 +1,4 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
require 'mongo'
|
3
2
|
|
4
3
|
module CarrierWave
|
5
4
|
module Storage
|
@@ -7,42 +6,29 @@ module CarrierWave
|
|
7
6
|
##
|
8
7
|
# The GridFS store uses MongoDB's GridStore file storage system to store files
|
9
8
|
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
# Creating a connection looks something like this:
|
9
|
+
# When you already have a Mongo connection object (for example through Mongoid)
|
10
|
+
# you can also reuse this connection:
|
14
11
|
#
|
15
12
|
# CarrierWave.configure do |config|
|
16
13
|
# config.storage = :grid_fs
|
17
|
-
# config.
|
18
|
-
# config.grid_fs_port = "27017"
|
19
|
-
# config.grid_fs_database = "your_dbs_app_name"
|
20
|
-
# config.grid_fs_username = "user"
|
21
|
-
# config.grid_fs_password = "verysecret"
|
22
|
-
# config.grid_fs_access_url = "/images"
|
14
|
+
# config.grid_fs_access_url = "/system/uploads"
|
23
15
|
# end
|
24
16
|
#
|
25
17
|
# In the above example your documents url will look like:
|
26
18
|
#
|
27
|
-
# http://your-app.com/
|
28
|
-
#
|
29
|
-
# When you already have a Mongo connection object (for example through Mongoid)
|
30
|
-
# you can also reuse this connection:
|
31
|
-
#
|
32
|
-
# CarrierWave.configure do |config|
|
33
|
-
# config.storage = :grid_fs
|
34
|
-
# config.grid_fs_connection = Mongoid.database
|
35
|
-
# config.grid_fs_access_url = "/images"
|
36
|
-
# end
|
19
|
+
# http://your-app.com/system/uploads/:document-identifier-here
|
37
20
|
#
|
38
21
|
class GridFS < Abstract
|
39
22
|
|
40
23
|
class File
|
41
24
|
attr_reader :path
|
25
|
+
attr_reader :uploader
|
26
|
+
attr_reader :grid_file
|
42
27
|
|
43
28
|
def initialize(uploader, path)
|
44
29
|
@path = path
|
45
30
|
@uploader = uploader
|
31
|
+
@grid_file = nil
|
46
32
|
end
|
47
33
|
|
48
34
|
def url
|
@@ -53,48 +39,42 @@ module CarrierWave
|
|
53
39
|
end
|
54
40
|
end
|
55
41
|
|
56
|
-
def
|
57
|
-
grid
|
42
|
+
def grid_file(&block)
|
43
|
+
@grid_file ||= grid[path]
|
58
44
|
end
|
59
45
|
|
60
46
|
def write(file)
|
61
|
-
grid
|
62
|
-
|
63
|
-
|
47
|
+
grid[@uploader.store_path] = file
|
48
|
+
ensure
|
49
|
+
@grid_file = nil
|
64
50
|
end
|
65
51
|
|
66
|
-
def
|
67
|
-
|
52
|
+
def read
|
53
|
+
grid_file.data if grid_file
|
68
54
|
end
|
69
55
|
|
70
|
-
|
71
|
-
|
56
|
+
%w( delete content_type length ).each do |method|
|
57
|
+
class_eval <<-__, __FILE__, __LINE__
|
58
|
+
def #{ method }
|
59
|
+
grid_file.#{ method } if grid_file
|
60
|
+
end
|
61
|
+
__
|
72
62
|
end
|
73
63
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
alias :size :file_length
|
64
|
+
alias :content_length :length
|
65
|
+
alias :file_length :length
|
66
|
+
alias :size :length
|
78
67
|
|
79
68
|
protected
|
80
|
-
|
81
|
-
|
82
|
-
@connection ||= @uploader.grid_fs_connection || begin
|
83
|
-
host = @uploader.grid_fs_host
|
84
|
-
port = @uploader.grid_fs_port
|
85
|
-
database = @uploader.grid_fs_database
|
86
|
-
username = @uploader.grid_fs_username
|
87
|
-
password = @uploader.grid_fs_password
|
88
|
-
db = Mongo::Connection.new(host, port).db(database)
|
89
|
-
db.authenticate(username, password) if username && password
|
90
|
-
db
|
91
|
-
end
|
69
|
+
class << File
|
70
|
+
attr_accessor :grid
|
92
71
|
end
|
93
72
|
|
73
|
+
self.grid = ::Mongoid::GridFS
|
74
|
+
|
94
75
|
def grid
|
95
|
-
|
76
|
+
self.class.grid
|
96
77
|
end
|
97
|
-
|
98
78
|
end
|
99
79
|
|
100
80
|
##
|
data/spec/mongoid_spec.rb
CHANGED
@@ -6,7 +6,7 @@ require 'carrierwave/mongoid'
|
|
6
6
|
def reset_mongo_class(uploader = MongoUploader)
|
7
7
|
define_mongo_class('MongoUser') do
|
8
8
|
include Mongoid::Document
|
9
|
-
store_in :users
|
9
|
+
store_in :collection => 'users'
|
10
10
|
field :folder, :default => ''
|
11
11
|
mount_uploader :image, uploader
|
12
12
|
end
|
@@ -45,7 +45,7 @@ end
|
|
45
45
|
describe CarrierWave::Mongoid do
|
46
46
|
|
47
47
|
after do
|
48
|
-
MongoUser.collection.drop
|
48
|
+
MongoUser.collection.drop if MongoUser.count > 0
|
49
49
|
end
|
50
50
|
|
51
51
|
describe '#image' do
|
@@ -121,6 +121,20 @@ describe CarrierWave::Mongoid do
|
|
121
121
|
JSON.parse({:data => @doc.image}.to_json).should == {"data"=>{"image"=>{"url"=>"/uploads/test.jpeg"}}}
|
122
122
|
end
|
123
123
|
|
124
|
+
it "should respect options[:only] when passed to to_json for the serializable hash" do
|
125
|
+
@doc[:image] = 'test.jpeg'
|
126
|
+
@doc.save!
|
127
|
+
@doc.reload
|
128
|
+
JSON.parse(@doc.to_json({:only => [:_id]})).should == {"_id" => @doc.id.to_s}
|
129
|
+
end
|
130
|
+
|
131
|
+
it "should respect options[:except] when passed to to_json for the serializable hash" do
|
132
|
+
@doc[:image] = 'test.jpeg'
|
133
|
+
@doc.save!
|
134
|
+
@doc.reload
|
135
|
+
|
136
|
+
JSON.parse(@doc.to_json({:except => [:_id, :image]})).should == {"folder" => ""}
|
137
|
+
end
|
124
138
|
|
125
139
|
end
|
126
140
|
|
@@ -751,31 +765,4 @@ describe CarrierWave::Mongoid do
|
|
751
765
|
end
|
752
766
|
end
|
753
767
|
|
754
|
-
describe "with paranoia enabled" do
|
755
|
-
before do
|
756
|
-
@class = reset_mongo_class
|
757
|
-
@class.collection.drop
|
758
|
-
@class.class_eval do
|
759
|
-
include Mongoid::Paranoia
|
760
|
-
end
|
761
|
-
|
762
|
-
@doc = @class.new(image: stub_file("old.jpeg"))
|
763
|
-
@doc.save.should be_true
|
764
|
-
end
|
765
|
-
|
766
|
-
it "should not remove underlying image after #destroy" do
|
767
|
-
@doc.destroy.should be_true
|
768
|
-
@class.count.should eql(0)
|
769
|
-
@class.deleted.count.should eql(1)
|
770
|
-
File.exist?(public_path('uploads/old.jpeg')).should be_true
|
771
|
-
end
|
772
|
-
|
773
|
-
it "should remove underlying image after #destroy!" do
|
774
|
-
@doc.destroy!.should be_true
|
775
|
-
@class.count.should eql(0)
|
776
|
-
@class.deleted.count.should eql(0)
|
777
|
-
File.exist?(public_path('uploads/old.jpeg')).should be_false
|
778
|
-
end
|
779
|
-
end
|
780
|
-
|
781
768
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -2,15 +2,13 @@ require 'rubygems'
|
|
2
2
|
require 'bundler/setup'
|
3
3
|
require 'rspec'
|
4
4
|
require 'tempfile'
|
5
|
+
require 'stringio'
|
5
6
|
|
6
7
|
require 'carrierwave'
|
7
8
|
require 'carrierwave/mongoid'
|
8
9
|
|
9
10
|
Mongoid.configure do |config|
|
10
|
-
|
11
|
-
config.logger = logger
|
12
|
-
config.master = Mongo::Connection.new('localhost', 27017,
|
13
|
-
:logger => logger).db('carrierwave_test')
|
11
|
+
config.connect_to('carrierwave_test')
|
14
12
|
end
|
15
13
|
|
16
14
|
def file_path( *paths )
|
@@ -61,6 +59,15 @@ module CarrierWave
|
|
61
59
|
end
|
62
60
|
end
|
63
61
|
|
62
|
+
class SIO < StringIO
|
63
|
+
attr_accessor :filename
|
64
|
+
|
65
|
+
def initialize(filename, *args, &block)
|
66
|
+
@filename = filename
|
67
|
+
super(*args, &block)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
64
71
|
RSpec.configure do |config|
|
65
72
|
config.include CarrierWave::Test::MockFiles
|
66
73
|
config.include CarrierWave::Test::I18nHelpers
|
@@ -1,7 +1,8 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
|
3
4
|
require 'spec_helper'
|
4
|
-
|
5
|
+
|
5
6
|
|
6
7
|
shared_examples_for "a GridFS connection" do
|
7
8
|
describe '#store!' do
|
@@ -11,7 +12,11 @@ shared_examples_for "a GridFS connection" do
|
|
11
12
|
end
|
12
13
|
|
13
14
|
it "should upload the file to gridfs" do
|
14
|
-
@grid
|
15
|
+
@grid['uploads/bar.txt'].data.should == 'this is stuff'
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should upload the file to gridfs" do
|
19
|
+
@grid['uploads/bar.txt'].data.should == 'this is stuff'
|
15
20
|
end
|
16
21
|
|
17
22
|
it "should have the same path that it was stored as" do
|
@@ -28,11 +33,11 @@ shared_examples_for "a GridFS connection" do
|
|
28
33
|
|
29
34
|
it "should be deletable" do
|
30
35
|
@grid_fs_file.delete
|
31
|
-
|
36
|
+
@grid['uploads/bar.txt'].should be_nil
|
32
37
|
end
|
33
38
|
|
34
39
|
it "should store the content type on GridFS" do
|
35
|
-
@grid_fs_file.content_type.should == '
|
40
|
+
@grid_fs_file.content_type.should == 'text/plain'
|
36
41
|
end
|
37
42
|
|
38
43
|
it "should have a file length" do
|
@@ -42,7 +47,8 @@ shared_examples_for "a GridFS connection" do
|
|
42
47
|
|
43
48
|
describe '#retrieve!' do
|
44
49
|
before do
|
45
|
-
@grid.
|
50
|
+
@grid.clear
|
51
|
+
@grid['uploads/bar.txt'] = StringIO.new('A test, 1234')
|
46
52
|
@uploader.stub!(:store_path).with('bar.txt').and_return('uploads/bar.txt')
|
47
53
|
@grid_fs_file = @storage.retrieve!('bar.txt')
|
48
54
|
end
|
@@ -76,8 +82,7 @@ shared_examples_for "a GridFS connection" do
|
|
76
82
|
|
77
83
|
it "should be deletable" do
|
78
84
|
@grid_fs_file.delete
|
79
|
-
|
80
|
-
|
85
|
+
@grid['uploads/bar.txt'].should be_nil
|
81
86
|
end
|
82
87
|
end
|
83
88
|
|
@@ -98,8 +103,6 @@ end
|
|
98
103
|
describe CarrierWave::Storage::GridFS do
|
99
104
|
|
100
105
|
before do
|
101
|
-
@database = Mongo::Connection.new('localhost', 27017).db('carrierwave_test')
|
102
|
-
|
103
106
|
@uploader = mock('an uploader')
|
104
107
|
@uploader.stub!(:grid_fs_access_url).and_return(nil)
|
105
108
|
end
|
@@ -108,7 +111,7 @@ describe CarrierWave::Storage::GridFS do
|
|
108
111
|
before do
|
109
112
|
@uploader.stub!(:grid_fs_connection).and_return(@database)
|
110
113
|
|
111
|
-
@grid =
|
114
|
+
@grid = ::Mongoid::GridFs
|
112
115
|
|
113
116
|
@storage = CarrierWave::Storage::GridFS.new(@uploader)
|
114
117
|
@file = stub_tempfile('test.jpg', 'application/xml')
|
@@ -130,7 +133,6 @@ describe CarrierWave::Storage::GridFS do
|
|
130
133
|
}
|
131
134
|
|
132
135
|
@versioned = @uploader_class.new
|
133
|
-
@versioned.stub!(:grid_fs_connection).and_return(@database)
|
134
136
|
|
135
137
|
@versioned.store! File.open(file_path('portrait.jpg'))
|
136
138
|
end
|
@@ -157,7 +159,6 @@ describe CarrierWave::Storage::GridFS do
|
|
157
159
|
}
|
158
160
|
|
159
161
|
@versioned = @uploader_class.new
|
160
|
-
@versioned.stub!(:grid_fs_connection).and_return(@database)
|
161
162
|
|
162
163
|
@versioned.store! File.open(file_path('portrait.jpg'))
|
163
164
|
end
|
@@ -175,26 +176,7 @@ describe CarrierWave::Storage::GridFS do
|
|
175
176
|
end
|
176
177
|
end
|
177
178
|
|
178
|
-
context "when setting a connection manually" do
|
179
|
-
before do
|
180
|
-
@uploader.stub!(:grid_fs_database).and_return("carrierwave_test")
|
181
|
-
@uploader.stub!(:grid_fs_host).and_return("localhost")
|
182
|
-
@uploader.stub!(:grid_fs_port).and_return(27017)
|
183
|
-
@uploader.stub!(:grid_fs_username).and_return(nil)
|
184
|
-
@uploader.stub!(:grid_fs_password).and_return(nil)
|
185
|
-
@uploader.stub!(:grid_fs_connection).and_return(nil)
|
186
|
-
|
187
|
-
@grid = Mongo::GridFileSystem.new(@database)
|
188
|
-
|
189
|
-
@storage = CarrierWave::Storage::GridFS.new(@uploader)
|
190
|
-
@file = stub_tempfile('test.jpg', 'application/xml')
|
191
|
-
end
|
192
|
-
|
193
|
-
it_should_behave_like "a GridFS connection"
|
194
|
-
end
|
195
|
-
|
196
179
|
after do
|
197
|
-
@grid.
|
180
|
+
@grid.clear
|
198
181
|
end
|
199
|
-
|
200
182
|
end
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave-mongoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.2
|
5
4
|
prerelease:
|
5
|
+
version: 0.3.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jonas Nicklas
|
@@ -10,104 +10,120 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2012-12-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
+
type: :runtime
|
17
|
+
version_requirements: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.7.1
|
16
23
|
name: carrierwave
|
24
|
+
prerelease: false
|
17
25
|
requirement: !ruby/object:Gem::Requirement
|
18
26
|
none: false
|
19
27
|
requirements:
|
20
28
|
- - ~>
|
21
29
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
30
|
+
version: 0.7.1
|
31
|
+
- !ruby/object:Gem::Dependency
|
23
32
|
type: :runtime
|
24
|
-
prerelease: false
|
25
33
|
version_requirements: !ruby/object:Gem::Requirement
|
26
34
|
none: false
|
27
35
|
requirements:
|
28
36
|
- - ~>
|
29
37
|
- !ruby/object:Gem::Version
|
30
|
-
version: 0
|
31
|
-
- !ruby/object:Gem::Dependency
|
38
|
+
version: '3.0'
|
32
39
|
name: mongoid
|
40
|
+
prerelease: false
|
33
41
|
requirement: !ruby/object:Gem::Requirement
|
34
42
|
none: false
|
35
43
|
requirements:
|
36
44
|
- - ~>
|
37
45
|
- !ruby/object:Gem::Version
|
38
|
-
version: '
|
46
|
+
version: '3.0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
39
48
|
type: :runtime
|
40
|
-
prerelease: false
|
41
49
|
version_requirements: !ruby/object:Gem::Requirement
|
42
50
|
none: false
|
43
51
|
requirements:
|
44
52
|
- - ~>
|
45
53
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
47
|
-
-
|
48
|
-
|
54
|
+
version: '1.3'
|
55
|
+
name: mongoid-grid_fs
|
56
|
+
prerelease: false
|
49
57
|
requirement: !ruby/object:Gem::Requirement
|
50
58
|
none: false
|
51
59
|
requirements:
|
52
60
|
- - ~>
|
53
61
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
62
|
+
version: '1.3'
|
63
|
+
- !ruby/object:Gem::Dependency
|
55
64
|
type: :development
|
56
|
-
prerelease: false
|
57
65
|
version_requirements: !ruby/object:Gem::Requirement
|
58
66
|
none: false
|
59
67
|
requirements:
|
60
68
|
- - ~>
|
61
69
|
- !ruby/object:Gem::Version
|
62
70
|
version: '2.6'
|
63
|
-
|
64
|
-
|
71
|
+
name: rspec
|
72
|
+
prerelease: false
|
65
73
|
requirement: !ruby/object:Gem::Requirement
|
66
74
|
none: false
|
67
75
|
requirements:
|
68
76
|
- - ~>
|
69
77
|
- !ruby/object:Gem::Version
|
70
|
-
version: '
|
78
|
+
version: '2.6'
|
79
|
+
- !ruby/object:Gem::Dependency
|
71
80
|
type: :development
|
72
|
-
prerelease: false
|
73
81
|
version_requirements: !ruby/object:Gem::Requirement
|
74
82
|
none: false
|
75
83
|
requirements:
|
76
84
|
- - ~>
|
77
85
|
- !ruby/object:Gem::Version
|
78
|
-
version: '
|
79
|
-
- !ruby/object:Gem::Dependency
|
86
|
+
version: '10.0'
|
80
87
|
name: rake
|
88
|
+
prerelease: false
|
81
89
|
requirement: !ruby/object:Gem::Requirement
|
82
90
|
none: false
|
83
91
|
requirements:
|
84
92
|
- - ~>
|
85
93
|
- !ruby/object:Gem::Version
|
86
|
-
version: '0
|
94
|
+
version: '10.0'
|
95
|
+
- !ruby/object:Gem::Dependency
|
87
96
|
type: :development
|
88
|
-
prerelease: false
|
89
97
|
version_requirements: !ruby/object:Gem::Requirement
|
90
98
|
none: false
|
91
99
|
requirements:
|
92
|
-
- -
|
100
|
+
- - ! '>='
|
93
101
|
- !ruby/object:Gem::Version
|
94
|
-
version: '0
|
95
|
-
- !ruby/object:Gem::Dependency
|
102
|
+
version: '0'
|
96
103
|
name: mini_magick
|
104
|
+
prerelease: false
|
97
105
|
requirement: !ruby/object:Gem::Requirement
|
98
106
|
none: false
|
99
107
|
requirements:
|
100
108
|
- - ! '>='
|
101
109
|
- !ruby/object:Gem::Version
|
102
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
103
112
|
type: :development
|
104
|
-
prerelease: false
|
105
113
|
version_requirements: !ruby/object:Gem::Requirement
|
106
114
|
none: false
|
107
115
|
requirements:
|
108
116
|
- - ! '>='
|
109
117
|
- !ruby/object:Gem::Version
|
110
118
|
version: '0'
|
119
|
+
name: pry
|
120
|
+
prerelease: false
|
121
|
+
requirement: !ruby/object:Gem::Requirement
|
122
|
+
none: false
|
123
|
+
requirements:
|
124
|
+
- - ! '>='
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
111
127
|
description: Mongoid support for CarrierWave
|
112
128
|
email:
|
113
129
|
- jonas.nicklas@gmail.com
|
@@ -146,19 +162,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
146
162
|
requirements:
|
147
163
|
- - ! '>='
|
148
164
|
- !ruby/object:Gem::Version
|
149
|
-
version: '0'
|
150
165
|
segments:
|
151
166
|
- 0
|
152
|
-
hash:
|
167
|
+
hash: 177635873472418624
|
168
|
+
version: '0'
|
153
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
170
|
none: false
|
155
171
|
requirements:
|
156
172
|
- - ! '>='
|
157
173
|
- !ruby/object:Gem::Version
|
158
|
-
version: '0'
|
159
174
|
segments:
|
160
175
|
- 0
|
161
|
-
hash:
|
176
|
+
hash: 177635873472418624
|
177
|
+
version: '0'
|
162
178
|
requirements: []
|
163
179
|
rubyforge_project: carrierwave-mongoid
|
164
180
|
rubygems_version: 1.8.23
|