motion-env 0.0.2 → 0.0.3

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: 5bf66e693100426c4a02c07638761fa6f9c80645
4
- data.tar.gz: bea8c0a65ac7885d4f89074c50ee1e4bdbe44cc2
3
+ metadata.gz: ae360db512a9108b41846c1897e4bec775151f5c
4
+ data.tar.gz: 07409527f05b8850f70b75008bd043209eff08c7
5
5
  SHA512:
6
- metadata.gz: 4a0f2a39b0297d75577431ad5709f9778dd631a741956afb3a9b275881056eb5892a05875fc6c680509913d8879eeb2c435d42b5baa49ee58a363a3b0d3ed3ed
7
- data.tar.gz: 91bc47b9478f50599458213d27d5de1e8025c3f30de12cea521bdc04ef701d200d0727d9588dd702ff4a0374013e1289ea75ca056696de29fd3e2a5248430f34
6
+ metadata.gz: 1febb33adb94f4202192f8d8b6e1df8bb0ec8c32b65432510720e85f663f5980996d0c47daebdf95e39ef791795593c5a98a664c86c2189e7c4a1b9920ce9996
7
+ data.tar.gz: 22450bff0e55f30d7fa1ffd420b920ea0423f7cb38fccfe4da8042efc2c114dc1e6af975bdcbd950611d0222ac7930db43fa394e84b032852a4ddbc23b59dcd3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- motion-env (0.0.2)
4
+ motion-env (0.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,6 +1,9 @@
1
1
  module Motion; module Project;
2
2
  class Builder
3
3
  MARSHAL_SIGIL = "__marshall__"
4
+ NULL = "\x00"
5
+ NULL_REPLACEMENT = "\\x00"
6
+
4
7
  def build_with_env(config, platform, opts)
5
8
  config_env = config.env
6
9
  File.open(config_env.file_path, 'w') { |f|
@@ -10,7 +13,7 @@ ENV.instance_eval do
10
13
  def [](key)
11
14
  value = @get_key_without_patch.call(key)
12
15
  if value && value.start_with?("#{MARSHAL_SIGIL}")
13
- value = Marshal.load(value.gsub("#{MARSHAL_SIGIL}", ""))
16
+ value = Marshal.load(value.gsub("#{MARSHAL_SIGIL}", "").gsub('#{NULL_REPLACEMENT}', '#{NULL}'))
14
17
  end
15
18
  value
16
19
  end
@@ -19,7 +22,7 @@ end
19
22
  config_env.each do |key, value|
20
23
  dump_value = value
21
24
  if !value.is_a?(String)
22
- dump_value = MARSHAL_SIGIL + Marshal.dump(value).strip
25
+ dump_value = MARSHAL_SIGIL + Marshal.dump(value).gsub(NULL, NULL_REPLACEMENT)
23
26
  end
24
27
  f.write "ENV['#{key.to_s}'] = '#{dump_value}'\n"
25
28
  end
data/motion-env.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "motion-env"
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
6
6
  s.authors = ["Clay Allsopp"]
7
7
  s.email = ["clay@usepropeller.com"]
8
8
  s.homepage = "https://github.com/usepropeller/motion-env"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-env
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
  - Clay Allsopp