mongo_grid 0.3.2 → 0.3.3

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
  SHA256:
3
- metadata.gz: c42026cd4f2ab5d3db730232e16153bd5b31b12f36141cf651167721db7ba690
4
- data.tar.gz: e0c84b720b506bd29adb4fe797ee3d5687eeabadd4656e07c43cdccea88d08f3
3
+ metadata.gz: 426e3942961accd764ebd0ca12fa3c52865a870d2848696794d715894fa486ec
4
+ data.tar.gz: f26eef496b519d4d8813f8b540b59d5542c9cbedcf3845f1773d41c41a62e734
5
5
  SHA512:
6
- metadata.gz: 9b5de261aa2431fec70b95841a2aa5f542982acd6f7847f5f8b554cf917e2ad4057aa71859d0295a1dfafdac6e11e056368f9f4445a9078cc5bf44a454a416a1
7
- data.tar.gz: 799283efc40f100bf852fd6e33cdb6a737dbebda6e82ef1b448ca85bf967cc026591af6dd46b728fcce53fb99e727d61c8da63f197a804d916b225808048cfc9
6
+ metadata.gz: dd0ed2f026ffe6f7b0c2c87ad091578a1d70b00aefa428654668926c36de3ecc21d600b821ccccbc17e3039ac88c486041b22636a29a7b797b06006ff0a58dbb
7
+ data.tar.gz: bb3896ed2014bf2435932d7c3d8df570626175ee831c080a30d6138258d9156580f64511d9e7ba2d5c6aaa2bbfd526c1602ff43cdce4e4ff7caa540c42ec93c1
data/lib/mongo_grid.rb CHANGED
@@ -36,14 +36,13 @@ module ::MongoGrid
36
36
  def uploadtogrid(upload,opts={})
37
37
  filename=upload.original_filename
38
38
  content_type=upload.content_type
39
- if /jpg|jpeg|png/ =~ content_type
40
- if opts[:width]
41
- %x[resize -fixed -w #{opts[:width]} #{upload.tempfile.path}]
42
- else
43
- %x[resize -fixed #{upload.tempfile.path}]
44
- end
45
-
46
- end
39
+ #if /jpg|jpeg|png/ =~ content_type
40
+ # if opts[:width]
41
+ # %x[resize -fixed -w #{opts[:width]} #{upload.tempfile.path}]
42
+ # else
43
+ # %x[resize -fixed #{upload.tempfile.path}]
44
+ # end
45
+ #end
47
46
  data = File.open(upload.tempfile.path)
48
47
  length=File.size(upload.tempfile.path)
49
48
  gfile = ::Mongo::Grid::File.new(data,filename: filename, metadata: {content_type: content_type,length: length})
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module MongoGrid
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_grid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - zxy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-26 00:00:00.000000000 Z
11
+ date: 2019-11-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: file upload to mongodb
14
14
  email:
@@ -22,7 +22,6 @@ files:
22
22
  - README.md
23
23
  - Rakefile
24
24
  - bin/console
25
- - bin/resize
26
25
  - bin/setup
27
26
  - lib/ext/action_base.rb
28
27
  - lib/ext/mongoid.rb
data/bin/resize DELETED
Binary file