pf-command 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pf-command/commandline.rb +1 -1
- data/lib/pf-command/phpfog.rb +4 -3
- data/lib/pf-command/version.rb +1 -1
- metadata +2 -2
data/lib/pf-command/phpfog.rb
CHANGED
@@ -181,7 +181,8 @@ class PHPfog
|
|
181
181
|
|
182
182
|
def load_session
|
183
183
|
begin
|
184
|
-
|
184
|
+
session_path = File.expand_path("~#{ENV['USER']}/.pf-command-session")
|
185
|
+
session_file = File.open(session_path, 'r')
|
185
186
|
session_json = session_file.readlines.to_s
|
186
187
|
$session = JSON.parse(session_json)
|
187
188
|
rescue
|
@@ -190,8 +191,8 @@ class PHPfog
|
|
190
191
|
end
|
191
192
|
|
192
193
|
def save_session
|
193
|
-
|
194
|
-
session_file = File.new(
|
194
|
+
session_path = File.expand_path("~#{ENV['USER']}/.pf-command-session")
|
195
|
+
session_file = File.new(session_path, "w+")
|
195
196
|
session_file.puts(JSON.generate($session))
|
196
197
|
session_file.close
|
197
198
|
end
|
data/lib/pf-command/version.rb
CHANGED