platform_sh 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/platform/version.rb +1 -1
- data/lib/platform.rb +12 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3133c8c4eb0486e1eb131b9c425e78b8a050a850
|
4
|
+
data.tar.gz: 987e6ea89793bbb38445595fe9134c061821031d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb2fe444d098fcb912ba1bb5f30ba327989fbfddafe3ac8aedf59ca9f7a116b118f2a740e358c0a6d018f24f8a7e8db7101ebb534dd493ced737ec6e21edd329
|
7
|
+
data.tar.gz: 2b2285c97f733b25ec3262086661f59aa2ec6385a2d7e7525f3ea3007415aa9d9fa6b0d35c3863156fbda37cbf48a2cb04e1164647f4f472d517cd0449f43701
|
data/lib/platform/version.rb
CHANGED
data/lib/platform.rb
CHANGED
@@ -8,17 +8,17 @@ class PlatformSH
|
|
8
8
|
def self.config
|
9
9
|
if ENV.has_key? "PLATFORM_PROJECT" then
|
10
10
|
conf = {}
|
11
|
-
conf["application"] = read_base64_json('PLATFORM_APPLICATION')
|
12
|
-
conf["relationships"] = read_base64_json('PLATFORM_RELATIONSHIPS')
|
13
|
-
conf["variables"] = read_base64_json('PLATFORM_VARIABLES')
|
14
|
-
conf["application_name"] =ENV["PLATFORM_APPLICATION_NAME"] || nil
|
15
|
-
conf["app_dir"] =ENV["PLATFORM_APP_DIR"] || nil
|
16
|
-
conf["document_root"] =ENV["PLATFORM_DOCUMENT_ROOT"] || nil
|
17
|
-
conf["environment"] =ENV["PLATFORM_ENVIRONMENT"] || nil
|
18
|
-
conf["project_entropy"] =ENV["PLATFORM_PROJECT_ENTROPY"] || nil
|
19
|
-
conf["project"] =ENV["PLATFORM_PROJECT"] || nil
|
20
|
-
conf["port"] =ENV["PORT"] || nil
|
21
|
-
conf["socket"] =ENV["SOCKET"] || nil
|
11
|
+
conf["application"] = read_base64_json('PLATFORM_APPLICATION')
|
12
|
+
conf["relationships"] = read_base64_json('PLATFORM_RELATIONSHIPS')
|
13
|
+
conf["variables"] = read_base64_json('PLATFORM_VARIABLES')
|
14
|
+
conf["application_name"] =ENV["PLATFORM_APPLICATION_NAME"] || nil
|
15
|
+
conf["app_dir"] =ENV["PLATFORM_APP_DIR"] || nil
|
16
|
+
conf["document_root"] =ENV["PLATFORM_DOCUMENT_ROOT"] || nil
|
17
|
+
conf["environment"] =ENV["PLATFORM_ENVIRONMENT"] || nil
|
18
|
+
conf["project_entropy"] =ENV["PLATFORM_PROJECT_ENTROPY"] || nil
|
19
|
+
conf["project"] =ENV["PLATFORM_PROJECT"] || nil
|
20
|
+
conf["port"] =ENV["PORT"] || nil
|
21
|
+
conf["socket"] =ENV["SOCKET"] || nil
|
22
22
|
else
|
23
23
|
$stderr.puts "This is not running on platform.sh"
|
24
24
|
return nil
|
@@ -29,7 +29,7 @@ class PlatformSH
|
|
29
29
|
private
|
30
30
|
def self.read_base64_json(var_name)
|
31
31
|
begin
|
32
|
-
return JSON.parse(Base64.decode64(ENV[var_name]))
|
32
|
+
return JSON.parse(Base64.decode64(ENV[var_name]))
|
33
33
|
rescue
|
34
34
|
$stderr.puts "no " + var_name + " environment variable"
|
35
35
|
return nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: platform_sh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ori Pekelman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|