metastore 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metastore.rb +1 -0
- data/lib/metastore/cabinet.rb +3 -0
- data/lib/metastore/errors.rb +5 -0
- data/lib/metastore/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: 49bf17ac306ec5daca0b23eb36ff66e870b982d6
|
4
|
+
data.tar.gz: 5c61a67a92cfafe34a831b0457d1623e696522e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 352a46c78ecb1e25a64b8c7c015ee2e9d61718decd431ae59cf2fd9bf3a254ff7252bc89a9e52bf9fe5510635d85f5c90ef8d7556f97a2f793d100d9209e1b34
|
7
|
+
data.tar.gz: c5d1ad73a624cd8b3387e2db01c521417343fc7e8c7465fa4ed88a2079489b3b7f0d1b1a480189be5cacbc9fca84094f6dd4e729917e10decd5829a477b14efa
|
data/lib/metastore.rb
CHANGED
data/lib/metastore/cabinet.rb
CHANGED
@@ -17,6 +17,7 @@ module Metastore
|
|
17
17
|
current_contents = contents
|
18
18
|
set_key_and_value(current_contents, split_key(key), value)
|
19
19
|
save!(current_contents)
|
20
|
+
true
|
20
21
|
end
|
21
22
|
|
22
23
|
def clear!
|
@@ -69,6 +70,8 @@ module Metastore
|
|
69
70
|
def save!(new_values)
|
70
71
|
FileUtils.mkdir_p(file.dirname) unless file.exist?
|
71
72
|
File.open(file.to_s, 'w') { |f| f.write(new_values.to_yaml) }
|
73
|
+
rescue => e
|
74
|
+
raise Errors::CabinetCannotSet.new(e.message)
|
72
75
|
end
|
73
76
|
|
74
77
|
end
|
data/lib/metastore/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metastore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ash McKenzie
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- Rakefile
|
98
98
|
- lib/metastore.rb
|
99
99
|
- lib/metastore/cabinet.rb
|
100
|
+
- lib/metastore/errors.rb
|
100
101
|
- lib/metastore/version.rb
|
101
102
|
- metastore.gemspec
|
102
103
|
homepage: https://github.com/ashmckenzie/metastore
|