factor 0.0.83 → 0.0.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/cli/command.rb CHANGED
@@ -8,26 +8,27 @@ require 'rest_client'
8
8
  module Factor
9
9
  module CLI
10
10
  class Command < Thor
11
- CONFIG_FILE_DIR = File.expand_path("~/.factor")
11
+
12
12
 
13
13
 
14
14
  no_tasks do
15
15
 
16
16
  def initialize(*vals)
17
+ @config_file_dir = File.expand_path("~/.factor")
17
18
  @client = Factor::Client::Client.new
18
19
  @client.login_token(get_config[:token])
19
20
  super(*vals)
20
21
  end
21
22
 
22
23
  def save_config(config)
23
- File.open(CONFIG_FILE_DIR,'w') do |file|
24
+ File.open(@config_file_dir,'w') do |file|
24
25
  YAML::dump(config,file)
25
26
  end
26
27
  @client.login_token(get_config[:token])
27
28
  end
28
29
 
29
30
  def get_config
30
- File.exists?(CONFIG_FILE_DIR) ? YAML::load_file(CONFIG_FILE_DIR) : {}
31
+ File.exists?(@config_file_dir) ? YAML::load_file(@config_file_dir) : {}
31
32
  end
32
33
  end
33
34
  end
data/lib/client/client.rb CHANGED
@@ -10,8 +10,7 @@ module Factor
10
10
  class Client
11
11
  attr_accessor :host
12
12
 
13
- def initialize(host="http://localhost:3000")
14
- #def initialize(host="http://factor.io")
13
+ def initialize(host="http://factor.io")
15
14
  @host=host
16
15
  end
17
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.83
4
+ version: 0.0.84
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: