gkv 0.2.3 → 0.2.5
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.
- checksums.yaml +4 -4
- data/.debt_ceiling.rb +5 -0
- data/CHANGLELOG +10 -1
- data/README.md +3 -2
- data/example/Gemfile +5 -0
- data/gkv.gemspec +1 -0
- data/lib/gkv/database.rb +1 -1
- data/lib/gkv/git.rb +1 -10
- data/lib/gkv/version.rb +1 -1
- metadata +17 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fa0cf55a5e4b81a786e90001fb8277cf24e60fa
|
4
|
+
data.tar.gz: 5bf4cc721d9e9a0f76591a0142eba47606570c8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed0fb645dc8b0aef29c2af3dd6387cfa0f231adde9f8976c73274571eb7dc2a2c1a4a7a77a1489a3669afef9ccdabcbd86cc89498a5cbff0d61b85c281f799fd
|
7
|
+
data.tar.gz: f154d350e524294abe19de33632d643d8c17aa550d04f87cc135626cab293e375eae72e9521d2eda59aa23c460ba4e057d466159c41fa56a7c549855380d65f9
|
data/.debt_ceiling.rb
ADDED
data/CHANGLELOG
CHANGED
@@ -1,4 +1,13 @@
|
|
1
|
-
|
1
|
+
v0.2.5
|
2
|
+
Revert to stdin piping for object hashing
|
3
|
+
|
4
|
+
v0.2.4
|
5
|
+
Switch `all` method to use hashrocket syntax for pre-Ruby 2.2.x compatibility
|
6
|
+
|
7
|
+
v0.2.3
|
8
|
+
Add operator overloading for set/get sytax
|
9
|
+
|
10
|
+
v0.2.2
|
2
11
|
Full type system. All bugs related to hashes from 0.2.0 and 0.2.1 fixed.
|
3
12
|
|
4
13
|
v0.1.x
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
# Gkv
|
2
|
+
|
3
|
+
## NOTE: this got unexpectedly popular on Hacker News. If you disagree with or think something could be done better, PLEASE TELL ME. I'm all for making this truly useable for general application and not just a toy.
|
4
|
+
|
2
5
|
[](https://gitter.im/ybur-yug/gkv?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
3
6
|
<a href="https://codeclimate.com/github/ybur-yug/gkv"><img src="https://codeclimate.com/github/ybur-yug/gkv/badges/gpa.svg" /></a>
|
4
7
|
[](http://badge.fury.io/rb/gkv)
|
@@ -9,8 +12,6 @@ Gkv is a simple git wrapper that allows you to use it as a kv store
|
|
9
12
|
|
10
13
|

|
11
14
|
|
12
|
-
[](https://asciinema.org/a/a157ouz4ju5cy9v5r3pexhj4k)
|
13
|
-
|
14
15
|
The documentation says thats what it does. So why not yo?
|
15
16
|
|
16
17
|
#### This is the product of a [tutorial](https://github.com/ybur-yug/git_kv_store_tutorial) I wrote to explore git.
|
data/example/Gemfile
ADDED
data/gkv.gemspec
CHANGED
data/lib/gkv/database.rb
CHANGED
data/lib/gkv/git.rb
CHANGED
@@ -3,16 +3,7 @@ module Gkv
|
|
3
3
|
extend self
|
4
4
|
|
5
5
|
def hash_object(data)
|
6
|
-
|
7
|
-
hash = `git hash-object -w tmp.txt`.strip!
|
8
|
-
File.delete('tmp.txt')
|
9
|
-
hash
|
10
|
-
end
|
11
|
-
|
12
|
-
def write_tmpfile(data)
|
13
|
-
f = File.open('tmp.txt', 'w+')
|
14
|
-
f.write(data)
|
15
|
-
f.close
|
6
|
+
`echo "#{data}" | git hash-object -w --stdin`.strip!
|
16
7
|
end
|
17
8
|
|
18
9
|
def cat_file(hash)
|
data/lib/gkv/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gkv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- '='
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: debt_ceiling
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: Utilize a git repository as a trivially simple kv store.
|
70
84
|
email:
|
71
85
|
- '='
|
@@ -74,6 +88,7 @@ executables:
|
|
74
88
|
extensions: []
|
75
89
|
extra_rdoc_files: []
|
76
90
|
files:
|
91
|
+
- ".debt_ceiling.rb"
|
77
92
|
- ".gitignore"
|
78
93
|
- ".rspec"
|
79
94
|
- ".travis.yml"
|
@@ -87,6 +102,7 @@ files:
|
|
87
102
|
- bin/console
|
88
103
|
- bin/gkv
|
89
104
|
- bin/setup
|
105
|
+
- example/Gemfile
|
90
106
|
- example/README.md
|
91
107
|
- example/server.rb
|
92
108
|
- gkv.gemspec
|