mrf 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fc41767656e9989ea870601651285a29fe56fae
4
- data.tar.gz: 309300c96ba06e96bd5f6cd3d4da521b946257ca
3
+ metadata.gz: 460fc138bcf01da0838c3e4578c8d04220e873a9
4
+ data.tar.gz: 8f59a3edb231605865b089392b82dde73a27aaf7
5
5
  SHA512:
6
- metadata.gz: f03cb839f4233d267a50cdbacaa703a9f99155f198e1e2d12edf389a83dd09677d61c9914827180e750c9e2235498ce02d32aa3a66180277efd655b2a1910699
7
- data.tar.gz: df57b7057f34fa6afa6c916fe1e78b218597b390b964466c2d94ff48f5c27c504f7c58476b3b0430fd5bdbba1d529272f87652df1d51d4ff84c0510f57c34ef3
6
+ metadata.gz: 9861a9fb6f48dfaa070185e991d9b9f1346d27659e513e987ea28731f43a5c989d2dcff2d2a78fd5a39e432fb90c7adaa8b978663ef0133e1e62964802de8425
7
+ data.tar.gz: 4fd1947c6f210ba63689ad5cbbd7c01dc43c8d04b0612d127f3649dd156249a9198621980963fba7d2458d2efa7d2dba7241bcec98187c839197f5317e2ea8fc
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ *.gem
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mrf (0.0.1)
4
+ mrf (0.0.2)
5
5
  capistrano
6
6
  gpgme
7
7
 
@@ -11,7 +11,7 @@ Capistrano::Configuration.instance(:must_exist).load do
11
11
  MrF::Project.new(
12
12
  secrets_path: secret_path
13
13
  ).unpack_secrets.each do |filepath, content|
14
- upload(content, File.join(config_dir, filepath))
14
+ upload(content, File.join(config_dir, filepath), mode: '0600')
15
15
  end
16
16
  end
17
17
  end
data/lib/mrf/project.rb CHANGED
@@ -17,9 +17,13 @@ module MrF
17
17
  )
18
18
 
19
19
  keyring.data.reduce({}) do |acc, (filename, data)|
20
- content = StringIO.new(YAML.dump(data))
20
+ content = StringIO.new(yaml_file?(filename) ? YAML.dump(data) : data)
21
21
  acc.merge(filename => content)
22
22
  end
23
23
  end
24
+
25
+ def yaml_file? (path)
26
+ path =~ /\A.*\.yml\Z/
27
+ end
24
28
  end
25
29
  end
data/lib/mrf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module MrF
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -17,6 +17,9 @@ module MrF
17
17
 
18
18
  expect(YAML.load(files["app.yml"].string)).
19
19
  to eq("production" => {"password" => "some_password"})
20
+
21
+ expect(files["secret.key"].string).
22
+ to eq("two lines\nof information")
20
23
  end
21
24
 
22
25
  it "raises error if file does not exist" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mrf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Kårlin
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-09-23 00:00:00.000000000 Z
13
+ date: 2013-09-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: gpgme
@@ -89,6 +89,7 @@ executables: []
89
89
  extensions: []
90
90
  extra_rdoc_files: []
91
91
  files:
92
+ - .gitignore
92
93
  - Gemfile
93
94
  - Gemfile.lock
94
95
  - README.md