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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82963adf7311538addb67d420d72022bf7167892
4
- data.tar.gz: d12766be8959ff559f47e09a72dfa2d22531a560
3
+ metadata.gz: 1a724d0a5c1feb2b9d8c1b7d345ce436419efed7
4
+ data.tar.gz: 3a7cf5ec9e3c3afc3329dbe048c1f3f679ab92cb
5
5
  SHA512:
6
- metadata.gz: 1a4bb193ebc56d38ae0e858e747077c38173c295b12c68aec90d6e041c9d3b236f128237c4073567c959b8278173aff5639e2a0415bcfd8152aa2e7d6b9e7205
7
- data.tar.gz: 56b7312f688f3e74e4a1498d973dcbce2927be42dec329230d9f53a1a1f431bc4c3488ca712b42c83751e947523f9b86ee4740a687f00fd650d53b12749b834e
6
+ metadata.gz: 543c1f03cf90b3cf0b3601eaf78381340470553b48b142fb6bef2cf8b3ef577407487ad45402e8edefc0703273d6a3dc6f6dbf16eae62df1cd169ec8736cc002
7
+ data.tar.gz: 42e48d8e112c7ba01dddfd717b06d9b341d37e00f2c6a87dc2b310b39ef8bb71a973bab708fba2d0c8651dc7b4ac045f6df441df1c5ae59e5ab31fff2a76835d
data/lib/provisionator.rb CHANGED
@@ -1,3 +1,5 @@
1
1
  require 'provisionator/version'
2
2
 
3
- require 'provisionator/ec2_launcher'
3
+ require 'provisionator/ec2_launcher'
4
+
5
+ require 'provisionator/environment'
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Provisionator
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  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.19
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 00:00:00.000000000 Z
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