dragonfly-mogilefs 0.0.1 → 0.0.2

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.
@@ -29,6 +29,7 @@ module EnMasse
29
29
  configurable_attr :timeout
30
30
  configurable_attr :readonly
31
31
  configurable_attr :db_backend
32
+ configurable_attr :remote_url
32
33
 
33
34
  def initialize(options = {})
34
35
  self.hosts = options[:hosts]
@@ -37,6 +38,7 @@ module EnMasse
37
38
  self.timeout = options[:timeout] if options[:timeout]
38
39
  self.readonly = options[:readonly] if options[:readonly]
39
40
  self.db_backend = options[:db_backend] if options[:db_backend]
41
+ self.remote_url = options[:remote_url] if options[:remote_url]
40
42
  end
41
43
 
42
44
  def store(temp_object, options = {})
@@ -77,6 +79,10 @@ module EnMasse
77
79
  @connection ||= ::MogileFS::MogileFS.new(options)
78
80
  end
79
81
 
82
+ def url_for(uid)
83
+ "#{remote_url}/#{uid}"
84
+ end
85
+
80
86
  private
81
87
 
82
88
  def generate_uid(name)
@@ -19,7 +19,7 @@
19
19
  module EnMasse
20
20
  module Dragonfly
21
21
  module MogileFS
22
- VERSION = "0.0.1"
22
+ VERSION = "0.0.2"
23
23
  end
24
24
  end
25
25
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dragonfly-mogilefs
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jamie Winsor
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-01 00:00:00 -07:00
13
+ date: 2011-07-14 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency