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.
@@ -6,7 +6,7 @@ module Commandline
6
6
  @metadata = []
7
7
  end
8
8
 
9
- def run!pf (argv)
9
+ def run!(argv)
10
10
  if argv.nil? || !argv.is_a?(Array) || argv.length < 1
11
11
  puts "Invalid Command"
12
12
  return false
@@ -181,7 +181,8 @@ class PHPfog
181
181
 
182
182
  def load_session
183
183
  begin
184
- session_file = File.open("../config/session.json", 'r')
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
- puts File.expand_path('../config/session.json')
194
- session_file = File.new(SESSION_PATH, "w+")
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
@@ -1,5 +1,5 @@
1
1
  module Pf
2
2
  module Command
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tim Santeford