provisionator 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/provisionator.rb +3 -1
- data/lib/provisionator/environment.rb +18 -0
- data/lib/provisionator/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a724d0a5c1feb2b9d8c1b7d345ce436419efed7
|
4
|
+
data.tar.gz: 3a7cf5ec9e3c3afc3329dbe048c1f3f679ab92cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 543c1f03cf90b3cf0b3601eaf78381340470553b48b142fb6bef2cf8b3ef577407487ad45402e8edefc0703273d6a3dc6f6dbf16eae62df1cd169ec8736cc002
|
7
|
+
data.tar.gz: 42e48d8e112c7ba01dddfd717b06d9b341d37e00f2c6a87dc2b310b39ef8bb71a973bab708fba2d0c8651dc7b4ac045f6df441df1c5ae59e5ab31fff2a76835d
|
data/lib/provisionator.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Provisionator
|
2
|
+
class Environment
|
3
|
+
def self.load filename
|
4
|
+
File.read(filename).split("\n").each do |line|
|
5
|
+
if line =~ /\A(?:export\s+)?(\w+)(?:=|: ?)(.*)\z/
|
6
|
+
key = $1
|
7
|
+
case val = $2
|
8
|
+
# Remove single quotes
|
9
|
+
when /\A'(.*)'\z/ then ENV[key] = $1
|
10
|
+
# Remove double quotes and unescape string preserving newline characters
|
11
|
+
when /\A"(.*)"\z/ then ENV[key] = $1.gsub('\n', "\n").gsub(/\\(.)/, '\1')
|
12
|
+
else ENV[key] = val
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: provisionator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cmaitchison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- lib/provisionator/capistrano/unicorn.rb
|
74
74
|
- lib/provisionator/ec2_launcher.rb
|
75
75
|
- lib/provisionator/ec2_userdata.rb
|
76
|
+
- lib/provisionator/environment.rb
|
76
77
|
- lib/provisionator/version.rb
|
77
78
|
- pre_bootstrap.txt
|
78
79
|
- provisionator.gemspec
|