motion-my_env 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/project/motion-my_env.rb +5 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5aac8bd97f0b2713615b7c04c1289aa607c8c1f4
4
- data.tar.gz: 6a14545688bdad92eeee84392be04b4cf9310255
3
+ metadata.gz: ca3aaeec393e07b68e992b28a5070f4455779900
4
+ data.tar.gz: 92c4c99a333695d8ebab0aedfa49e6b6b48ff985
5
5
  SHA512:
6
- metadata.gz: cdf780d8d2b0e8d58c70f321a35588d01208aac0b63709e79354f9def390c8a9fb181bc1d8759448fbf383059b5502942ce1f65c619b03a140933e9ef4968a93
7
- data.tar.gz: 0461ff50f9022d426466da0b3a38893fd97cdf7d2ad483bea42b725c22cec7c96eaa507d229555b732b3bf580efda330ad191ef8b7588ad11b5af712fd797a74
6
+ metadata.gz: 40b904c28b5d780e8d117f5415b3a050efb676dee2fbd9749fda1d2910dc87ed928abdbca7bcc17cc0f4b7f23163e44313b42e512e454b22c35c7b69fd96a261
7
+ data.tar.gz: 1eeddc5bb2bf026c74e09b3e22c1cab23bf0b313a37b6cc6ebb81c7e7e600e0b6e55ec70b9c2d4d02afc3e6a34d4bb61e16b4da6c684461a5a5573fc8d615633
@@ -1,4 +1,3 @@
1
- require 'tempfile'
2
1
  require 'fileutils'
3
2
  require 'yaml'
4
3
 
@@ -16,12 +15,13 @@ module Motion
16
15
 
17
16
  def generate_env_file path
18
17
  yaml = YAML.load(File.open(File.expand_path(path)).read)
19
- env = Tempfile.open(['motion_env', '.rb'])
20
- env.write <<-"ENV_FILE"
18
+ tmp_path = "/tmp/motion_env.rb"
19
+ File.open(tmp_path, "w") { |f|
20
+ f.write <<-"ENV_FILE"
21
21
  MY_ENV = #{yaml.inspect}
22
22
  ENV_FILE
23
- env.close
24
- env.path
23
+ }
24
+ tmp_path
25
25
  end
26
26
 
27
27
  def add_file path
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-my_env
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - ainame
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-18 00:00:00.000000000 Z
11
+ date: 2013-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake