remix-stash 1.0.3 → 1.0.4

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/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
1
  begin
2
2
  require 'jeweler'
3
+
3
4
  Jeweler::Tasks.new do |gemspec|
4
5
  gemspec.name = 'remix-stash'
5
6
  gemspec.summary = 'Remix your memcache'
@@ -7,6 +8,9 @@ begin
7
8
  gemspec.homepage = 'http://github.com/binary42/remix-stash'
8
9
  gemspec.authors = ['Brian Mitchell']
9
10
  end
11
+
12
+ Jeweler::GemcutterTasks.new
13
+
10
14
  rescue LoadError
11
15
  puts 'Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com'
12
16
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 1.0.4
data/lib/remix/stash.rb CHANGED
@@ -100,16 +100,20 @@ class Remix::Stash
100
100
  def eval(*keys)
101
101
  opts = default_opts(keys)
102
102
  key = canonical_key(keys, opts)
103
+ activated = false
104
+ value = nil
103
105
  cluster(opts).select(key) {|io|
104
106
  value = Protocol.get(io, key)
105
107
  if value
106
- load_value(value)
108
+ value = load_value(value)
109
+ activated = true
107
110
  else
108
111
  value = yield(*keys)
112
+ activated = true
109
113
  Protocol.set(io, key, dump_value(value), opts[:ttl])
110
- value
111
114
  end
112
115
  }
116
+ activated ? value : yield(*keys)
113
117
  end
114
118
 
115
119
  def gate(*keys)
data/remix-stash.gemspec CHANGED
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{remix-stash}
8
- s.version = "1.0.3"
8
+ s.version = "1.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Mitchell"]
12
- s.date = %q{2009-10-11}
12
+ s.date = %q{2009-10-23}
13
13
  s.email = %q{binary42@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -97,7 +97,6 @@ Gem::Specification.new do |s|
97
97
  s.test_files = [
98
98
  "spec/auto_detection_spec.rb",
99
99
  "spec/extension_spec.rb",
100
- "spec/runtime_spec.rb",
101
100
  "spec/spec.rb",
102
101
  "spec/stash_spec.rb",
103
102
  "spec/support/bar.rb",
@@ -134,3 +133,4 @@ Gem::Specification.new do |s|
134
133
  else
135
134
  end
136
135
  end
136
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remix-stash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Mitchell
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-11 00:00:00 -04:00
12
+ date: 2009-10-23 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -123,7 +123,6 @@ summary: Remix your memcache
123
123
  test_files:
124
124
  - spec/auto_detection_spec.rb
125
125
  - spec/extension_spec.rb
126
- - spec/runtime_spec.rb
127
126
  - spec/spec.rb
128
127
  - spec/stash_spec.rb
129
128
  - spec/support/bar.rb
data/spec/runtime_spec.rb DELETED
File without changes