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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4fc1375a0274ca5be61ba0aaa1275b833243e539
4
- data.tar.gz: c242f9e585e555fdbafc5ac42e6cb44900aca579
3
+ metadata.gz: 6a67b043b06130667680089dfba67ab286b1cd08
4
+ data.tar.gz: 0cc7932f6db2ee336df6a8136b5428705b442791
5
5
  SHA512:
6
- metadata.gz: 4f4b35fbb21c1c554645561fe5128be7598d4cac919692fe39f1bc57bc8731f6a82aa7f98e0dcbd0a2cb6e3122797a9313ff7aa3c81cb5594e487f38e5dee5fb
7
- data.tar.gz: b02365945e3e717e7dc987f74e529e7270888903876ac8970df9f4a9d1acebccfb15020943b0cef93f787aa64385698d424fcbfe452c7387887568c86788ca80
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
@@ -1,3 +1,3 @@
1
1
  module Charter
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
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.10
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