dbum 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Readme.md +6 -8
  3. data/VERSION +1 -1
  4. data/lib/dbum/app.rb +3 -9
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6440dbbd65d0459b357f33f43bbb0f949f453602
4
- data.tar.gz: ef8eb85055d70699bc8fd9b17fd23aff4d7ef450
3
+ metadata.gz: 8594c3ad04d6443ae2be7c87fb028321069a14f1
4
+ data.tar.gz: 17d440e0e0c4d3c133087a34135171f20a190b43
5
5
  SHA512:
6
- metadata.gz: 69bfb0964579921af41122ce9ccbb044a9aebcf08a25c2d69a5fddadbea2e80b1b71880f8164928736e6ca304f5225e379723076c782587f5860101091dabe27
7
- data.tar.gz: 3238eac53926240c8bc3dbf9af5bdf8110462c9a8b52d3fa4884fe3a69003815d694b0e2982df66793d754a32414a51a1a314e3c7e3b674e0ac3edd9392b93b3
6
+ metadata.gz: b13c5df1dc4324968b7f4992d8da7954e1544ec893fb2e9da72e3873fbef80f0163566f8f5a46c2100e31ffb46bcb5d44806a81ea9ca315131b69f85e4749f00
7
+ data.tar.gz: 755eb88eefbeabda5d11191a6dfd68bdd95312415f7cf4059e69604f264d2c5ae9f7c7da7ea792a34a210168e742887dc8aec44847a889f3f69276214253391f
data/Readme.md CHANGED
@@ -1,11 +1,11 @@
1
- # DBum
1
+ # dbum
2
+
3
+ _Pronounced **dumb**_
2
4
 
3
5
  A no-nonsense, JSON-based key-value store backed by [Daybreak](http://propublica.github.io/daybreak/)
4
6
 
5
7
  ## Usage
6
8
 
7
- DBum has few commands:
8
-
9
9
  $ dbum help
10
10
  Commands:
11
11
  dbum art # View the application art
@@ -34,8 +34,6 @@ You're probably most interested in the `server` command:
34
34
 
35
35
  ## API
36
36
 
37
- The Web server has only a few endpoints:
38
-
39
37
  ### List keys `GET /`
40
38
 
41
39
  Return the current list of keys.
@@ -45,17 +43,17 @@ Return the current list of keys.
45
43
  Return the value associated with the given key. Returns `404` if the key does
46
44
  not exist.
47
45
 
48
- ### Create key `POST /:key`
46
+ ### Create key `POST /:key {}`
49
47
 
50
48
  Associate the given key with the value contained in the request body, which must
51
49
  be a valid JSON hash. Returns `404` if the key already exists.
52
50
 
53
- ### Replace key `PUT /:key`
51
+ ### Replace key `PUT /:key {}`
54
52
 
55
53
  Associate the given key with the value contained in the request body, which must
56
54
  be a valid JSON hash. Returns `404` if the key does not exist.
57
55
 
58
- ### Update key `PATCH /:key`
56
+ ### Update key `PATCH /:key {}`
59
57
 
60
58
  Merge the value associated the given key with the contents of the request body,
61
59
  which must be a valid JSON hash. Returns `404` if the key does not exist.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -37,7 +37,7 @@ module DBum
37
37
 
38
38
 
39
39
  get '/' do
40
- pretty_json map.keys
40
+ pretty_json keys
41
41
  end
42
42
 
43
43
  get '/:key' do
@@ -95,15 +95,9 @@ module DBum
95
95
  JSON.pretty_generate o
96
96
  end
97
97
 
98
- def map
99
- @@db.lock do
100
- @@db.keys.reduce({}) { |h, k| h[k] = @@db[k] ; h }
101
- end
102
- end
98
+ def keys ; @@db.keys end
103
99
 
104
- def lookup key
105
- map[key]
106
- end
100
+ def lookup key ; @@db[key] end
107
101
 
108
102
  def update key, val
109
103
  @@db.lock do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Clemmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-06 00:00:00.000000000 Z
11
+ date: 2015-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor