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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22a52d895fcf6e368ba62a799803b8b5be397636
4
- data.tar.gz: 237ecc651a7e32ecba0909a9a1f22fe322546fbf
3
+ metadata.gz: 3133c8c4eb0486e1eb131b9c425e78b8a050a850
4
+ data.tar.gz: 987e6ea89793bbb38445595fe9134c061821031d
5
5
  SHA512:
6
- metadata.gz: 423af6482d2d16059be9291f1e7eb58bef01dfc02a5e2861d822a0a2b27543f5c3324aa13367ef7f19342edaa1ea9f3c46e10478ae8c1788c1e32915c60d0fb6
7
- data.tar.gz: 9794fd7fb6130db3bd7d92cd5f3615776aed80a94235024534f2e8f24f64b4f8490f673dbb5cefea5b65a6909ecd63091debe7f3553282a33ff007adeacd16b4
6
+ metadata.gz: fb2fe444d098fcb912ba1bb5f30ba327989fbfddafe3ac8aedf59ca9f7a116b118f2a740e358c0a6d018f24f8a7e8db7101ebb534dd493ced737ec6e21edd329
7
+ data.tar.gz: 2b2285c97f733b25ec3262086661f59aa2ec6385a2d7e7525f3ea3007415aa9d9fa6b0d35c3863156fbda37cbf48a2cb04e1164647f4f472d517cd0449f43701
@@ -1,3 +1,3 @@
1
1
  class PlatformSH
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-07 00:00:00.000000000 Z
11
+ date: 2016-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler