Browse files

Move config files and certs to ~/.siriproxy/

  • Loading branch information...
1 parent 1153132 commit 64dbcc0e747680a97ccfc0143be2c569972d9512 @netpro2k netpro2k committed Nov 25, 2011
Showing with 5 additions and 5 deletions.
  1. +2 −2 Gemfile
  2. +1 −1 lib/siriproxy/command_line.rb
  3. +2 −2 lib/siriproxy/connection/iphone.rb
View
4 Gemfile
@@ -8,14 +8,14 @@ gem 'uuidtools'
require 'yaml'
require 'ostruct'
-if !File.exists?('config.yml')
+if !File.exists?(File.expand_path('~/.siriproxy/config.yml'))
$stderr.puts "config.yml not found. Copy config.example.yml to config.yml, then modify it."
exit 1
end
gem 'cora', :git => "git://github.com/chendo/cora.git"
-config = OpenStruct.new(YAML.load_file('config.yml'))
+config = OpenStruct.new(YAML.load_file(File.expand_path('~/.siriproxy/config.yml')))
if config.plugins
config.plugins.each do |plugin|
if plugin.is_a? String
View
2 lib/siriproxy/command_line.rb
@@ -57,7 +57,7 @@ def usage
private
def parse_options
- $APP_CONFIG = OpenStruct.new(YAML.load_file('config.yml'))
+ $APP_CONFIG = OpenStruct.new(YAML.load_file(File.expand_path('~/.siriproxy/config.yml')))
@option_parser = OptionParser.new do |opts|
opts.on('-p', '--port PORT', 'port number for server (central or node)') do |port_num|
$APP_CONFIG.port = port_num
View
4 lib/siriproxy/connection/iphone.rb
@@ -10,8 +10,8 @@ def initialize
def post_init
super
- start_tls(:cert_chain_file => "server.passless.crt",
- :private_key_file => "server.passless.key",
+ start_tls(:cert_chain_file => File.expand_path("~/.siriproxy/server.passless.crt"),
+ :private_key_file => File.expand_path("~/.siriproxy/server.passless.key"),
:verify_peer => false)
end

0 comments on commit 64dbcc0

Please sign in to comment.