echo_uploads 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/echo_uploads/file.rb +9 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e1c16aedf066542375c4917d100a2b80e76f552f
4
- data.tar.gz: 8245c8fb20b7b6f4f5a5d706fd9f88577c8fe494
3
+ metadata.gz: 4e65bbb9b899f8a3cd419761cf5166a932a57e24
4
+ data.tar.gz: 86788f880e33a403a1be30d2af07b9c6d3e4a290
5
5
  SHA512:
6
- metadata.gz: b4b033b96e3d39697160a5edbee7aaf95265bf3209fd949975db05aa5a7f003936efb6e38280ce11159609830cd1e9d6dded6a7509324277eb52d9a2be8a8267
7
- data.tar.gz: ecc573409a3bfb5ac9532ce8b8cd91d24e1e74f3a1c6051bbbe4079efde93c37ba52e4fc15bb869af8709564d0f459cefbee39d25a938086c4ddd6be89fe7dc9
6
+ metadata.gz: 2d08e267fced64cc44f0212d81a36e4b79a709f734cdf5f8568d2883fc1ae5cc636a8d80d5fcf4d968dd20f89329f8058ef02a6423a79b005b1c7cd014454f36
7
+ data.tar.gz: 9a48ac94ec4d61ece3aae321ee88fe41bc09fe6a81112204d13919d4ded551756b9af34144673f9dd68c4ed1f048683a449dfb86a71e0ba41cc347020c531cc3
@@ -70,7 +70,15 @@ module EchoUploads
70
70
  end
71
71
 
72
72
  def storage
73
- Object.const_get(storage_type).new
73
+ class_from_string(storage_type).new
74
+ end
75
+
76
+ private
77
+
78
+ def class_from_string(name)
79
+ name.split('::').inject(Object) do |mod, klass|
80
+ mod.const_get klass
81
+ end
74
82
  end
75
83
  end
76
84
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: echo_uploads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarrett Colby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-09 00:00:00.000000000 Z
11
+ date: 2014-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types