structurebutcher 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/structurebutcher.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 371a628ae975aa237e346b792e50c68cddf4ce48
|
4
|
+
data.tar.gz: be882a48b8efa8cf5a30ec1745abb61b84d34c48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e9a328a688f72e98ccfaafcdc32e3a5dace7744bdcb7ffabc39c23dfb6ecfa375ba13b08b012de8672fa2df20e23c6f35dda7469cca6898cd30b814a49dd3e9
|
7
|
+
data.tar.gz: 56af5fe37fd7ab0a0efca707b707cde33f7ad92cf232e30254d904f00d5306fe1afc35a48c208b16075dd1ac99dee372bca5ea6deb8b92253978daf074f09ed3
|
data/lib/structurebutcher.rb
CHANGED
@@ -4,6 +4,7 @@ require 'java-properties'
|
|
4
4
|
require 'hocon'
|
5
5
|
require 'hocon/parser/config_document_factory'
|
6
6
|
require 'hocon/config_value_factory'
|
7
|
+
require 'base64'
|
7
8
|
|
8
9
|
#vyndavator, zastamdator
|
9
10
|
#amputovat, implantovat
|
@@ -64,6 +65,8 @@ class StructureButcher::Parser
|
|
64
65
|
return load_properties(filename)
|
65
66
|
when "hocon"
|
66
67
|
return load_hocon(filename)
|
68
|
+
when "base64"
|
69
|
+
return load_base64(filename)
|
67
70
|
else
|
68
71
|
throw "Not implemented"
|
69
72
|
end
|
@@ -102,6 +105,11 @@ class StructureButcher::Parser
|
|
102
105
|
def load_hocon(filename)
|
103
106
|
return recursive_stringify_keys(Hocon.load(filename))
|
104
107
|
end
|
108
|
+
|
109
|
+
def load_base64(filename)
|
110
|
+
content = File.read(filename)
|
111
|
+
return Base64.encode64(content)
|
112
|
+
end
|
105
113
|
end
|
106
114
|
|
107
115
|
class StructureButcher::Storer
|