rack-mogilefs 0.3.1 → 0.3.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.
data/HISTORY.md CHANGED
@@ -1,4 +1,8 @@
1
- ## 0.3.1(2011-01-24)
1
+ ## 0.3.2 (2011-01-24)
2
+ * Lazy load default client
3
+ * Fix an error in the README documentation
4
+
5
+ ## 0.3.1 (2011-01-24)
2
6
  * Loosen dependency on rack for rails 3.0.3
3
7
 
4
8
  ## 0.3.0 (2010-12-30)
data/README.md CHANGED
@@ -15,7 +15,7 @@ There are a variety of ways to use it:
15
15
  ### Rails 3:
16
16
 
17
17
  # (config/routes.rb)
18
- match "/assets/*" => Rack::MogileFS::Endpoint.new
18
+ match "/assets/*path" => Rack::MogileFS::Endpoint.new
19
19
 
20
20
  ### Rails 2:
21
21
 
@@ -26,7 +26,9 @@ module Rack
26
26
  end
27
27
 
28
28
  def client
29
- @options[:client]
29
+ @client ||= begin
30
+ @options[:client].respond_to?(:call) ? @options[:client].call : @options[:client]
31
+ end
30
32
  end
31
33
 
32
34
  def key_for_path(path)
@@ -7,7 +7,7 @@ module Rack
7
7
  module Client
8
8
  def initialize(*)
9
9
  super
10
- @options[:client] ||= default_client
10
+ @options[:client] ||= lambda { default_client }
11
11
  end
12
12
 
13
13
  def default_client
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class MogileFS
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-mogilefs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ben Marini