hiera-eyaml-plaintext 0.1

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.
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ .idea
2
+ *.iml
3
+ *.gradle
4
+ keys/*.pem
5
+ pkg/
6
+ tmp/
7
+ .DS_Store
8
+
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org/'
2
+
3
+ gem 'hiera-eyaml', ">=1.2.0"
4
+
5
+ group :development do
6
+ gem "aruba"
7
+ end
8
+
data/Gemfile.lock ADDED
@@ -0,0 +1,36 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ aruba (0.5.3)
5
+ childprocess (>= 0.3.6)
6
+ cucumber (>= 1.1.1)
7
+ rspec-expectations (>= 2.7.0)
8
+ builder (3.2.2)
9
+ childprocess (0.3.9)
10
+ ffi (~> 1.0, >= 1.0.11)
11
+ cucumber (1.3.5)
12
+ builder (>= 2.1.2)
13
+ diff-lcs (>= 1.1.3)
14
+ gherkin (~> 2.12.0)
15
+ multi_json (~> 1.7.5)
16
+ multi_test (>= 0.0.2)
17
+ diff-lcs (1.2.4)
18
+ ffi (1.9.0)
19
+ gherkin (2.12.0)
20
+ multi_json (~> 1.3)
21
+ hiera-eyaml (1.2.0)
22
+ highline (>= 1.6.19)
23
+ trollop (>= 2.0)
24
+ highline (1.6.19)
25
+ multi_json (1.7.8)
26
+ multi_test (0.0.2)
27
+ rspec-expectations (2.14.0)
28
+ diff-lcs (>= 1.1.3, < 2.0)
29
+ trollop (2.0)
30
+
31
+ PLATFORMS
32
+ ruby
33
+
34
+ DEPENDENCIES
35
+ aruba
36
+ hiera-eyaml (>= 1.2.0)
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+
2
+ The MIT License (MIT)
3
+
4
+ Copyright (c) 2013 Tom Poulton
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
7
+ this software and associated documentation files (the "Software"), to deal in
8
+ the Software without restriction, including without limitation the rights to
9
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10
+ the Software, and to permit persons to whom the Software is furnished to do so,
11
+ subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ hiera-eyaml-plaintext
2
+ =====================
3
+
4
+ This is a plugin encryptor for the hiera-eyaml project (hosted https://github.com/TomPoulton/hiera-eyaml/).
5
+
6
+ It encrypts using the plaintext method - which means it doesn't actually *do* any encrypting, although the output is Base64 encoded to keep with the hiera-eyaml API. It is principally here to be cloned and morphed into various different encryption methods. It is also useful for some tests that exist within the hiera-eyaml project.
7
+
8
+ Usage:
9
+
10
+ ```
11
+ $ gem install hiera-eyaml-plaintext
12
+ ```
13
+
14
+ Then see hiera-eyaml documentation for how to use the eyaml tool to encrypt using the 'PLAINTEXT' encryption_type.
15
+
16
+ Authors
17
+ =======
18
+
19
+ - [Geoff Meakin](http://github.com/gtmtechltd)
20
+
21
+ License
22
+ =======
23
+
24
+ The MIT License (MIT)
25
+
26
+ Copyright (c) 2013 Tom Poulton
27
+
28
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
29
+ this software and associated documentation files (the "Software"), to deal in
30
+ the Software without restriction, including without limitation the rights to
31
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
32
+ the Software, and to permit persons to whom the Software is furnished to do so,
33
+ subject to the following conditions:
34
+
35
+ The above copyright notice and this permission notice shall be included in all
36
+ copies or substantial portions of the Software.
37
+
38
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
40
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
41
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
42
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
43
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'hiera/backend/eyaml/encryptors/plaintext_version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "hiera-eyaml-plaintext"
8
+ gem.version = Hiera::Backend::Eyaml::Encryptors::Plaintext::VERSION
9
+ gem.description = "Plaintext encryptor for use with hiera-eyaml"
10
+ gem.summary = "Encryption plugin for hiera-eyaml backend for Hiera"
11
+ gem.author = "Geoff Meakin"
12
+ gem.license = "MIT"
13
+
14
+ gem.homepage = "http://github.com/gtmtechltd/hiera-eyaml-plaintext"
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_dependency('hiera-eyaml', '>=1.2.0')
21
+ end
@@ -0,0 +1,42 @@
1
+ require 'base64'
2
+ require 'hiera/backend/eyaml/encryptor'
3
+ require 'hiera/backend/eyaml/utils'
4
+
5
+ class Hiera
6
+ module Backend
7
+ module Eyaml
8
+ module Encryptors
9
+
10
+ class Plaintext < Encryptor
11
+
12
+ ENCRYPT_TAG = "PLAINTEXT"
13
+
14
+ def encrypt_string plaintext
15
+
16
+ ciphertext_as_block = Base64.encode64(plaintext).strip
17
+ ciphertext_as_block
18
+
19
+ end
20
+
21
+ def decrypt_string ciphertext
22
+
23
+ ciphertext_decoded = Base64.decode64(ciphertext)
24
+ ciphertext_decoded
25
+
26
+ end
27
+
28
+ def create_keys
29
+
30
+ puts "Nothing to do, the plaintext plugin does not use keys"
31
+
32
+ end
33
+
34
+ end
35
+
36
+ end
37
+
38
+ end
39
+
40
+ end
41
+
42
+ end
@@ -0,0 +1,12 @@
1
+ class Hiera
2
+ module Backend
3
+ module Eyaml
4
+ module Encryptors
5
+ module Plaintext
6
+ VERSION = "0.1"
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
12
+
data/tools/regem.sh ADDED
@@ -0,0 +1,6 @@
1
+ #!/bin/bash
2
+
3
+ gem uninstall hiera-eyaml-plaintext
4
+ rake build
5
+ gem install pkg/hiera-eyaml-plaintext
6
+ eyaml -v
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hiera-eyaml-plaintext
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Geoff Meakin
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-08-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: hiera-eyaml
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 1.2.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.2.0
30
+ description: Plaintext encryptor for use with hiera-eyaml
31
+ email:
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - .gitignore
37
+ - Gemfile
38
+ - Gemfile.lock
39
+ - LICENSE.txt
40
+ - README.md
41
+ - Rakefile
42
+ - hiera-eyaml-plaintext.gemspec
43
+ - lib/hiera/backend/eyaml/encryptors/plaintext.rb
44
+ - lib/hiera/backend/eyaml/encryptors/plaintext_version.rb
45
+ - tools/regem.sh
46
+ homepage: http://github.com/gtmtechltd/hiera-eyaml-plaintext
47
+ licenses:
48
+ - MIT
49
+ post_install_message:
50
+ rdoc_options: []
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ required_rubygems_version: !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ! '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ requirements: []
66
+ rubyforge_project:
67
+ rubygems_version: 1.8.24
68
+ signing_key:
69
+ specification_version: 3
70
+ summary: Encryption plugin for hiera-eyaml backend for Hiera
71
+ test_files: []