charter 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/charter/ConfigStore.rb +17 -0
- data/lib/charter/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a67b043b06130667680089dfba67ab286b1cd08
|
4
|
+
data.tar.gz: 0cc7932f6db2ee336df6a8136b5428705b442791
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3de703b2fb2005d3a613cfd4697e2838b911186775cd07dcc35c0a71a5f52537974bd089e5da462c2572737af823b4c379a0edcfc02170ca17c951243445457d
|
7
|
+
data.tar.gz: bc83ad64d393ccb77e67d8bcdfd33d7b3a6100efd8b2691cb5c5c14934ae958a07eca1c125a746353f89e6d8a08da9c9a0ef7bf8888338b0fdb6a2d005c00ab4
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'yaml/store'
|
2
|
+
|
3
|
+
class ConfigStore
|
4
|
+
def initialize(input = nil)
|
5
|
+
@store = YAML::Store.new("config.yml")
|
6
|
+
end
|
7
|
+
|
8
|
+
def write(key,value)
|
9
|
+
@store.transaction do
|
10
|
+
@store[key] = value
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def read(key)
|
15
|
+
@store.transaction { @store.fetch(key, {} )}
|
16
|
+
end
|
17
|
+
end
|
data/lib/charter/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: charter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Grossman
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- README.md
|
78
78
|
- bin/charter
|
79
79
|
- lib/charter.rb
|
80
|
+
- lib/charter/ConfigStore.rb
|
80
81
|
- lib/charter/charter_template.md
|
81
82
|
- lib/charter/doc.rb
|
82
83
|
- lib/charter/version.rb
|