hiera-eyaml-plaintext 0.1 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE.txt CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  The MIT License (MIT)
3
3
 
4
- Copyright (c) 2013 Tom Poulton
4
+ Copyright (c) 2013 GTMTech Ltd
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy of
7
7
  this software and associated documentation files (the "Software"), to deal in
data/README.md CHANGED
@@ -23,7 +23,7 @@ License
23
23
 
24
24
  The MIT License (MIT)
25
25
 
26
- Copyright (c) 2013 Tom Poulton
26
+ Copyright (c) 2013 GTMTech Ltd
27
27
 
28
28
  Permission is hereby granted, free of charge, to any person obtaining a copy of
29
29
  this software and associated documentation files (the "Software"), to deal in
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'hiera/backend/eyaml/encryptors/plaintext_version'
4
+ require 'hiera/backend/eyaml/encryptors/plaintext/version'
5
5
 
6
6
  Gem::Specification.new do |gem|
7
7
  gem.name = "hiera-eyaml-plaintext"
@@ -17,5 +17,5 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
- gem.add_dependency('hiera-eyaml', '>=1.2.0')
20
+ gem.add_dependency('hiera-eyaml', '>=1.3.0')
21
21
  end
@@ -1,6 +1,8 @@
1
1
  require 'base64'
2
2
  require 'hiera/backend/eyaml/encryptor'
3
3
  require 'hiera/backend/eyaml/utils'
4
+ require 'hiera/backend/eyaml/plugins'
5
+ require 'hiera/backend/eyaml/options'
4
6
 
5
7
  class Hiera
6
8
  module Backend
@@ -9,26 +11,30 @@ class Hiera
9
11
 
10
12
  class Plaintext < Encryptor
11
13
 
12
- ENCRYPT_TAG = "PLAINTEXT"
14
+ self.tag = "PLAINTEXT"
13
15
 
14
- def encrypt_string plaintext
16
+ self.options = {
17
+ :diagnostic_message => { :desc => "String which is output as debug when using this plugin",
18
+ :short => 'w',
19
+ :type => :string,
20
+ :default => "success" }
21
+ }
15
22
 
16
- ciphertext_as_block = Base64.encode64(plaintext).strip
17
- ciphertext_as_block
18
-
23
+ def self.encrypt plaintext
24
+ diagnostic_message = self.option :diagnostic_message
25
+ $stderr.puts "Encrypt_string: #{diagnostic_message}"
26
+ plaintext
19
27
  end
20
28
 
21
- def decrypt_string ciphertext
22
-
23
- ciphertext_decoded = Base64.decode64(ciphertext)
24
- ciphertext_decoded
25
-
29
+ def self.decrypt ciphertext
30
+ diagnostic_message = self.option :diagnostic_message
31
+ $stderr.puts "Decrypt_string: #{diagnostic_message}"
32
+ ciphertext
26
33
  end
27
34
 
28
- def create_keys
29
-
30
- puts "Nothing to do, the plaintext plugin does not use keys"
31
-
35
+ def self.create_keys
36
+ diagnostic_message = self.option :diagnostic_message
37
+ puts "Create_keys: #{diagnostic_message}"
32
38
  end
33
39
 
34
40
  end
@@ -0,0 +1,3 @@
1
+ require 'hiera/backend/eyaml/encryptors/plaintext'
2
+
3
+ Hiera::Backend::Eyaml::Encryptors::Plaintext.register
@@ -3,7 +3,7 @@ class Hiera
3
3
  module Eyaml
4
4
  module Encryptors
5
5
  module Plaintext
6
- VERSION = "0.1"
6
+ VERSION = "0.3"
7
7
  end
8
8
  end
9
9
  end
data/tools/regem.sh CHANGED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiera-eyaml-plaintext
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.3'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-08 00:00:00.000000000 Z
12
+ date: 2013-08-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hiera-eyaml
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.2.0
21
+ version: 1.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 1.2.0
29
+ version: 1.3.0
30
30
  description: Plaintext encryptor for use with hiera-eyaml
31
31
  email:
32
32
  executables: []
@@ -41,7 +41,8 @@ files:
41
41
  - Rakefile
42
42
  - hiera-eyaml-plaintext.gemspec
43
43
  - lib/hiera/backend/eyaml/encryptors/plaintext.rb
44
- - lib/hiera/backend/eyaml/encryptors/plaintext_version.rb
44
+ - lib/hiera/backend/eyaml/encryptors/plaintext/eyaml_init.rb
45
+ - lib/hiera/backend/eyaml/encryptors/plaintext/version.rb
45
46
  - tools/regem.sh
46
47
  homepage: http://github.com/gtmtechltd/hiera-eyaml-plaintext
47
48
  licenses: