itamae-plugin-resource-encrypted_remote_file 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efa153a09066280449d991b53df8ac992ebfe927
4
- data.tar.gz: b9e90134cc133525bea2aa3a3fe573978c0ccc94
3
+ metadata.gz: e270458d6e290697d036927ea8c4ce3c73a3022d
4
+ data.tar.gz: 9bf86433096aff7afd97dd1cc092dc2eea45c435
5
5
  SHA512:
6
- metadata.gz: 1f5930595b904adb66d8cf871560aca1b1bdeb1a87d315eb693f72056f1f6a0fe1b663dbe145dfe16e0f84427ea58837b29df351415cb8647b31ecf1b8d454b1
7
- data.tar.gz: 0f4cad84a931aab023064c9d07d07fbd2622760549531e15207079270745c0e9e8907666c38c99ec3ed9210d396cc655355baf74703aa05388efcf906f0a118c
6
+ metadata.gz: ca3b24362bea3fbfbc6487586821e1aed16aae9486fa8f758ce9b8ae3dab4fb853bec27e297a9947e1bc8549f42d2d9485d9b1e8747890368e991db357c60ce0
7
+ data.tar.gz: f2aa33db047d12e11752f1545d782c4351aa4985d6f05559b7f570e3c4dc75476e8223cefeaa664d1757f4e34d81bf3d669e7f342eb764f9fe0c71410e0952fa
@@ -0,0 +1,11 @@
1
+ ## master
2
+ [full changelog](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/compare/v0.0.2...master)
3
+
4
+ ## 0.0.2 (2015/06/02)
5
+ [full changelog](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/compare/v0.0.1...v0.0.2)
6
+
7
+ * Support `:auto` of source attribute
8
+ * https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/pull/3
9
+
10
+ ## 0.0.1 (2015/05/09)
11
+ * first release
data/README.md CHANGED
@@ -40,6 +40,8 @@ reversible_cryptography encrypt --password=PASSWORD --src-file=/path/to/secret_f
40
40
  ### Recipe
41
41
 
42
42
  ```ruby
43
+ require "itamae-plugin-resource-encrypted_remote_file"
44
+
43
45
  encrypted_remote_file "/home/deployer/.ssh/id_rsa" do
44
46
  owner "root"
45
47
  group "root"
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "itamae-plugin-resource-encrypted_remote_file"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.0.2"
8
8
  spec.authors = ["sue445"]
9
9
  spec.email = ["sue445@sue445.net"]
10
10
  spec.licenses = ["MIT"]
@@ -10,11 +10,10 @@ module Itamae
10
10
  define_attribute :password, type: String
11
11
 
12
12
  def pre_action
13
- src_expanded_path = ::File.expand_path(attributes.source, ::File.dirname(@recipe.path))
14
- encrypted_data = File.read(src_expanded_path).strip
13
+ encrypted_data = File.read(source_file).strip
15
14
 
16
15
  decrypted_data = ReversibleCryptography::Message.decrypt(encrypted_data, attributes.password)
17
- @decrypted_tempfile = Tempfile.open(File.basename(attributes.source)) do |f|
16
+ @decrypted_tempfile = Tempfile.open(File.basename(source_file)) do |f|
18
17
  f.write(decrypted_data)
19
18
  f
20
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-plugin-resource-encrypted_remote_file
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-09 00:00:00.000000000 Z
11
+ date: 2015-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: itamae
@@ -121,6 +121,7 @@ files:
121
121
  - ".rspec"
122
122
  - ".rubocop.yml"
123
123
  - ".travis.yml"
124
+ - CHANGELOG.md
124
125
  - Gemfile
125
126
  - LICENSE.txt
126
127
  - README.md