structurebutcher 0.1.0 → 0.2.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/structurebutcher.rb +8 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfa37f9b9be3237458a70a0c7938b48090e207f0
4
- data.tar.gz: 45358a765341ff44cd9e5d96fb6f4b7c3b30ee9c
3
+ metadata.gz: 371a628ae975aa237e346b792e50c68cddf4ce48
4
+ data.tar.gz: be882a48b8efa8cf5a30ec1745abb61b84d34c48
5
5
  SHA512:
6
- metadata.gz: 3efe06a3ea533b9846a93a9c7603f8e2f7fcbcfb928e6e6a7539465b9e8508876b07f06624f00167aaff3fb9c434c4b1a554cc3788895131dd69549d038b2939
7
- data.tar.gz: 289652b9b8c228983b36329e47c89d18b1135730c00eec04a09c2e865b10b503422b8d8347982ef56d4dd8c42970c3ffff647c2c9cbca4a6a1b2e0b72e390a49
6
+ metadata.gz: 7e9a328a688f72e98ccfaafcdc32e3a5dace7744bdcb7ffabc39c23dfb6ecfa375ba13b08b012de8672fa2df20e23c6f35dda7469cca6898cd30b814a49dd3e9
7
+ data.tar.gz: 56af5fe37fd7ab0a0efca707b707cde33f7ad92cf232e30254d904f00d5306fe1afc35a48c208b16075dd1ac99dee372bca5ea6deb8b92253978daf074f09ed3
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: structurebutcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miroslav Tynovsky