mingle_keyvalue_store 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +1 -0
  2. data/lib/mingle_keyvalue_store.rb +4 -7
  3. metadata +5 -5
data/README.md CHANGED
@@ -0,0 +1 @@
1
+ [![Build Status](https://snap-ci.com/Xepi1GC1RH-xljlY0aGThFoqOtmpsgse_xt-leosres/build_image)](https://snap-ci.com/projects/ThoughtWorksStudios/mingle_keyvalue_store/build_history)
@@ -36,8 +36,9 @@ module Mingle
36
36
  end
37
37
 
38
38
  def clear
39
- FileUtils.rm_f(@store_file)
40
- @pstore = PStore.new(@store_file)
39
+ @pstore.transaction do
40
+ @pstore["all_names"].clear
41
+ end
41
42
  nil
42
43
  end
43
44
 
@@ -61,11 +62,7 @@ module Mingle
61
62
  private
62
63
 
63
64
  def store_file(path)
64
- FileUtils.mkdir_p(path)
65
-
66
- file = Tempfile.new("#{@namespace}_keystore.pstore", path).path
67
- FileUtils.mkdir_p(File.dirname(file))
68
- file
65
+ File.join(path, "#{@namespace}_keystore.pstore")
69
66
  end
70
67
  end
71
68
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mingle_keyvalue_store
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ian
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2013-10-16 00:00:00 Z
19
+ date: 2013-10-25 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: aws-sdk
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  requirements: []
91
91
 
92
92
  rubyforge_project:
93
- rubygems_version: 1.8.25
93
+ rubygems_version: 1.8.24
94
94
  signing_key:
95
95
  specification_version: 3
96
96
  summary: A key value store implentation that uses DynamoDB or Pstore underneath.